Parcourir la source

Put MPI_Barrier inside assertion routine

Christoph Stelz il y a 4 mois
Parent
commit
e0a6756b0b
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  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
 }