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
Expand on the use of the "data" vs "directives" attribute
arrays, providing a couple of examples to help clarify
their use.
Signed-off-by: Ralph Castain <[email protected]>
If the \ac{PMIx} library does not itself perform this operation, then it is required to pass any attributes provided by the client to the host environment for processing. In addition, it must include the following attributes in the passed \refarg{info} array:
889
+
If the \ac{PMIx} library does not itself perform this operation, then it is required to pass any attributes provided by the client to the host environment for processing. In addition, it must include the following attributes in the passed \refarg{directives} array:
890
890
891
891
\pasteAttributeItem{PMIX_USERID}
892
892
\pasteAttributeItem{PMIX_GRPID}
893
893
894
-
Host environments or \ac{PMIx} libraries that implement support for this operation are required to support the following attributes:
894
+
Host environments or \ac{PMIx} libraries that implement support for this operation are required to support the following attributes when provided as part of the \refarg{data} array:
895
895
896
896
\pasteAttributeItem{PMIX_LOG_STDERR}
897
897
\pasteAttributeItem{PMIX_LOG_STDOUT}
898
898
\pasteAttributeItem{PMIX_LOG_SYSLOG}
899
899
\pasteAttributeItem{PMIX_LOG_LOCAL_SYSLOG}
900
900
\pasteAttributeItem{PMIX_LOG_GLOBAL_SYSLOG}
901
+
902
+
Similarly, the following attributes must be supported when provided as part of the \refarg{directives} array:
901
903
\pasteAttributeItem{PMIX_LOG_SYSLOG_PRI}
902
904
\pasteAttributeItem{PMIX_LOG_ONCE}
903
905
904
906
\reqattrend
905
907
906
908
\optattrstart
907
-
The following attributes are optional for host environments or \ac{PMIx} libraries that support this operation:
909
+
The following attributes are optional for host environments or \ac{PMIx} libraries that support this operation when provided as part of the \refarg{data} array:
910
+
911
+
\pasteAttributeItem{PMIX_LOG_EMAIL}
912
+
\pasteAttributeItem{PMIX_LOG_EMAIL_MSG}
913
+
\pasteAttributeItem{PMIX_LOG_JOB_RECORD}
914
+
\pasteAttributeItem{PMIX_LOG_GLOBAL_DATASTORE}
915
+
916
+
Similarly, the following attributes are optional when provided as part of the \refarg{directives} array:
908
917
909
918
\pasteAttributeItem{PMIX_LOG_SOURCE}
910
919
\pasteAttributeItem{PMIX_LOG_TIMESTAMP}
911
920
\pasteAttributeItem{PMIX_LOG_GENERATE_TIMESTAMP}
912
921
\pasteAttributeItem{PMIX_LOG_TAG_OUTPUT}
913
922
\pasteAttributeItem{PMIX_LOG_TIMESTAMP_OUTPUT}
914
923
\pasteAttributeItem{PMIX_LOG_XML_OUTPUT}
915
-
\pasteAttributeItem{PMIX_LOG_EMAIL}
916
924
\pasteAttributeItem{PMIX_LOG_EMAIL_ADDR}
917
925
\pasteAttributeItem{PMIX_LOG_EMAIL_SENDER_ADDR}
918
926
\pasteAttributeItem{PMIX_LOG_EMAIL_SERVER}
919
927
\pasteAttributeItem{PMIX_LOG_EMAIL_SRVR_PORT}
920
928
\pasteAttributeItem{PMIX_LOG_EMAIL_SUBJECT}
921
-
\pasteAttributeItem{PMIX_LOG_EMAIL_MSG}
922
-
\pasteAttributeItem{PMIX_LOG_JOB_RECORD}
923
-
\pasteAttributeItem{PMIX_LOG_GLOBAL_DATASTORE}
929
+
924
930
925
931
\optattrend
926
932
927
933
%%%%
928
934
\descr
929
935
930
-
Log data subject to the services offered by the host environment. The data to be logged is provided in the \refarg{data} array. The (optional) \refarg{directives} can be used to direct the choice of logging channel.
936
+
Log data subject to the services offered by the host environment. The \refarg{data} array is used to specify the information that is to be logged, while the \refarg{directives} array is used to control formatting and other output options. For example, a user can log a message to \code{stderr} by including \refattr{PMIX_LOG_STDERR} in the \refarg{data} array, with the message itself provided as a string value in that \refstruct{pmix_info_t} element. They can also have that message time-stamped by including the \refattr{PMIX_LOG_TIMESTAMP} attribute in the \refarg{directives} array.
937
+
938
+
Note that it is possible to log multiple messages to different channels using a single call to \refapi{PMIx_Log}. In the above example, one could add another element to the \refarg{data} array to specify that a message also be output to \code{stdout} using the \refattr{PMIX_LOG_STDOUT} attribute, with that message provided as a string value in the element. Note that both messages would be time-stamped since the \refattr{PMIX_LOG_TIMESTAMP} is included in the \refarg{directives}, and that the two string messages can be different. Alternatively, one might choose to specify a message to be sent to \code{stderr} using \refattr{PMIX_LOG_STDERR} while simultaneously requesting that a message be delivered via email using \refattr{PMIX_LOG_EMAIL}. In this case, only directives that are applicable to a channel will be used in outputting to that channel. In this example, a directive such as \refattr{PMIX_LOG_TIMESTAMP} would cause both messages to be time-stamped, while directives specifying email addresses and server would only be applied to the email message.
939
+
940
+
While it is also permissible to include multiple instances of the same attribute in the \refarg{data} array, some care must be taken with regards to the provided \refarg{directives} as the directives are applied to all messages in the \refarg{data} array. Thus, multiple \refattr{PMIX_LOG_EMAIL} requests in the same function call will be sent to the same addresses as the \refattr{PMIX_LOG_EMAIL_ADDR} is a directive.
931
941
932
942
\adviceuserstart
933
943
It is strongly recommended that the \refapi{PMIx_Log} API not be used by applications for streaming data as it is not a ``performant'' transport and can perturb the application since it involves the local \ac{PMIx} server and host \ac{SMS} daemon. Note that a return of \refconst{PMIX_SUCCESS} only denotes that the data was successfully handed to the appropriate system call (for local channels) or the host environment and does not indicate receipt at the final destination.
If the \ac{PMIx} library does not itself perform this operation, then it is required to pass any attributes provided by the client to the host environment for processing. In addition, it must include the following attributes in the passed \refarg{info} array:
986
+
If the \ac{PMIx} library does not itself perform this operation, then it is required to pass any attributes provided by the client to the host environment for processing. In addition, it must include the following attributes in the passed \refarg{directives} array:
977
987
978
988
\pasteAttributeItem{PMIX_USERID}
979
989
\pasteAttributeItem{PMIX_GRPID}
980
990
981
-
Host environments or \ac{PMIx} libraries that implement support for this operation are required to support the following attributes:
991
+
Host environments or \ac{PMIx} libraries that implement support for this operation are required to support the following attributes when provided as part of the \refarg{data} array:
982
992
983
993
\pasteAttributeItem{PMIX_LOG_STDERR}
984
994
\pasteAttributeItem{PMIX_LOG_STDOUT}
985
995
\pasteAttributeItem{PMIX_LOG_SYSLOG}
986
996
\pasteAttributeItem{PMIX_LOG_LOCAL_SYSLOG}
987
997
\pasteAttributeItem{PMIX_LOG_GLOBAL_SYSLOG}
998
+
999
+
Similarly, the following attributes must be supported when provided as part of the \refarg{directives} array:
988
1000
\pasteAttributeItem{PMIX_LOG_SYSLOG_PRI}
989
1001
\pasteAttributeItem{PMIX_LOG_ONCE}
990
1002
991
1003
\reqattrend
992
1004
993
1005
\optattrstart
994
-
The following attributes are optional for host environments or \ac{PMIx} libraries that support this operation:
1006
+
The following attributes are optional for host environments or \ac{PMIx} libraries that support this operation when provided as part of the \refarg{data} array:
1007
+
1008
+
\pasteAttributeItem{PMIX_LOG_EMAIL}
1009
+
\pasteAttributeItem{PMIX_LOG_EMAIL_MSG}
1010
+
\pasteAttributeItem{PMIX_LOG_JOB_RECORD}
1011
+
\pasteAttributeItem{PMIX_LOG_GLOBAL_DATASTORE}
1012
+
1013
+
Similarly, the following attributes are optional when provided as part of the \refarg{directives} array:
995
1014
996
1015
\pasteAttributeItem{PMIX_LOG_SOURCE}
997
1016
\pasteAttributeItem{PMIX_LOG_TIMESTAMP}
998
1017
\pasteAttributeItem{PMIX_LOG_GENERATE_TIMESTAMP}
999
1018
\pasteAttributeItem{PMIX_LOG_TAG_OUTPUT}
1000
1019
\pasteAttributeItem{PMIX_LOG_TIMESTAMP_OUTPUT}
1001
1020
\pasteAttributeItem{PMIX_LOG_XML_OUTPUT}
1002
-
\pasteAttributeItem{PMIX_LOG_EMAIL}
1003
1021
\pasteAttributeItem{PMIX_LOG_EMAIL_ADDR}
1004
1022
\pasteAttributeItem{PMIX_LOG_EMAIL_SENDER_ADDR}
1005
1023
\pasteAttributeItem{PMIX_LOG_EMAIL_SERVER}
1006
1024
\pasteAttributeItem{PMIX_LOG_EMAIL_SRVR_PORT}
1007
1025
\pasteAttributeItem{PMIX_LOG_EMAIL_SUBJECT}
1008
-
\pasteAttributeItem{PMIX_LOG_EMAIL_MSG}
1009
-
\pasteAttributeItem{PMIX_LOG_JOB_RECORD}
1010
-
\pasteAttributeItem{PMIX_LOG_GLOBAL_DATASTORE}
1026
+
1011
1027
1012
1028
\optattrend
1013
1029
1014
1030
%%%%
1015
1031
\descr
1016
1032
1017
1033
Log data subject to the services offered by the host environment. The data to be logged is provided in the \refarg{data} array. The (optional) \refarg{directives} can be used to direct the choice of logging channel.
1018
-
The callback function will be executed when the log operation has been completed. The \refarg{data} and \refarg{directives} arrays must be maintained until the callback is provided.
1034
+
The callback function will be executed when the log operation has been completed. The \refarg{data} and \refarg{directives} arrays must be maintained until the callback is provided. See the description in \refapi{PMIx_Log} for details on use of the \refarg{data} and \refarg{directives} arrays.
1019
1035
1020
1036
\adviceuserstart
1021
1037
It is strongly recommended that the \refapi{PMIx_Log_nb} API not be used by applications for streaming data as it is not a ``performant'' transport and can perturb the application since it involves the local \ac{PMIx} server and host \ac{SMS} daemon. Note that a return of \refconst{PMIX_SUCCESS} only denotes that the data was successfully handed to the appropriate system call (for local channels) or the host environment and does not indicate receipt at the final destination.
\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}.
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}.
3413
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
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
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
3416
\end{itemize}
3417
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
3418
%%%%
3446
3419
\descr
3447
3420
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}.
3421
+
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. See the description in \refapi{PMIx_Log} for details on information included in the data vs directives arrays.
\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:
3484
-
3485
-
\pasteAttributeItem{PMIX_USERID}
3486
-
\pasteAttributeItem{PMIX_GRPID}
3487
-
3488
-
\divider
3489
-
3490
-
Host environments that provide this module entry point are required to support the following attributes:
3491
-
3492
-
\pasteAttributeItem{PMIX_LOG_STDERR}
3493
-
\pasteAttributeItem{PMIX_LOG_STDOUT}
3494
-
\pasteAttributeItem{PMIX_LOG_SYSLOG}
3495
-
3496
-
\reqattrend
3497
-
3498
-
\optattrstart
3499
-
The following attributes are optional for host environments that support this operation:
0 commit comments