7.3. Barrier Synchronization

PreviousUpNext
Up: Collective Communication Next: Broadcast Previous: Specifics for Inter-Communicator Collective Operations

MPI_BARRIER(comm)
IN commcommunicator (handle)
C binding
int MPI_Barrier(MPI_Comm comm)
Fortran 2008 binding
MPI_Barrier(comm, ierror)

TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_BARRIER(COMM, IERROR)

INTEGER COMM, IERROR

If comm is an intra-communicator, MPI_BARRIER blocks the caller until all group members have called it. The call returns at any MPI process only after all group members have entered the call.

If comm is an inter-communicator, MPI_BARRIER involves two groups. The call returns at MPI processes in one group (group A) of the inter-communicator only after all members of the other group (group B) have entered the call (and vice versa). An MPI process may return from the call before all MPI processes in its own group have entered the call.


PreviousUpNext
Up: Collective Communication Next: Broadcast Previous: Specifics for Inter-Communicator Collective Operations


Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023