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
Add a directive indicating that a reqd attribute has been processed (#322)
* Add a directive indicating that a reqd attribute has been processed
Each level (client, server, host) needs to know if some prior level has
already processed a required attribute so it can correctly deal with it.
Define an info directive for that purpose, and provide macros to set and
test for that directive.
Signed-off-by: Ralph Castain <[email protected]>
Co-authored-by: Josh Hursey <[email protected]>
Copy file name to clipboardExpand all lines: Chap_API_Server.tex
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2019,10 +2019,12 @@ \section{Server Function Pointers}
2019
2019
2020
2020
\ac{PMIx} utilizes a "function-shipping" approach to support for implementing the server-side of the protocol. This method allows \acp{RM} to implement the server without being burdened with \ac{PMIx} internal details. When a request is received from the client, the corresponding server function will be called with the information.
2021
2021
2022
-
Any functions not supported by the \ac{RM} can be indicated by a \code{NULL} for the function pointer. \ac{PMIx} implementations are required to return a \refconst{PMIX_ERR_NOT_SUPPORTED} status to all calls to functions that require host environment support and are not backed by a corresponding server module entry.
2022
+
Any functions not supported by the \ac{RM} can be indicated by a \code{NULL} for the function pointer. \ac{PMIx} implementations are required to return a \refconst{PMIX_ERR_NOT_SUPPORTED} status to all calls to functions that require host environment support and are not backed by a corresponding server module entry. Host environments may, if they choose, include a function pointer for operations they have not yet implemented and simply return \refconst{PMIX_ERR_NOT_SUPPORTED}.
2023
+
2024
+
Functions that accept directives (i.e., arrays of \refstruct{pmix_info_t} structures) must check any provided directives for those marked as \emph{required} via the \refconst{PMIX_INFO_REQD} flag. \ac{PMIx} client and server libraries are required to mark any such directives with the \refconst{PMIX_INFO_REQD_PROCESSED} flag should they have handled the request. Any required directive that has not been marked therefore becomes the responsibility of the host environment. If a required directive that hasn't been processed by a lower level cannot be supported by the host, then the \refconst{PMIX_ERR_NOT_SUPPORTED} error constant must be returned. If the directive can be processed by the host, then the host shall do so and mark the attribute with the \refconst{PMIX_INFO_REQD_PROCESSED} flag.
2023
2025
2024
2026
The host \ac{RM} will provide the function pointers in a \refapi{pmix_server_module_t} structure passed to \refapi{PMIx_server_init}.
2025
-
That module structure and associated function references are defined in this section.
2027
+
The module structure and associated function references are defined in this section.
2026
2028
2027
2029
\advicermstart
2028
2030
For performance purposes, the host server is required to return as quickly as possible from all functions. Execution of
Copy file name to clipboardExpand all lines: Chap_API_Struct.tex
+41Lines changed: 41 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1455,6 +1455,9 @@ \subsection{Info Type Directives}
1455
1455
\declareconstitem{PMIX_INFO_REQD}
1456
1456
The behavior defined in the \refstruct{pmix_info_t} array is required, and not optional. This is a bit-mask value.
1457
1457
%
1458
+
\declareconstitemNEW{PMIX_INFO_REQD_PROCESSED}
1459
+
Mark that this required attribute has been processed. A required attribute can be handled at any level - the \ac{PMIx} client library might take care of it, or it may be resolved by the \ac{PMIx} server library, or it may pass up to the host environment for handling. If a level does not recognize or support the required attribute, it is required to pass it upwards to give the next level an opportunity to process it. Thus, the host environment (or the server library if the host does not support the given operation) must know if a lower level has handled the requirement so it can return a \refconst{PMIX_ERR_NOT_SUPPORTED} error status if the host itself cannot meet the request. Upon processing the request, the level must therefore mark the attribute with this directive to alert any subsequent levels that the requirement has been met.
1460
+
%
1458
1461
\declareconstitem{PMIX_INFO_ARRAY_END}
1459
1462
Mark that this \refstruct{pmix_info_t} struct is at the end of an array created by the \refmacro{PMIX_INFO_CREATE} macro. This is a bit-mask value.
1460
1463
%
@@ -1548,6 +1551,44 @@ \subsubsection{Info Directive support macros}
1548
1551
1549
1552
Test the \refconst{PMIX_INFO_REQD} flag in a \refstruct{pmix_info_t} structure, returning \code{true} if the flag is \textit{not} set.
1550
1553
1554
+
%%%%%%%%%%%
1555
+
\littleheader{Mark a required attribute as processed}
1556
+
\declaremacro{PMIX_INFO_PROCESSED}
1557
+
1558
+
Mark that a required \refstruct{pmix_info_t} structure has been processed.
1559
+
1560
+
\versionMarker{4.0}
1561
+
\cspecificstart
1562
+
\begin{codepar}
1563
+
PMIX_INFO_PROCESSED(info);
1564
+
\end{codepar}
1565
+
\cspecificend
1566
+
1567
+
\begin{arglist}
1568
+
\argin{info}{Pointer to the \refstruct{pmix_info_t} (pointer to \refstruct{pmix_info_t})}
1569
+
\end{arglist}
1570
+
1571
+
Set the \refconst{PMIX_INFO_REQD_PROCESSED} flag in a \refstruct{pmix_info_t} structure indicating that is has been processed.
1572
+
1573
+
%%%%%%%%%%%
1574
+
\littleheader{Test if a required attribute has been processed}
1575
+
\declaremacro{PMIX_INFO_WAS_PROCESSED}
1576
+
1577
+
Test that a required \refstruct{pmix_info_t} structure has been processed.
1578
+
1579
+
\versionMarker{4.0}
1580
+
\cspecificstart
1581
+
\begin{codepar}
1582
+
PMIX_INFO_WAS_PROCESSED(info);
1583
+
\end{codepar}
1584
+
\cspecificend
1585
+
1586
+
\begin{arglist}
1587
+
\argin{info}{Pointer to the \refstruct{pmix_info_t} (pointer to \refstruct{pmix_info_t})}
1588
+
\end{arglist}
1589
+
1590
+
Test the \refconst{PMIX_INFO_REQD_PROCESSED} flag in a \refstruct{pmix_info_t} structure.
1591
+
1551
1592
%%%%%%%%%%%
1552
1593
\littleheader{Test an info structure for \textit{end of array} directive}
0 commit comments