Skip to content

Commit 35f1dea

Browse files
committed
Replace the "log" server module fn with a "log2"
The current "log" server module function was defined with a void return. This contrasts with most of the other module functions which characteristically return a pmix_status_t, thereby supporting a return status that indicates if the function is not supported or has been atomically completed. Add a replacement "log2" function that is identical in signature except for returning a pmix_status_t instead of void. Deprecate the current "log" function. Signed-off-by: Ralph Castain <[email protected]>
1 parent 46c63a5 commit 35f1dea

File tree

1 file changed

+77
-3
lines changed

1 file changed

+77
-3
lines changed

Chap_API_Server.tex

Lines changed: 77 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ \subsection{\code{PMIx_server_deregister_resources}}
955955

956956
A \code{NULL} \refarg{cbfunc} reference indicates that the function is to be executed as a blocking operation.
957957
% TODO: If this is one of those functions that can be blocking or non-blocking, then
958-
% it needs a full return code explanation, not the returnsimple
958+
% it needs a full return code explanation, not the returnsimple
959959

960960
\advicermend
961961

@@ -2009,6 +2009,7 @@ \subsection{\code{pmix_server_module_t} Module}
20092009
pmix_server_grp_fn_t group;
20102010
pmix_server_fabric_fn_t fabric;
20112011
pmix_server_client_connected2_fn_t client_connected2;
2012+
pmix_server_log2_fn_t log2;
20122013
\} pmix_server_module_t;
20132014
\end{codepar}
20142015
\cspecificend
@@ -3374,9 +3375,82 @@ \subsubsection{PMIx Tool Connection Callback Function}
33743375
\advicermend
33753376

33763377

3378+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3379+
\versionMarkerProvisional{5.1}
3380+
\subsection{\code{pmix_server_log2_fn_t}}
3381+
\declareapiProvisional{pmix_server_log2_fn_t}
3382+
3383+
%%%%
3384+
\summary
3385+
3386+
Log data on behalf of a client.
3387+
3388+
%%%%
3389+
\format
3390+
3391+
\copySignature{pmix_server_log2_fn_t}{5.1}{
3392+
typedef pmix_status_t (*pmix_server_log2_fn_t)( \\
3393+
\hspace*{20\sigspace}const pmix_proc_t *client, \\
3394+
\hspace*{20\sigspace}const pmix_info_t data[], size_t ndata, \\
3395+
\hspace*{20\sigspace}const pmix_info_t directives[], size_t ndirs, \\
3396+
\hspace*{20\sigspace}pmix_op_cbfunc_t cbfunc, void *cbdata);
3397+
}
3398+
3399+
\begin{arglist}
3400+
\argin{client}{\refstruct{pmix_proc_t} structure (handle)}
3401+
\argin{data}{Array of info structures (array of handles)}
3402+
\argin{ndata}{Number of elements in the \refarg{data} array (integer)}
3403+
\argin{directives}{Array of info structures (array of handles)}
3404+
\argin{ndirs}{Number of elements in the \refarg{directives} array (integer)}
3405+
\argin{cbfunc}{Callback function \refapi{pmix_op_cbfunc_t} (function reference)}
3406+
\argin{cbdata}{Data to be passed to the callback function (memory reference)}
3407+
\end{arglist}
3408+
3409+
Returns one of the following:
3410+
3411+
\begin{itemize}
3412+
\item \refconst{PMIX_SUCCESS}, indicating that the request is being processed by the host environment - result will be returned in the provided \refarg{cbfunc}. Note that the host must not invoke the callback function prior to returning from the \ac{API}.
3413+
\item \refconst{PMIX_OPERATION_SUCCEEDED}, indicating that the request was immediately processed and returned \textit{success} - the \refarg{cbfunc} will not be called
3414+
\item \refconst{PMIX_ERR_NOT_SUPPORTED}, indicating that the host environment does not support the request, even though the function entry was provided in the server module - the \refarg{cbfunc} will not be called
3415+
\item a PMIx error constant indicating either an error in the input or that the request was immediately processed and failed - the \refarg{cbfunc} will not be called
3416+
\end{itemize}
3417+
3418+
\reqattrstart
3419+
\ac{PMIx} libraries are required to pass any provided attributes to the host environment for processing. In addition, the following attributes are required to be included in the passed \refarg{info} array:
3420+
3421+
\pasteAttributeItem{PMIX_USERID}
3422+
\pasteAttributeItem{PMIX_GRPID}
3423+
3424+
\divider
3425+
3426+
Host environments that provide this module entry point are required to support the following attributes:
3427+
3428+
\pasteAttributeItem{PMIX_LOG_STDERR}
3429+
\pasteAttributeItem{PMIX_LOG_STDOUT}
3430+
\pasteAttributeItem{PMIX_LOG_SYSLOG}
3431+
3432+
\reqattrend
3433+
3434+
\optattrstart
3435+
The following attributes are optional for host environments that support this operation:
3436+
3437+
\pasteAttributeItem{PMIX_LOG_MSG}
3438+
\pasteAttributeItem{PMIX_LOG_EMAIL}
3439+
\pasteAttributeItem{PMIX_LOG_EMAIL_ADDR}
3440+
\pasteAttributeItem{PMIX_LOG_EMAIL_SUBJECT}
3441+
\pasteAttributeItem{PMIX_LOG_EMAIL_MSG}
3442+
3443+
\optattrend
3444+
3445+
%%%%
3446+
\descr
3447+
3448+
Log data on behalf of a client. This function is not intended for output of computational results, but rather for reporting status and error messages. The host must not execute the callback function prior to returning from the \ac{API}.
3449+
3450+
33773451
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33783452
\subsection{\code{pmix_server_log_fn_t}}
3379-
\declareapi{pmix_server_log_fn_t}
3453+
\declareapiDEPNODISP{pmix_server_log_fn_t}
33803454

33813455
%%%%
33823456
\summary
@@ -3435,7 +3509,7 @@ \subsection{\code{pmix_server_log_fn_t}}
34353509
%%%%
34363510
\descr
34373511

3438-
Log data on behalf of a client. This function is not intended for output of computational results, but rather for reporting status and error messages. The host must not execute the callback function prior to returning from the \ac{API}.
3512+
Log data on behalf of a client. This function module entry has been \textbf{DEPRECATED} in favor of \refapi{pmix_server_log2_fn_t}.
34393513

34403514

34413515
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0 commit comments

Comments
 (0)