Skip to content

Commit

Permalink
sessions: remove SESSION_SAME_AMO hint for now...
Browse files Browse the repository at this point in the history
  • Loading branch information
davidozog committed May 9, 2024
1 parent 26f3cc0 commit e22a3f1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
26 changes: 0 additions & 26 deletions content/shmem_ctx_session_start.tex
Original file line number Diff line number Diff line change
Expand Up @@ -97,32 +97,6 @@
about \VAR{shmem\_ctx\_session\_config\_t} parameters.
} \hline

\sessiontablerow{\LibConstRef{SHMEM\_CTX\_SESSION\_SAME\_AMO}}{
The \VAR{SHMEM\_CTX\_SESSION\_SAME\_AMO} hint indicates the session will contain
a series of calls to AMO and/or signaling routines that do not differ in
their signal operators (see Section \ref{subsec:signal_operator}), atomic
operations (see Section \ref{sec:amo}), or datatypes (see
Tables~\ref{stdamotypes} and \ref{extamotypes}).
For example, this hint would apply to a session that includes \textit{only}
calls to \FUNC{shmem\_int\_atomic\_inc}.
However, this hint would not apply to a session that includes both calls to
\FUNC{shmem\_int\_atomic\_inc} and \FUNC{shmem\_int\_atomic\_fetch},
because the operation \textit{fetch} differs from \textit{increment}.
(Similarly, this hint would not apply to a session that includes both calls to
\FUNC{shmem\_int\_atomic\_inc} and \FUNC{shmem\_long\_atomic\_inc},
because the datatype \textit{long} differs from \textit{int}.)
The \VAR{SHMEM\_CTX\_SESSION\_SAME\_AMO} hint is applicable to sessions that
exclusively use \textit{either} the \VAR{SHMEM\_SIGNAL\_SET} or the
\VAR{SHMEM\_SIGNAL\_ADD} operators in signaling operations, but not both.
This hint does not restrict the application from calling other (non-atomic)
RMA routines within the session.

The \VAR{total\_ops} field of \VAR{config} indicates the expected maximum
number of calls to \openshmem RMA routines within the session.
See Section~\ref{subsec:shmem_ctx_session_config_t} for details about
\VAR{shmem\_ctx\_session\_config\_t} parameters.
} \hline

\sessiontableend

\apinotes{
Expand Down
3 changes: 1 addition & 2 deletions example_code/shmem_ctx_session_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ int main(void) {
long config_mask;
config.total_ops = N_UPDATES;
config_mask = SHMEM_CTX_SESSION_TOTAL_OPS;
long options = SHMEM_CTX_SESSION_BATCH | SHMEM_CTX_SESSION_SAME_AMO;

shmem_ctx_session_start(ctx, options, &config, config_mask);
shmem_ctx_session_start(ctx, SHMEM_CTX_SESSION_BATCH, &config, config_mask);

for (size_t i = 0; i < N_UPDATES; i++) {
int random_pe = rand() % npes;
Expand Down

0 comments on commit e22a3f1

Please sign in to comment.