fix gather
This commit is contained in:
@@ -162,7 +162,11 @@ Jacobi::Result JacobiMPI::run(const Matrix &init, double epsilon,
|
||||
|
||||
Matrix result = Matrix::zeros(numProc * numRows, numCols);
|
||||
|
||||
MPI_Gather(&phi[t0], numRows * numCols, MPI_DOUBLE, result.data(),
|
||||
if (rank == 0) {
|
||||
std::cout << "try to gather" << std::endl;
|
||||
}
|
||||
|
||||
MPI_Gather(phi[t0].data(), 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