Blocks until all processes have reached this routine.
#include <mpi.h> int MPI_Barrier(MPI_Comm comm)
#include <mpi.h> void MPI::Comm::Barrier() const = 0
comm | Communicator (handle). |
Blocks the caller until all group members have called it; the call returns at any process only after all group members have entered the call.
The next animation shows how it works
MPI_SUCCESS | No error; MPI routine completed successfully. |
MPI_ERR_COMM | Invalid communicator. A common error is to use a null communicator in a call (not even allowed in MPI_Comm_rank). |