.\" Man page generated from reStructuredText. . .TH "SHMEM_BARRIER" "3" "Jul 22, 2024" "" "Open MPI" . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .sp \fI\%shmem_barrier\fP \- Performs a barrier operation on a subset of processing elements (PEs). .SH SYNOPSIS .sp C or C++: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C #include void shmem_barrier(int PE_start, int logPE_stride, int PE_size, long *pSync) .ft P .fi .UNINDENT .UNINDENT .sp Fortran: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C INCLUDE "mpp/shmem.fh" INTEGER PE_start, logPE_stride, PE_size INTEGER pSync(SHMEM_BARRIER_SYNC_SIZE) CALL SHMEM_BARRIER(PE_start, logPE_stride, PE_size, pSync) .ft P .fi .UNINDENT .UNINDENT .SH DESCRIPTION .sp The \fI\%shmem_barrier\fP routine does not return until the subset of PEs specified by \fBPE_start\fP, \fBlogPE_stride\fP and \fBPE_size\fP, has entered this routine at the same point of the execution path. .sp As with all SHMEM collective routines, each of these routines assumes that only PEs in the active set call the routine. If a PE not in the active set calls a SHMEM collective routine, undefined behavior results. .sp The arguments are as follows: .INDENT 0.0 .TP .B PE_start The lowest virtual PE number of the active set of PEs. PE_start must be of type integer. If you are using Fortran, it must be a default integer value. .TP .B logPE_stride The log (base 2) of the stride between consecutive virtual PE numbers in the active set. logPE_stride must be of type integer. If you are using Fortran, it must be a default integer value. .TP .B PE_size The number of PEs in the active set. PE_size must be of type integer. If you are using Fortran, it must be a default integer value. .TP .B pSync A symmetric work array. In C/C++, pSync must be of type int and size _SHMEM_BARRIER_SYNC_SIZE. In Fortran, pSync must be of type integer and size SHMEM_BARRIER_SYNC_SIZE. If you are using Fortran, it must be a default integer type. Every element of this array must be initialized to 0 before any of the PEs in the active set enter \fI\%shmem_barrier\fP the first time. .UNINDENT .sp The values of arguments PE_start, logPE_stride, and PE_size must be equal on all PEs in the active set. The same work array must be passed in pSync to all PEs in the active set. .sp \fI\%shmem_barrier\fP ensures that all previously issued local stores and previously issued remote memory updates done by any of the PEs in the active set (by using SHMEM calls, for example shmem_put(3)) are complete before returning. .sp The same pSync array may be reused on consecutive calls to \fI\%shmem_barrier\fP if the same active PE set is used. .SH NOTES .sp The term symmetric is defined in \fIintro_shmem\fP(3). .sp If the pSync array is initialized at run time, be sure to use some type of synchronization, for example, a call to \fI\%shmem_barrier_all\fP(3), before calling \fI\%shmem_barrier\fP for the first time. .sp If the active set does not change, \fI\%shmem_barrier\fP can be called repeatedly with the same pSync array. No additional synchronization beyond that implied by \fI\%shmem_barrier\fP itself is necessary in this case. .SH EXAMPLES .sp C/C++ example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C shmem_barrier(PE_start, logPE_stride, size, pSync); .ft P .fi .UNINDENT .UNINDENT .sp Fortran example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C INTEGER PSYNC(SHMEM_BARRIER_SYNC_SIZE) INTEGER PE_START, LOGPE_STRIDE, PE_SIZE, PSYNC DATA PSYNC /SHMEM_BARRIER_SYNC_SIZE*0/ CALL SHMEM_BARRIER(PE_START, LOGPE_STRIDE, PE_SIZE, PSYNC) .ft P .fi .UNINDENT .UNINDENT .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 \fIintro_shmem\fP(3) \fIshmem_barrier_all\fP(3) .UNINDENT .UNINDENT .SH COPYRIGHT 2003-2024, The Open MPI Community .\" Generated by docutils manpage writer. .