From: Wolfgang Bangerth Date: Fri, 16 Jun 2023 16:01:16 +0000 (-0600) Subject: Wait for communication to finish. X-Git-Tag: v9.5.0-rc1~92^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4492bac7bfe6decd7f7bbac6886cbd51e23786c0;p=dealii.git Wait for communication to finish. --- diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index ef9414da49..75c0240007 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -3665,6 +3665,11 @@ namespace GridTools AssertThrowMPI(ierr); } + // At this point, wait for all of the isend operations to finish: + MPI_Waitall(first_requests.size(), + first_requests.data(), + MPI_STATUSES_IGNORE); + // Send second message std::vector> cellids_send_buffers( @@ -3773,6 +3778,12 @@ namespace GridTools } } } + + // At this point, wait for all of the isend operations of the second round + // to finish: + MPI_Waitall(second_requests.size(), + second_requests.data(), + MPI_STATUSES_IGNORE); #endif return local_to_global_vertex_index;