Browse Source

Put MPI_Barrier inside assertion routine

Christoph Stelz 3 months ago
parent
commit
e0a6756b0b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/ipc_debug.cpp

+ 1 - 0
src/ipc_debug.cpp

@@ -321,4 +321,5 @@ void debug_ipc_assert_equal_mpi_double_array(double *array, size_t array_length)
     if (rank == 0) {
         debug_ipc_assert_equal_vector(float_buffer);
     }
+    MPI_Barrier(MPI_COMM_WORLD); // make sure other ranks do not carry on until the root has also left the assertion sub-routine
 }