SHMEM\_BARRIER\_ALL(3) Open MPI SHMEM\_BARRIER\_ALL(3)

shmem\_barrier\_all - Suspends the execution of the calling PE until all other PEs issue a call to this particular shmem\_barrier\_all() statement.

# [SYNOPSIS](#SYNOPSIS)

C or C++:

```
#include <mpp/shmem.h>
void shmem_barrier_all(void)
```

Fortran:

```
include 'mpp/shmem.h'
CALL SHMEM_BARRIER_ALL
```

# [DESCRIPTION](#DESCRIPTION)

The shmem\_barrier\_all routine does not return until all other PEs have entered this routine at the same point of the execution path.

Prior to synchronizing with other PEs, shmem\_barrier\_all ensures completion of all previously issued local memory stores and remote memory updates issued via SHMEM functions such as shmem\_put32 &lt;#shmem-put32&gt;(3).

# [EXAMPLES](#EXAMPLES)

```
setup_data()
{


  if (shmem_my_pe() == 0) {


    setup();


  }


  /* All PEs wait for PE 0 to complete setup().  */


  shmem_barrier_all();
}
```

**See also:**

[*shmem\_barrier*(3)](/man/enterprise-packages/openmpi-cuda-13.2/shmem_barrier.3) [*shmem\_init*(3)](/man/enterprise-packages/openmpi-cuda-13.2/shmem_init.3)

# [Copyright](#Copyright)

2003-2026, The Open MPI Community

September 11, 2026

---

Document: shmem_barrier_all(3) from openmpi-cuda-13.2 5.0.11-r0 (Chainguard OS)
Source: https://github.com/open-mpi/ompi
