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

SC/collectives: add change logs #10

Merged
merged 11 commits into from
Feb 26, 2020
17 changes: 17 additions & 0 deletions content/backmatter.tex
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,23 @@ \section{Version 1.5}
\CONST{SHMEM\_MALLOC\_ATOMICS\_REMOTE} and \CONST{SHMEM\_MALLOC\_SIGNAL\_REMOTE}.
\\ See Section \ref{subsec:shmmallochint} and \ref{subsec:library_constants}.
%
\item Changed the team-based broadcast function to update the dest object on
nspark marked this conversation as resolved.
Show resolved Hide resolved
all PEs, including the root PE.
nspark marked this conversation as resolved.
Show resolved Hide resolved
\\ See Section \ref{subsec:shmem_broadcast}.
minsii marked this conversation as resolved.
Show resolved Hide resolved
%
\item Deprecated active-set-based collective functions.
\\ See Section \ref{subsec:coll}.
minsii marked this conversation as resolved.
Show resolved Hide resolved
%
\item Added team-based collective functions: \FUNC{shmem\_sync},
\FUNC{shmem\_broadcast\{mem\}}, \FUNC{shmem\_collect\{mem\}},\\
\FUNC{shmem\_TYPENAME\_OP\_reduce},
\FUNC{shmem\_alltoall\{mem\}}, and
\FUNC{shmem\_alltoalls\{mem\}}.
\\ See Sections \ref{subsec:shmem_sync},
\ref{subsec:shmem_broadcast}, \ref{subsec:shmem_collect},
\ref{subsec:shmem_reductions}, \ref{subsec:shmem_alltoall},
and \ref{subsec:shmem_alltoalls}.
%
\item Added support for nonblocking \ac{AMO} functions.
\\ See Section \ref{sec:amo-nbi}.
%
Expand Down
4 changes: 2 additions & 2 deletions content/collective_intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ \subsubsection*{Active-set-based collectives}
\item \FUNC{shmem\_broadcast\{32, 64\}}
\item \FUNC{shmem\_collect\{32, 64\}}
\item \FUNC{shmem\_fcollect\{32, 64\}}
\item Reduction routines for the following operations: AND, MAX, MIN, SUM, PROD, OR, XOR
\item Reduction routines for the following operations: AND, OR, XOR, MAX, MIN, SUM, PROD
\item \FUNC{shmem\_alltoall\{32, 64\}}
\item \FUNC{shmem\_alltoalls\{32, 64\}}
\end{itemize}
Expand All @@ -132,7 +132,7 @@ \subsubsection*{Team-implicit collectives}
a call to \FUNC{shmem\_ctx\_quiet} on the default context followed by a
call to \FUNC{shmem\_team\_sync} on the default team.

\subsubsection*{Error codes returned from collectives}
\subsubsection*{Error codes returned from team-based collectives}

Collective operations involving multiple \acp{PE} may return values
indicating success while other \acp{PE} are still executing the
Expand Down
2 changes: 1 addition & 1 deletion content/shmem_alltoall.tex
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
\end{itemize}

The data being sent and received are
stored in a contiguous symmetric data object. The total size of each \acp{PE}
stored in a contiguous symmetric data object. The total size of each \ac{PE}'s
\VAR{source} object and \VAR{dest} object is \VAR{nelems} times the size of
an element
times \VAR{N}, where \VAR{N} equals the number of \acp{PE} participating
Expand Down
2 changes: 1 addition & 1 deletion content/shmem_broadcast.tex
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@

\apicexample
{In the following \Cstd[11] example, the call to \FUNC{shmem\_broadcast} copies \source{}
on \ac{PE} $0$ to \dest{} on \acp{PE} $1\dots npes-1$.
on \ac{PE} $0$ to \dest{} on \acp{PE} $0\dots npes-1$.
minsii marked this conversation as resolved.
Show resolved Hide resolved

\CorCpp{} example:}
{./example_code/shmem_broadcast_example.c}
Expand Down
2 changes: 1 addition & 1 deletion content/shmem_sync.tex
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
\begin{apiexamples}

\apicexample
{The following \FUNC{shmem\_sync\_all} and \FUNC{shmem\_sync} example is
{The following \FUNC{shmem\_sync} example is
for \Cstd[11] programs:}
{./example_code/shmem_sync_example.c}
{}
Expand Down
2 changes: 1 addition & 1 deletion content/shmem_sync_all.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\apisummary{
Registers the arrival of a \ac{PE} at a synchronization point and suspends
execution until all other \acp{PE} in the default team arrive at a synchronization point. For multithreaded programs, execution is suspended
execution until all other \acp{PE} in the default team arrive at the synchronization point. For multithreaded programs, execution is suspended
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we replace "default team" with SHMEM_TEAM_WORLD or "world team"?

Copy link
Author

Choose a reason for hiding this comment

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

"default team" is used in several sections including teams, collectives, and memory management. It is defined in section 7. Library Handles.

I agree that SHMEM_TEAM_WORLD is more specific. Perhaps we want to replace it everywhere for consistency. Do we need to create separate commits for each SC? Is there a way that we can fix it in a single commit?

Copy link
Owner

Choose a reason for hiding this comment

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

I'd prefer "world team"—since, as with contexts, one could copy the handle to SHMEM_TEAM_WORLD and still refer to the same team—but this would be a "whole document" change (which I'd support).

Copy link
Author

@minsii minsii Feb 12, 2020

Choose a reason for hiding this comment

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

Good point on "world team". I created issue openshmem-org#371 to track the changes. I'd deal with the updates in separate commits and submit to the corresponding SC.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@nspark I'm fine with "world team" but we need to be precise about what that means. If one thread is calling shmem_malloc, is it a violation of the threading rules for another to call shmem_team_barrier(SHMEM_TEAM_WORLD) at the same time?

Copy link
Author

Choose a reason for hiding this comment

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

Thinking again about the example @nspark mentioned: one does handle = SHMEM_TEAM_WORLD; and uses handle in later calls. The value of handle is still the predefined SHMEM_TEAM_WORLD, and the function call reads the value but not &handle. Thus, I don't think people may confuse if the handle is a different team.

However, if we say "world team", I am afraid that people may confuse if a duplicated team of SHMEM_TEAM_WORLD (e.g., created by shmem_team_split_strided) is also a "world team".

In summary, I am now thinking SHMEM_TEAM_WORLD might be a better replacement for "default team." Does it resolve @jdinan's question, or avoid such confusion?

Copy link
Collaborator

Choose a reason for hiding this comment

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

In Section 7, you can clarify that SHMEM_TEAM_WORLD handle corresponds to the "world team". Currently it says:

Handle of type shmem_team_t that corresponds to the default team of all PEs in the OpenSHMEM program.

Copy link
Author

Choose a reason for hiding this comment

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

I am working on the default team->world team replacement now. It will be in separate PRs.

as specified by the threading model (Section \ref{subsec:thread_support}).
}

Expand Down