diff --git a/content/nb_collectives_intro.tex b/content/nb_collectives_intro.tex index 3430024b..454ec282 100644 --- a/content/nb_collectives_intro.tex +++ b/content/nb_collectives_intro.tex @@ -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} diff --git a/content/shmem_broadcast_nb.tex b/content/shmem_broadcast_nb.tex index 635af6f0..a2fd47be 100644 --- a/content/shmem_broadcast_nb.tex +++ b/content/shmem_broadcast_nb.tex @@ -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}. @@ -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: diff --git a/content/shmem_collective_test.tex b/content/shmem_collective_test.tex index 8737afaf..657fc38c 100644 --- a/content/shmem_collective_test.tex +++ b/content/shmem_collective_test.tex @@ -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} diff --git a/main_spec.tex b/main_spec.tex index 0efa0460..37deafe4 100644 --- a/main_spec.tex +++ b/main_spec.tex @@ -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}