fix gather

This commit is contained in:
kai
2025-05-31 16:34:17 +02:00
parent 4581a62126
commit b1bf9af98b

View File

@@ -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};