Skip to content

Commit

Permalink
Merge branch 'master' into pr/ib-ops
Browse files Browse the repository at this point in the history
  • Loading branch information
jdinan authored Oct 4, 2023
2 parents 0d94cc1 + 91a2495 commit 387ef8e
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 11 deletions.
9 changes: 8 additions & 1 deletion content/backmatter.tex
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,14 @@ \section{Version 1.6}
\FUNC{shmem\_ibput}.
\ChangelogRef{subsec:shmem_ibget, subsec:shmem_ibput}%
%
\item Added \FUNC{shmem\_signal\_add} and \FUNC{shmem\_signal\_set} to
update a remote flag without associated data transfer of a put-with-signal operation.
\ChangelogRef{subsec:shmem_signal_add, subsec:shmem_signal_set}%
%
\item Clarified that \OPR{Fence} operations only guarantee ordering for
operations that are performed on the same context.
\ChangelogRef{subsec:shmem_fence}%
%
\item Added a team-based pointer query routine:
\FUNC{shmem\_team\_ptr}.
\ChangelogRef{subsec:shmem_team_ptr}%
Expand All @@ -691,7 +699,6 @@ \section{Version 1.6}
2 to enable profiling with profile library defined effects and
additional arguments.
\ChangelogRef{subsec:shmem_pcontrol}
>>>>>>> master
%
\end{itemize}

Expand Down
2 changes: 1 addition & 1 deletion content/shmem_fence.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
\ac{PE} on the given context prior
to the call to \FUNC{shmem\_fence} are guaranteed to be delivered before any
subsequent operations on symmetric data
objects to the same \ac{PE}. \FUNC{shmem\_fence} guarantees order of delivery,
objects to the same \ac{PE} on the same context. \FUNC{shmem\_fence} guarantees order of delivery,
not completion. It does not guarantee order of delivery of nonblocking
\GET{} or values fetched by nonblocking \ac{AMO} routines.
If \VAR{ctx} has the value \CONST{SHMEM\_CTX\_INVALID}, no operation is
Expand Down
4 changes: 3 additions & 1 deletion content/shmem_reductions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,11 @@ \subsubsubsection{PROD}
provides one element for each reduction. The results of the reductions are placed in the
\dest{} array on all \acp{PE} participating in the reduction.

The same \source{} and \dest{} arrays must be passed by all PEs that
participate in the collective.
The \source{} and \dest{} arguments must either be the same symmetric
address, or two different symmetric addresses corresponding to buffers that
do not overlap in memory. That is, they must be completely overlapping or
do not overlap in memory. That is, they must be completely overlapping (sometimes referred to as an ``in place'' reduction) or
completely disjoint.

Team-based reduction routines operate over all \acp{PE} in the provided team argument. All
Expand Down
47 changes: 47 additions & 0 deletions content/shmem_signal_add.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
\apisummary{
Adds to a signal value of a remote data object.
}

\begin{apidefinition}

\begin{C11synopsis}
void @\FuncDecl{shmem\_signal\_add}@(shmem_ctx_t ctx, const uint64_t *sig_addr, uint64_t signal, int pe);
\end{C11synopsis}

\begin{Csynopsis}
void @\FuncDecl{shmem\_signal\_add}@(const uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_signal\_add}@(shmem_ctx_t ctx, const uint64_t *sig_addr, uint64_t signal, int pe);
\end{Csynopsis}

\begin{apiarguments}
\apiargument{IN}{ctx}{
A context handle specifying the context on which to perform the
operation. When this argument is not provided, the operation is
performed on the default context.
}
\apiargument{OUT}{sig\_addr}{
Symmetric address of the signal data object to be updated on the
remote \ac{PE}.
}
\apiargument{IN}{signal}{
Unsigned 64-bit value that is used for updating the remote
\VAR{sig\_addr} signal data object.
}
\apiargument{IN}{pe}{
\ac{PE} number of the remote \ac{PE}.
}
\end{apiarguments}

\apidescription{
\FUNC{shmem\_signal\_add} adds \VAR{value} to the signal data
object pointed to by \VAR{sig\_addr} on \ac{PE}~\VAR{pe}.
The update to the \VAR{sig\_addr} signal object at the calling
\ac{PE} is expected to satisfy the atomicity guarantees as described
in Section~\ref{subsec:signal_atomicity}.
}

\apireturnvalues{
None.
}

\end{apidefinition}
47 changes: 47 additions & 0 deletions content/shmem_signal_set.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
\apisummary{
Sets the signal value of a remote data object.
}

\begin{apidefinition}

\begin{C11synopsis}
void @\FuncDecl{shmem\_signal\_set}@(shmem_ctx_t ctx, const uint64_t *sig_addr, uint64_t signal, int pe);
\end{C11synopsis}

\begin{Csynopsis}
void @\FuncDecl{shmem\_signal\_set}@(const uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_signal\_set}@(shmem_ctx_t ctx, const uint64_t *sig_addr, uint64_t signal, int pe);
\end{Csynopsis}

\begin{apiarguments}
\apiargument{IN}{ctx}{
A context handle specifying the context on which to perform the
operation. When this argument is not provided, the operation is
performed on the default context.
}
\apiargument{OUT}{sig\_addr}{
Symmetric address of the signal data object to be updated on the
remote \ac{PE}.
}
\apiargument{IN}{signal}{
Unsigned 64-bit value that is used for updating the remote
\VAR{sig\_addr} signal data object.
}
\apiargument{IN}{pe}{
\ac{PE} number of the remote \ac{PE}.
}
\end{apiarguments}

\apidescription{
\FUNC{shmem\_signal\_set} writes \VAR{value} into the signal data
object pointed to by \VAR{sig\_addr} on \ac{PE}~\VAR{pe}.
The update to the \VAR{sig\_addr} signal object at the calling
\ac{PE} is expected to satisfy the atomicity guarantees as described
in Section~\ref{subsec:signal_atomicity}.
}

\apireturnvalues{
None.
}

\end{apidefinition}
30 changes: 22 additions & 8 deletions main_spec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,17 @@ \subsubsubsection{\textbf{SHMEM\_ATOMIC\_FETCH\_XOR\_NBI}}

\subsection{Signaling Operations}\label{sec:shmem_signal}
This section specifies the OpenSHMEM support for \OPR{put-with-signal},
nonblocking \OPR{put-with-signal}, and \OPR{signal-fetch} routines. The
nonblocking \OPR{put-with-signal}, and \OPR{signal-\{add, fetch, set\}} routines. The
put-with-signal routines provide a method for copying data from a contiguous
local data object to a data object on a specified \ac{PE} and subsequently
updating a remote flag to signal completion. The signal-fetch routine provides
support for fetching a signal update operation.

\openshmem \OPR{put-with-signal} routines specified in this section have two
updating a remote flag to signal completion.
The signal-add and signal-set routines provide methods for updating
the signal object without the associated data transfer of a
put-with-signal operation.
The signal-fetch routine provides support for reading a local signal value.

\openshmem \OPR{put-with-signal} and \OPR{signal-\{add, set\}}
routines specified in this section have two
variants. In one of the variants, the context handle, \VAR{ctx}, is explicitly
passed as an argument. In this variant, the operation is performed on the
specified context. If the context handle \VAR{ctx} does not correspond to a
Expand All @@ -321,16 +325,20 @@ \subsection{Signaling Operations}\label{sec:shmem_signal}
\subsubsection{Atomicity Guarantees for Signaling Operations}
\label{subsec:signal_atomicity}
All signaling operations put-with-signal, nonblocking put-with-signal, and
signal-fetch are performed on a signal data object, a remotely accessible
signal-\{add, fetch, set\} are performed on a signal data object, a remotely accessible
symmetric object of type \VAR{uint64\_t}. A signal operator in the
put-with-signal routine is a \openshmem library constant that determines the
put-with-signal routine is an \openshmem library constant that determines the
type of update to be performed as a signal on the signal data object.

All signaling operations on the signal data object completes as if performed
All signaling operations on the signal data object complete as if performed
atomically with respect to the following:
\begin{itemize}
\item other blocking or nonblocking variant of the put-with-signal routine
that updates the signal data object using the same signal update operator;
\item signal-add routine when the put-with-signal routine uses the
\LibConstRef{SHMEM\_SIGNAL\_ADD} signal operator;
\item signal-set routine when the put-with-signal routine uses the
\LibConstRef{SHMEM\_SIGNAL\_SET} signal operator;
\item signal-fetch routine that fetches the signal data object; and
\item any point-to-point synchronization routine that accesses the signal
data object.
Expand Down Expand Up @@ -360,9 +368,15 @@ \subsubsection{\textbf{SHMEM\_PUT\_SIGNAL}}\label{subsec:shmem_put_signal}
\subsubsection{\textbf{SHMEM\_PUT\_SIGNAL\_NBI}}\label{subsec:shmem_put_signal_nbi}
\input{content/shmem_put_signal_nbi.tex}

\subsubsection{\textbf{SHMEM\_SIGNAL\_ADD}}\label{subsec:shmem_signal_add}
\input{content/shmem_signal_add.tex}

\subsubsection{\textbf{SHMEM\_SIGNAL\_FETCH}}\label{subsec:shmem_signal_fetch}
\input{content/shmem_signal_fetch.tex}

\subsubsection{\textbf{SHMEM\_SIGNAL\_SET}}\label{subsec:shmem_signal_set}
\input{content/shmem_signal_set.tex}



\subsection{Collective Routines}\label{subsec:coll}
Expand Down

0 comments on commit 387ef8e

Please sign in to comment.