1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
.\" Man page generated from reStructuredText.
.
.TH "SHMEM_BARRIER" "3" "May 30, 2025" "" "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 <mpp/shmem.h>
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-2025, The Open MPI Community
.\" Generated by docutils manpage writer.
.
|