gather result matrix
This commit is contained in:
@@ -160,5 +160,10 @@ Jacobi::Result JacobiMPI::run(const Matrix &init, double epsilon,
|
||||
std::swap(t0, t1);
|
||||
}
|
||||
|
||||
Matrix result = Matrix::zeros(numProc * numRows, numCols);
|
||||
|
||||
MPI_Gather(&phi[t0], numRows * numCols, MPI_DOUBLE, result.data(),
|
||||
numRows * numCols, MPI_DOUBLE, 0, MPI_COMM_WORLD);
|
||||
|
||||
return Jacobi::Result{phi[t0], dist, nIter};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user