SHMEM_BARRIER_ALL(3)SHMEM_BARRIER_ALL(3)NAME
barrier, shmem_barrier_all - Registers the arrival of a processing
element (PE) at a barrier and suspends PE execution until all other
PEs arrive at the barrier
SYNOPSIS
C or C++:
void barrier(void);
void shmem_barrier_all(void);
Fortran:
CALL BARRIER
CALL SHMEM_BARRIER_ALL
DESCRIPTION
The shmem_barrier_all function registers the arrival of a PE at a
barrier. Barriers are a fast mechanism for synchronizing all PEs at
once. This routine causes a PE to suspend execution until all PEs
have called shmem_barrier_all. This function must be used with PEs
started by start_pes(3).
Prior to synchronizing with other PEs, shmem_barrier_all ensures
completion of all previously issued local memory stores and remote
memory updates issued via shared memory routine calls such as
shmem_put32(3).
EXAMPLESsetup_data()
{
if (_my_pe() == 0) {
setup();
}
/*
* Force all tasks to wait for PE 0 to complete
* routine setup().
*/
shmem_barrier_all();
}
SEE ALSOshmem_barrier(3), start_pes(3),