diff --git a/content/backmatter.tex b/content/backmatter.tex index 755d4bc0..e6fc7282 100644 --- a/content/backmatter.tex +++ b/content/backmatter.tex @@ -668,6 +668,10 @@ \section{Version 1.6} \openshmem[1.5] Table 10, and clarified the types, names, and supporting operations for team-based reductions. \ChangelogRef{teamreducetypes}% +% +\item Clarified the interaction of the \openshmem library with + subprocess creation.% + \ChangelogRef{subsec:subprocess}% \end{itemize} \section{Version 1.5} @@ -742,7 +746,7 @@ \section{Version 1.5} subsec:shmem_reductions}% % \item Clarified interoperability of \openshmem with other programming models. -\ChangelogRef{sec:interoperability}% +\ChangelogRef{sec:interoperability, subsec:mpi}% % \item Clarified restrictions on using pointers to symmetric objects. \ChangelogRef{ diff --git a/content/interoperability.tex b/content/interoperability.tex index bb9ed5a1..6fabe8ac 100644 --- a/content/interoperability.tex +++ b/content/interoperability.tex @@ -7,8 +7,48 @@ \chapter{Interoperability with Other Programming Models}\label{sec:interoperabil and advice to \openshmem library users and developers that may improve the portability and performance of hybrid programs. +\section{Subprocesses}\label{subsec:subprocess} -\section{MPI Interoperability} +In some cases, an \openshmem application may be used to create or +orchestrate other processes, which can be created through a number of +system-level interfaces. In these instances, such subprocesses are +subject to the following interoperability constraints. + +On platforms that provide the referenced POSIX\footnotemark[1] \acp{API}: + +\footnotetext[1]{POSIX, the Portable Operating System Interface, is + formally specified in IEEE Std 1003.1-2017 and The Open Group + Technical Standard Base Specifications, Issue 7.} + +\begin{itemize} +\item When \FUNC{fork} is invoked before the \openshmem library is + initialized, only one of either the parent or child processes may + initialize the \openshmem library. +\item When \FUNC{fork} is invoked within the \openshmem portion of the + program or after the \openshmem library has been finalized, the + newly created child process shall not call any \openshmem routines; + otherwise, the behavior is undefined. +\item Not all \openshmem implementations may support the use of + \FUNC{fork} within the \openshmem portion of the program or after + the \openshmem library has been finalized. + When subprocess creation is needed in these instances, the + application is encouraged to make use of the \FUNC{posix\_spawn} and + \FUNC{posix\_spawnp} \acp{API}. +\end{itemize} + +\parimpnotes{ + All \openshmem implementations should ensure interoperability with + the \FUNC{posix\_spawn} and \FUNC{posix\_spawnp} \acp{API}. + + \openshmem implementations that support implicit library + finalization for compatibility with \FUNC{start\_pes} should ensure + that child processes created after library initialization do not + implicitly call \openshmem operations as part of exit handlers + invoked during normal process termination. +} + + +\section{MPI Interoperability}\label{subsec:mpi} \openshmem and \ac{MPI} are two commonly used parallel programming models for distributed-memory systems. The user can choose to utilize both models in the same program