Explorar o código

Put MPI_Barrier inside assertion routine

Christoph Stelz hai 4 meses
pai
achega
e0a6756b0b
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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
 }