MPI_BARRIER, MPI_Barrier Purpose Blocks each task until all tasks have called it. in comm C synopsis #include int MPI_Barrier(MPI_Comm comm); C++ synopsis #include mpi.h void MPI::Comm::Barrier() const; FORTRAN synopsis include 'mpif.h' or use mpi MPI_BARRIER(INTEGER COMM,INTEGER IERROR) Description This subroutine blocks until all tasks have called it. Tasks cannot exit the operation until all group members have entered. When you use this subroutine in a threads application, make sure all collective operations on a particular communicator occur in the same order at each task. See IBM Parallel Environment for AIX: MPI Programming Guide for more information on programming with MPI in a threads environment. Parameters comm is a communicator (handle) (IN) IERROR is the FORTRAN return code. It is always the last argument. Notes comm can be an intercommunicator or an intracommunicator. If comm is an intercommunicator, the barrier is performed across all tasks in the intercommunicator. In this case, all tasks in the local group of the intercommunicator can exit the barrier when all of the tasks in the remote group have entered the barrier. In the 64-bit library, this function uses a shared memory optimization among the tasks on a node. This optimization is discussed in the chapter "Using shared memory" of IBM Parallel Environment for AIX: MPI Programming Guide, and is enabled by default. This optimization is not available to 32-bit programs. Errors Fatal errors: Invalid communicator MPI not initialized MPI already finalized Related information MPE_IBARRIER