Open MPI logo

MPI_Barrier_init(3) man page (version 5.0.0rc2)

  |   Home   |   Support   |   FAQ   |  

« Return to documentation listing

Table of Contents

Name

MPI_Barrier, MPI_Ibarrier - Synchronization between MPI processes in a group

Syntax

C Syntax



C]#include <mpi.h>int MPI_Barrier(MPI_Comm)int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request)int MPI_barrier_init(MPI_Comm comm, MPI_Info info, MPI_Request *request)R]Fortran Syntax



C]USE MPI! or the older form: INCLUDE [aq]mpif.h[aq]MPI_BARRIER(COMM, IERROR) INTEGER COMM, IERRORMPI_IBARRIER(COMM, REQUEST, IERROR) INTEGER COMM, REQUEST, IERRORMPI_BARRIER_INIT(COMM, INFO, REQUEST, IERROR) INTEGER COMM, INFO, REQUEST, IERRORR]Fortran 2008 Syntax



C]USE mpi_f08MPI_Barrier(comm, ierror) TYPE(MPI_Comm), INTENT(IN) :: comm INTEGER, OPTIONAL, INTENT(OUT) :: ierrorMPI_Ibarrier(comm, request, ierror) TYPE(MPI_Comm), INTENT(IN) :: comm TYPE(MPI_Request), INTENT (OUT) :: request INTEGER, OPTIONAL, INTENT(OUT) :: ierrorMPI_Barrier_init(comm, info, request, ierror) TYPE(MPI_Comm), INTENT(IN) :: comm TYPE(MPI_Info), INTENT(IN) :: info TYPE(MPI_Request), INTENT (OUT) :: request INTEGER, OPTIONAL, INTENT(OUT) :: ierrorR]Input Parameter

[bu]
C]commR] : Communicator (handle).
[bu]
C]infoR] : Info (handle, persistent only). # Output Parameters
[bu]
C]requestR] : Request (handle, non-blocking only).
[bu]
C]IERRORR] : Fortran only: Error status (integer). # Description An MPI barrier completes after all groups members have entered the barrier. # When Communicator is an Inter-Communicator When the communicator is an inter-communicator, the barrier operation is performed across all processes in both groups. All processes in the first group may exit the barrier when all processes in the second group have entered the barrier. # Errors Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with C]MPI_Comm_set_errhandlerR]; the predefined error handler C]MPI_ERRORS_RETURNR] may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. # See Also C]MPI_BcastR](3)


Table of Contents

« Return to documentation listing