You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chap_API_Event.tex
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -43,8 +43,8 @@ \section{Notification and Management}
43
43
%
44
44
\end{itemize}
45
45
46
-
Users can specify the callback order of a handler within its category at the time of registration.
47
-
Users can specify that a given handler be executed before or after another target handler should both handlers appear in the event chain (the ordering is ignored if the other handler isn't included).
46
+
Users can specify the callback order of a handler within its category at the time of registration.
47
+
Users can specify that a given handler be executed before or after another target handler should both handlers appear in the event chain (the ordering is ignored if the other handler isn't included).
48
48
The ordering is dictated by providing the event handler name of the target. The name must have been assigned when the target handler was registered.
49
49
Note that ordering does not imply immediate relationships. For example, multiple handlers registered to be serviced after event handler \textit{A} will all be executed after \textit{A}, but are not guaranteed to be executed in any particular order amongst themselves.
The callback function must not be executed prior to returning from the \ac{API}, and no events corresponding to this registration may be delivered prior to the completion of the registration callback function (\refarg{cbfunc}).
118
+
No events corresponding to this registration may be delivered prior to the completion of the registration callback function (\refarg{cbfunc}).
119
119
120
120
\reqattrstart
121
121
The following attributes are required to be supported by all \ac{PMIx} libraries:
Report an event for notification via any registered event handler. This function can be called by any \ac{PMIx} process, including application processes, \ac{PMIx} servers, and \ac{SMS} elements.
510
+
Report an event for notification via any registered event handler. This function can be called by any \ac{PMIx} process, including application processes, \ac{PMIx} servers, and \ac{SMS} elements.
511
511
512
512
The \ac{PMIx} server calls this \ac{API} to report events it detected itself so that the host \ac{SMS} daemon can distribute and handle them, and to pass events given to it by its host down to any attached client processes for processing. Examples might include notification of the failure of another process, detection of an impending node failure due to rising temperatures, or an intent to preempt the application. Events may be locally generated or come from anywhere in the system.
513
513
@@ -578,7 +578,7 @@ \subsubsection{Completion Callback Function Status Codes}
Copy file name to clipboardExpand all lines: Chap_API_Query.tex
+10-11Lines changed: 10 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,18 @@ \chapter{Query Operations}
6
6
7
7
This chapter presents mechanisms for generalized queries that
8
8
access information about the host environment and the system in general.
9
-
The chapter presents the concept of a query followed by a detailed explanation
9
+
The chapter presents the concept of a query followed by a detailed explanation
10
10
of the query \acp{API} provided. The chapter compares the use of these \acp{API} with \refapi{PMIx_Get}. The chapter concludes with detailed information about how to use
11
11
the query interface to access information about what \ac{PMIx} \acp{API} an implementation supports as well as what attributes each supported \ac{API} supports.
12
12
13
13
\section{PMIx_Query_info}
14
14
As the level of interaction between applications and the host \ac{SMS} grows, so too does the need for the application to query the \ac{SMS} regarding its capabilities and state information. \ac{PMIx} provides a generalized query interface for this purpose, along with a set of standardized attribute keys to support a range of requests. This includes requests to determine the status of scheduling queues and active allocations, the scope of \ac{API} and attribute support offered by the \ac{SMS}, namespaces of active jobs, location and information about a job's processes, and information regarding available resources.
15
15
16
-
An example use-case for the \refapi{PMIx_Query_info_nb} \ac{API} is to ensure clean job completion. Time-shared systems frequently impose maximum run times when assigning jobs to resource allocations. To shut down gracefully (e.g., to write a checkpoint before termination) it is necessary for an application to periodically query the resource manager for the time remaining in its allocation. This is especially true on systems for which allocation times may be shortened or lengthened from the original time limit. Many resource managers provide \acp{API} to dynamically obtain this information, but each \ac{API} is specific to the resource manager.
17
-
\ac{PMIx} supports this use-case by defining an attribute key (\refattr{PMIX_TIME_REMAINING}) that can be used with the \refapi{PMIx_Query_info_nb} interface to obtain the number of seconds remaining in the current job allocation.
16
+
An example use-case for the \refapi{PMIx_Query_info_nb} \ac{API} is to ensure clean job completion. Time-shared systems frequently impose maximum run times when assigning jobs to resource allocations. To shut down gracefully (e.g., to write a checkpoint before termination) it is necessary for an application to periodically query the resource manager for the time remaining in its allocation. This is especially true on systems for which allocation times may be shortened or lengthened from the original time limit. Many resource managers provide \acp{API} to dynamically obtain this information, but each \ac{API} is specific to the resource manager.
17
+
\ac{PMIx} supports this use-case by defining an attribute key (\refattr{PMIX_TIME_REMAINING}) that can be used with the \refapi{PMIx_Query_info_nb} interface to obtain the number of seconds remaining in the current job allocation.
18
18
19
-
\ac{PMIx} sometimes provides multiple methods by which an application can obtain information or services. For this example,
20
-
note that one could alternatively use the \refapi{PMIx_Register_event_handler} \ac{API} to register for an event indicating incipient job termination, and then use the \refapi{PMIx_Job_control_nb} \ac{API} to request that the host \ac{SMS} generate an event a specified amount of time prior to reaching the maximum run time.
19
+
\ac{PMIx} sometimes provides multiple methods by which an application can obtain information or services. For this example,
20
+
note that one could alternatively use the \refapi{PMIx_Register_event_handler} \ac{API} to register for an event indicating incipient job termination, and then use the \refapi{PMIx_Job_control_nb} \ac{API} to request that the host \ac{SMS} generate an event a specified amount of time prior to reaching the maximum run time.
Note that inclusion of both the \refattr{PMIX_PROCID} directive and either the \refattr{PMIX_NSPACE} or the \refattr{PMIX_RANK} attribute will return a \refconst{PMIX_ERR_BAD_PARAM} result, and that the inclusion of a process identifier must apply to all keys in that \refstruct{pmix_query_t}. Queries for information on multiple specific processes therefore requires submitting multiple \refstruct{pmix_query_t} structures, each referencing one process. Directives which are not applicable to a key are ignored.
108
+
Note that inclusion of both the \refattr{PMIX_PROCID} directive and either the \refattr{PMIX_NSPACE} or the \refattr{PMIX_RANK} attribute will return a \refconst{PMIX_ERR_BAD_PARAM} result, and that the inclusion of a process identifier must apply to all keys in that \refstruct{pmix_query_t}. Queries for information on multiple specific processes therefore requires submitting multiple \refstruct{pmix_query_t} structures, each referencing one process. Directives which are not applicable to a key are ignored.
109
109
110
110
% Use of pmix_server_query_fn is covered in server interfaces chapter
Note that inclusion of both the \refattr{PMIX_PROCID} directive and either the \refattr{PMIX_NSPACE} or the \refattr{PMIX_RANK} attribute will return a \refconst{PMIX_ERR_BAD_PARAM} result, and that the inclusion of a process identifier must apply to all keys in that \refstruct{pmix_query_t}. Queries for information on multiple specific processes therefore requires submitting multiple \refstruct{pmix_query_t} structures, each referencing one process. Directives which are not applicable to a key are ignored.
230
+
Note that inclusion of both the \refattr{PMIX_PROCID} directive and either the \refattr{PMIX_NSPACE} or the \refattr{PMIX_RANK} attribute will return a \refconst{PMIX_ERR_BAD_PARAM} result, and that the inclusion of a process identifier must apply to all keys in that \refstruct{pmix_query_t}. Queries for information on multiple specific processes therefore requires submitting multiple \refstruct{pmix_query_t} structures, each referencing one process. Directives which are not applicable to a key are ignored.
232
231
233
232
% Use of pmix_server_query_fn is covered in server interfaces chapter
Copy file name to clipboardExpand all lines: pmix.sty
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -436,7 +436,7 @@
436
436
% \pasteAttributeItem Paste a copy of the Attribute declaration
437
437
% \pasteAttributeItemBegin Paste a copy of the Attribute declaration
438
438
% \pasteAttributeItemEnd with space to extend the description.
439
-
%
439
+
%
440
440
% \refconst Reference a Constant
441
441
%
442
442
@@ -537,7 +537,7 @@
537
537
% \pasteAttributeItem Paste a copy of the Attribute declaration
538
538
% \pasteAttributeItemBegin Paste a copy of the Attribute declaration
539
539
% \pasteAttributeItemEnd with space to extend the description.
540
-
%
540
+
%
541
541
% \refAttributeItem or \refattr Reference an Attribute
542
542
%
543
543
@@ -897,7 +897,7 @@
897
897
\newcommand{\returnstart}{Returns PMIX_SUCCESS or one of the following error codes when the condition described occurs:}
898
898
\newcommand{\returnend}{If none of the above return codes are appropriate, then an implementation must return either a general \ac{PMIx} error code or an implementation defined error code as described in Section \ref{api:struct:errors}.}
899
899
\newcommand{\returnsimple}{Returns \refconst{PMIX_SUCCESS} or a negative value indicating the error.}
900
-
\newcommand{\returnsimplenb}{A successful return indicates that the request is being processed and the result will be returned in the provided \refarg{cbfunc}. Note that the library must not invoke the callback function prior to returning from the \ac{API}. The callback function, \refarg{cbfunc}, is only called when \refconst{PMIX_SUCCESS} is returned.}
900
+
\newcommand{\returnsimplenb}{A successful return indicates that the request is being processed and the result will be returned in the provided \refarg{cbfunc}. The callback function, \refarg{cbfunc}, is only called when \refconst{PMIX_SUCCESS} is returned.}
0 commit comments