From 9636c9d3904a3f4ec8bbac1d0fb307554aa66e29 Mon Sep 17 00:00:00 2001 From: WickedJack99 Date: Tue, 27 May 2025 18:21:19 +0200 Subject: [PATCH] added wait --- lab10/jacobi/jacobi_mpi.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lab10/jacobi/jacobi_mpi.cpp b/lab10/jacobi/jacobi_mpi.cpp index 9615f94..576858b 100644 --- a/lab10/jacobi/jacobi_mpi.cpp +++ b/lab10/jacobi/jacobi_mpi.cpp @@ -68,6 +68,7 @@ Jacobi::Result JacobiMPI::run(const Matrix &init, double epsilon, int maxNumIter MPI_Request requestLower; MPI_Irecv(haloLower.data(), haloLower.size(), MPI_DOUBLE, neighborLower, rowHaloLowerIndex, MPI_COMM_WORLD, &requestLower); + MPI_Wait(&requestLower, MPI_STATUS_IGNORE); for (int i = 1; i < numRows - 1; ++i) { @@ -90,6 +91,7 @@ Jacobi::Result JacobiMPI::run(const Matrix &init, double epsilon, int maxNumIter MPI_Request requestUpper; MPI_Irecv(haloUpper.data(), haloUpper.size(), MPI_DOUBLE, neighborUpper, rowHaloUpperIndex, MPI_COMM_WORLD, &requestUpper); + MPI_Wait(&requestUpper, MPI_STATUS_IGNORE); for (int i = 1; i < numRows - 1; ++i) {