-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add value and info APIs #492
Conversation
Add two APIs for estimating the size of value and info objects. - PMIx_Value_get_size - PMIx_Info_get_size Add two info list APIs. - PMIx_Info_list_prepend - PMIx_Info_list_get_info See openpmix/openpmix#2896. Fixes pmix#455. Signed-off-by: Ken Raffenetti <[email protected]>
Please use emoji reactions ON THIS COMMENT to indicate your position on this proposal.
Here are the meanings for the emojis:
|
I believe you asked me to provide a code example for the info list - here is a typical usage: void *head;
pmix_status_t rc;
pmix_data_array_t darray;
pmix_info_t *info;
size_t ninfo;
// initialize the list
head = PMIx_Info_list_start();
// add something to the end of the list
rc = PMIx_Info_list_add(head, PMIX_CONNECT_TO_SYSTEM, NULL, PMIX_BOOL);
if (PMIX_SUCCESS != rc) {
PMIx_Info_list_release(head);
return rc;
}
// prepend something to the list
rc = PMIx_Info_list_prepend(head, PMIX_TCP_REPORT_URI, "filename", PMIX_STRING);
if (PMIX_SUCCESS != rc) {
PMIx_Info_list_release(head);
return rc;
}
// convert the list to an array of info
rc = PMIx_Info_list_convert(head, &darray);
if (PMIX_SUCCESS != rc) {
PMIx_Info_list_release(head);
return rc;
}
// cleanup the list
PMIx_Info_list_release(head);
// define pointer to the array of info for use
info = (pmix_info_t*)darray.array;
ninfo = darray.size; Doesn't cover all the APIs - but is this sufficient? I could expand to cover more APIs, but this really is the most common usage. |
PMIx ASC 4Q 2023 Meeting
|
PMIx ASC 2024Q1 Meeting Passed first vote: 9 yes / 0 no / 0 abstain |
Add two APIs for estimating the size of value and info objects.
Add two info list APIs.
See openpmix/openpmix#2896. Fixes #455.