1. Page Index
  2. 1. Short Description
  3. 2. Syntax
  4. 2.1. C syntax
  5. 2.2. C++ syntax
  6. 3. Parameters
  7. 3.1. Input
  8. 4. Description
  9. 5. Errors

MPI_Barrier

Short Description

Blocks until all processes have reached this routine.

Syntax

C syntax

#include <mpi.h>
int MPI_Barrier(MPI_Comm comm)

C++ syntax

#include <mpi.h>
void MPI::Comm::Barrier() const = 0

Parameters

Input

comm Communicator (handle).

Description

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

Imagen MPI_barrier (Click on the image to watch the animation)

Errors

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).
Created by: Daniel Guerrero Martínez y Sergio Rodríguez Lumley 2010

Valid HTML 4.01 Transitional