Skip to content

Commit

Permalink
Add PMIX_QUERY_ABI_VERSION
Browse files Browse the repository at this point in the history
 * Ref Issue #365
 * Add a `PMIX_QUERY_ABI_VERSION` attribute that can be passed to
   `PMIx_Query_info` to access the ABI version implementated by the
   associated PMIx library.
 * Add init/finalize exception for some attributes passed to query

Signed-off-by: Joshua Hursey <[email protected]>
  • Loading branch information
jjhursey committed Apr 11, 2022
1 parent 6e13889 commit a80c854
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Chap_API_Sync_Access.tex
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,17 @@ \subsection{\code{PMIx_Query_info}}

The returned \refarg{status} indicates if requested data was found or not. The returned \refarg{info} array will contain a \refattr{PMIX_QUERY_RESULTS} element for each query of the \refarg{queries} array. If qualifiers were included in the query, then the first element of each results array shall contain the \refattr{PMIX_QUERY_QUALIFIERS} key with a \refstruct{pmix_data_array_t} containing the qualifiers. The remaining \refstruct{pmix_info_t} shall contain the results of the query, one entry for each key that was found. Note that duplicate keys in the \refarg{queries} array shall result in duplicate responses within the constraints of the accompanying qualifiers. The caller is responsible for releasing the returned array.

The \refapi{PMIx_Query_info} operation is expected to be called between initialization (e.g., \refapi{PMIx_Init}) and finalization (e.g., \refapi{PMIx_Finalize}) with the exeption of calling the blocking query \ac{API} exclusively with the following set of query attributes:
\begin{compactitem}
\item \refattr{PMIX_QUERY_ABI_VERSION}
\end{compactitem}
If this operation is called exclusively with one or more of those attributes then the result is computed locally to the \ac{PMIx} implementation and returns the associated value.

\rationalestart
Applications that wish to query the \ac{ABI} level supported by the \ac{PMIx} implementation wish to do so before calling any initialization routine.
This allows such applications to query the \ac{ABI} level and take action based on that information which might include calling the initialization routine in a different manner and/or setting up the environment before the \ac{PMIx} implementation is initialized.
\rationaleend

\adviceimplstart
Information returned from \refapi{PMIx_Query_info} shall be locally cached so that retrieval by subsequent calls to \refapi{PMIx_Get}, \refapi{PMIx_Query_info}, or \refapi{PMIx_Query_info_nb} can succeed with minimal overhead. The local cache shall be checked prior to querying the \ac{PMIx} server and/or the host environment. Queries that include the \refattr{PMIX_QUERY_REFRESH_CACHE} attribute shall bypass the local cache and retrieve a new value for the query, refreshing the values in the cache upon return.
\adviceimplend
Expand Down Expand Up @@ -771,6 +782,10 @@ \subsection{Query attributes}
\declareAttributeNEW{PMIX_SERVER_INFO_ARRAY}{"pmix.srv.arr"}{pmix_data_array_t}{
Array of \refstruct{pmix_info_t} about a given server, starting with its \refattr{PMIX_NSPACE} and including at least one of the rendezvous-required pieces of information.
}
%
\declareAttributeNEW{PMIX_QUERY_ABI_VERSION}{"pmix.qry.abiversion"}{char *}{
Query the \ac{ABI} version supported by the \ac{PMIx} library. The version returned will be of the form \code{"MAJOR.MINOR"}. For example. \code{"4.2"} representing version v4.2 of the \ac{PMIx} \ac{ABI}. NO QUALIFIERS.
}

\vspace{\baselineskip}
These attributes are used to query memory available and used in the system.
Expand Down
3 changes: 3 additions & 0 deletions pmix-standard.tex
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
\acrodef{MPI}[MPI]{Message Passing Interface}
\acrodef{MPE}[MPE]{Message Passing Environment}

\acrodef{API}[API]{Application Programming Interface}
\acrodef{ABI}[ABI]{Application Binary Interface}

\acrodef{RM}[RM]{Resource Manager}
\acrodef{RTE}[RTE]{RunTime Environment}
\acrodef{SMS}[SMS]{System Management Software stack}
Expand Down

0 comments on commit a80c854

Please sign in to comment.