Skip to content

Commit

Permalink
Update: Addressing feedback from WG - Oct 26
Browse files Browse the repository at this point in the history
  • Loading branch information
manjugv committed Oct 26, 2020
1 parent 3d12fe3 commit 2683ab3
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 25 deletions.
28 changes: 14 additions & 14 deletions content/nb_collectives_intro.tex
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
An OpenSHMEM nonblocking collective operation, like blocking collective
An \openshmem nonblocking collective operation, like blocking collective
operation, is a group communication operation among the
participants of the team. All participants of the team are required to call the
collective operation.

\begin{enumerate}

\item Invocation semantics: The non-blocking collective routine initializes the
buffers, operation type, reduction type, and posts the collective operation. All
participants of the team should call this routine. The routine returns
immediately after posting the operation.
\item Invocation semantics: Upon invocation of a collective routine interface,
the operation is posted and returned immediately. All participants of the Team
should call this routine.

\item Collective Types: Currently, only the nonblocking alltoall, broadcast, and reduction collective
operations are supported. The reduction operations supported are defined in the
Table \ref{reducetypes}.
\item Collective Types: In the current specification, not all blocking collectives have
their nonblocking variants. The nonblocking variants supported include alltoall,
broadcast, and reduction collectives. The reduction types supported
are defined in the Table \ref{reducetypes}.

\item Completion semantics: Upon invocation, the collective operations are
posted and returns immediately. A user can learn the status of the collective operations
using the \FUNC{shmem\_collective\_test} routine and can be completed using
the \FUNC{shmem\_collective\_wait} routine.
\item Completion semantics: \openshmem programs can learn the status of the collective operations
using the \FUNC{shmem\_req\_test} routine and can be completed using
the \FUNC{shmem\_req\_wait} routine.

\item Threads: While using SHMEM\_THREAD\_MULTIPLE, the \openshmem
programs are allowed to call multiple collective operations on different threads
and the same Team. The collective operations invoked on different threads
are ordered by user-provided tag. When the user does not provide the tag, the
library generates the tag and establishes the order.
are ordered by user-provided tag. The user may choose to not order the
collective operations by using the library constant
\CONST{SHMEM\_COLL\_UNORDERED} instead of specifying the tag.

\end{enumerate}

Expand Down
15 changes: 11 additions & 4 deletions content/shmem_broadcast_nb.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%% C11
\begin{C11synopsis}
int @\FuncDecl{shmem\_broadcast\_nb}@(shmem_team_t team, TYPE *dest, const TYPE
*source, size_t nelems, int PE_root,uint32_t tag, shmem_req_h *request);
*source, size_t nelems, int PE_root, uint32_t tag, shmem_req_h *request);
\end{C11synopsis}
where \TYPE{} is one of the standard \ac{RMA} types specified by Table \ref{stdrmatypes}.

Expand Down Expand Up @@ -59,9 +59,16 @@
\VAR{PE\_root} must be passed by all \acp{PE} participating in the
collective operation.

A call to the nonblocking broadcast routine returns immediately without
necessarily completing the operation. The operation is completed after a
call to \FUNC{shmem\_collective\_test} or \FUNC{shmem\_collective\_wait}.
A call to the nonblocking broadcast routine posts the operation and returns
immediately without necessarily completing the operation. On the successful
post of the operation, an opaque request handle is created and returned. The
operation is completed after a call to \FUNC{shmem\_req\_test} or
\FUNC{shmem\_req\_wait}. When the operation is complete, the request handle
is deallocated and cannot be reused.

The nonblocking broadcast routine is ordered according to the user-defined tag.
If \CONST{SHMEM\_COLL\_UNORDERED} is used instead of a tag, the collective
operations are not ordered.

Like blocking broadcast, before any \ac{PE} calls a broadcast routine, the following
conditions must be ensured:
Expand Down
13 changes: 6 additions & 7 deletions content/shmem_collective_test.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,30 @@
\begin{apidefinition}

\begin{Csynopsis}
int @\FuncDecl{shmem\_collective\_test}@(shmem_req_h request, int *flag);
int @\FuncDecl{shmem\_req\_test}@(shmem_req_t request);
\end{Csynopsis}

\begin{apiarguments}

\apiargument{IN}{request}{Request representing a outstanding collective}
\apiargument{IN}{flag}{Variable indicating the status of the request}

\end{apiarguments}

\apidescription{
A call to \FUNC{shmem\_collective\_test} returns immediately. If the
A call to \FUNC{shmem\_req\_test} returns immediately. If the
collective operation identified by the request is completed, it returns
true. The request object is deallocated. If the collective operation is not
completed, it returns false.
true (non-negative integer). The request object is deallocated. If the collective operation is not
completed, it returns zero.

In a multithreaded environment, the collective and the
\FUNC{shmem\_collective\_test} can be
\FUNC{shmem\_req\_test} can be
called by different threads. It is the responsibility of the \openshmem user
to ensure that the \FUNC{shmem\_collective\_test} operation is called after the
collective operation.
}

\apireturnvalues{
On success returns zero, otherwise returns a negative integer.
On success returns zero or one, otherwise returns a negative integer.
}

\end{apidefinition}
1 change: 1 addition & 0 deletions main_spec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ \subsubsection{\textbf{SHMEM\_COLLECT, SHMEM\_FCOLLECT}}\label{subsec:shmem_coll
\subsubsection{\textbf{SHMEM\_REDUCTIONS}}\label{subsec:shmem_reductions}
\input{content/shmem_reductions.tex}

\newpage
\subsection{Nonblocking Collective Routines}\label{subsec:nb_coll}
\input{content/nb_collectives_intro.tex}

Expand Down

0 comments on commit 2683ab3

Please sign in to comment.