Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for put with signal operation #218

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fd54dd3
Add initial support for put with signal
naveen-rn May 24, 2018
2c4075c
Update put+signal after RMA WG meeting
naveen-rn May 24, 2018
83fd993
RM memory segment reference from put_signal notes
naveen-rn May 26, 2018
5680e75
rm ping-pong and add ring-bcast for put_sig example
naveen-rn May 26, 2018
7c8e3bb
add changelog for blocking put_signal
naveen-rn May 26, 2018
86981ad
Implement initial reviews for put-with-sig
naveen-rn Jun 29, 2018
643f4d0
Implement reviews for put-with-sig - draft 2
naveen-rn Jun 29, 2018
fce2079
Fix example code after put-with-signal reading
naveen-rn Jul 23, 2018
a67a5f3
Reword signal argument defn as per review
naveen-rn Aug 7, 2018
8f55c03
Update sig_addr dst data object kind explanation
naveen-rn Aug 8, 2018
dc36e68
Add put-with-signal in p2p-sync intro
naveen-rn Sep 10, 2018
34a33e5
Add restrict qualifier to sig_addr
naveen-rn Sep 10, 2018
ecfdb21
RM reference to put-with-signal from p2p sync intro
naveen-rn Oct 8, 2018
5c67d33
RM restrict qualifier from the put-with-signal usage
naveen-rn Oct 8, 2018
8cd7a55
Add new context arg explanation in PWS
naveen-rn Oct 8, 2018
47bc318
Fix review comments for PWS example
naveen-rn Oct 8, 2018
2466053
Duplicate PSW explanation from API summary to description
naveen-rn Oct 8, 2018
2662d76
Update the put-with-signal example
naveen-rn Oct 11, 2018
266564e
Adding overlapping semantics in put-with-signal
naveen-rn Oct 18, 2018
9e879c4
Reorder RMA operations in put-with-signal example
naveen-rn Oct 22, 2018
6c20a84
Explicitly state the signal update is AMO
naveen-rn Jan 8, 2019
441d681
Move NBI put-with-signal apiimpnotes to apinotes
naveen-rn Jan 9, 2019
c8ab483
Change put-with-signal in backmatter
naveen-rn Jan 12, 2019
45fef4a
RM unnecessary \signal and use \VAR{signal} instead
naveen-rn Jan 12, 2019
5ad32c7
Fix \VAR usage correctly for dest and source
naveen-rn Jan 12, 2019
ada81c9
RM unnecessary restrict qualifier from macros
naveen-rn Jan 12, 2019
0908eda
Reframe signal-put compatibility with p2p syncs
naveen-rn Jan 15, 2019
da476d8
Add support for different sig update operations
naveen-rn Apr 11, 2019
3d300e9
Update put-with-signal operation
naveen-rn May 3, 2019
cee7f53
Reframe the atomicity guarantees for p-w-s
naveen-rn May 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions content/library_constants.tex
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@
See Section~\ref{subsec:shmem_ctx_create} for more detail about its use.
\tabularnewline \hline
%%
\color{ForestGreen}
\LibConstDecl{SHMEM\_SIGNAL\_SET} &
\color{ForestGreen}
An integer constant expression corresponding to the signal update set operation.
See Section~\ref{subsec:shmem_put_signal} for more detail about its use.
\tabularnewline \hline
%%
\color{ForestGreen}
\LibConstDecl{SHMEM\_SIGNAL\_ADD} &
\color{ForestGreen}
An integer constant expression corresponding to the signal update add operation.
See Section~\ref{subsec:shmem_put_signal} for more detail about its use.
\tabularnewline \hline
%%
\LibConstDecl{SHMEM\_SYNC\_VALUE}
\begin{DeprecateBlock}
\LibConstDecl{\_SHMEM\_SYNC\_VALUE}
Expand Down
62 changes: 36 additions & 26 deletions content/shmem_put_signal.tex
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
\color{ForestGreen}
\apisummary{
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 setting a remote flag to signal completion.
and subsequently update a remote flag to signal completion.
}

\begin{apidefinition}

\begin{C11synopsis}
void @\FuncDecl{shmem\_put\_signal}@(TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_put\_signal}@(shmem_ctx_t ctx, TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_put\_signal}@(TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int sig_op, int pe);
void @\FuncDecl{shmem\_put\_signal}@(shmem_ctx_t ctx, TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int sig_op, int pe);
\end{C11synopsis}
where \TYPE{} is one of the standard \ac{RMA} types specified by Table \ref{stdrmatypes}.

\begin{Csynopsis}
void @\FuncDecl{shmem\_\FuncParam{TYPENAME}\_put\_signal}@(TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_\FuncParam{TYPENAME}\_put\_signal}@(shmem_ctx_t ctx, TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_\FuncParam{TYPENAME}\_put\_signal}@(TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int sig_op, int pe);
void @\FuncDecl{shmem\_ctx\_\FuncParam{TYPENAME}\_put\_signal}@(shmem_ctx_t ctx, TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int sig_op, int pe);
\end{Csynopsis}
where \TYPE{} is one of the standard \ac{RMA} types and has a corresponding \TYPENAME{} specified by Table \ref{stdrmatypes}.

\begin{CsynopsisCol}
void @\FuncDecl{shmem\_put\FuncParam{SIZE}\_signal}@(void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_put\FuncParam{SIZE}\_signal}@(shmem_ctx_t ctx, void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_put\FuncParam{SIZE}\_signal}@(void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int sig_op, int pe);
void @\FuncDecl{shmem\_ctx\_put\FuncParam{SIZE}\_signal}@(shmem_ctx_t ctx, void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int sig_op, int pe);
\end{CsynopsisCol}
where \SIZE{} is one of \CONST{8, 16, 32, 64, 128}.
jdinan marked this conversation as resolved.
Show resolved Hide resolved

\begin{CsynopsisCol}
void @\FuncDecl{shmem\_putmem\_signal}@(void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_putmem\_signal}@(shmem_ctx_t ctx, void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_putmem\_signal}@(void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int sig_op, int pe);
void @\FuncDecl{shmem\_ctx\_putmem\_signal}@(shmem_ctx_t ctx, void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int sig_op, int pe);
\end{CsynopsisCol}

\begin{apiarguments}
Expand All @@ -43,17 +44,23 @@
remotely accessible.}
\apiargument{IN}{signal}{Unsigned 64-bit value that is assigned to the
remote \VAR{sig\_addr} signal data object.}
\apiargument{IN}{sig\_op}{Signal operator that represents the type of update
to be performed to the remote \VAR{sig\_addr} signal data object.}
\apiargument{IN}{pe}{\ac{PE} number of the remote \ac{PE}.}
\end{apiarguments}

\apidescription{
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 setting a remote flag to signal completion. The routines
and subsequently update a remote flag to signal completion. The routines
return after the data has been copied out of the \source{} array on the
local \ac{PE}. The delivery of \VAR{signal} flag on the remote \ac{PE}
indicates the delivery of its corresponding \dest{} data words into the
data object on the remote \ac{PE}.
local \ac{PE}.

The \VAR{sig\_op} signal operator determines the type of update to be
performed on the remote \VAR{sig\_addr} signal data object. The completion
of signal update based on the \VAR{sig\_op} signal operator using the
\VAR{signal} flag on the remote \ac{PE} indicates the delivery of its
corresponding \dest{} data words into the data object on the remote \ac{PE}.
}
jdinan marked this conversation as resolved.
Show resolved Hide resolved

\apireturnvalues{
Expand All @@ -68,19 +75,21 @@

The \VAR{sig\_addr} and \dest{} may not be overlapping in memory.

The delivery of \VAR{signal} flag on the remote \ac{PE} indicates only the
delivery of its corresponding \dest{} data words into the data object on
the remote \ac{PE}. Without a memory-ordering operation, there is no implied
ordering between the delivery of the signal word of a put-with-signal
routine and another data transfer. For example, the delivery of the signal
word in a sequence consisting of a put routine followed by a put-with-signal
routine does not imply delivery of the put routine's data.

The signal set by the put-with-signal routines is compatible
with all point-to-point synchronization interfaces. The delivery of
\VAR{signal} flag on the remote \ac{PE} must not cause partial updates. This
requires the update on \VAR{signal} flag to be an atomic operation, with
atomicity guarantees described in Section~\ref{subsec:amo_guarantees}.
The completion of signal update using the \VAR{signal} flag on the remote
\ac{PE} indicates only the delivery of its corresponding \dest{} data words
into the data object on the remote \ac{PE}. Without a memory-ordering
operation, there is no implied ordering between the signal update of a
put-with-signal routine and another data transfer. For example, the
completion of the signal update in a sequence consisting of a put routine
followed by a put-with-signal routine does not imply delivery of the put
routine's data.

The signal update by the put-with-signal routines is compatible with all
point-to-point synchronization interfaces. The delivery of \VAR{signal} flag
based on the \VAR{sig\_op} signal operator on the remote \ac{PE} must not
cause partial updates. Only concurrent accesses on \VAR{sig\_addr} by
different signal update operations using the same signal update operator is
guaranteed to be exclusive.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to clarify what "exclusive" means in this context.

}

\begin{apiexamples}
Expand All @@ -95,3 +104,4 @@
\end{apiexamples}

\end{apidefinition}
\color{black}
4 changes: 2 additions & 2 deletions example_code/shmem_put_signal_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ int main(void)
uint64_t *data = shmem_calloc(size, sizeof(uint64_t));

if (me == 0) {
shmem_put_signal(data, message, size, &sig_addr, 1, pe);
shmem_put_signal(data, message, size, &sig_addr, 1, SHMEM_SIGNAL_SET, pe);
} else {
shmem_wait_until(&sig_addr, SHMEM_CMP_EQ, 1);
shmem_put_signal(data, data, size, &sig_addr, 1, pe);
shmem_put_signal(data, data, size, &sig_addr, 1, SHMEM_SIGNAL_SET, pe);
}
jdinan marked this conversation as resolved.
Show resolved Hide resolved

free(message);
Expand Down