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
I believe you asked me to provide a code example for the info list - here is a typical usage:
void*head;
pmix_status_trc;
pmix_data_array_tdarray;
pmix_info_t*info;
size_tninfo;
// initialize the listhead=PMIx_Info_list_start();
// add something to the end of the listrc=PMIx_Info_list_add(head, PMIX_CONNECT_TO_SYSTEM, NULL, PMIX_BOOL);
if (PMIX_SUCCESS!=rc) {
PMIx_Info_list_release(head);
returnrc;
}
// prepend something to the listrc=PMIx_Info_list_prepend(head, PMIX_TCP_REPORT_URI, "filename", PMIX_STRING);
if (PMIX_SUCCESS!=rc) {
PMIx_Info_list_release(head);
returnrc;
}
// convert the list to an array of inforc=PMIx_Info_list_convert(head, &darray);
if (PMIX_SUCCESS!=rc) {
PMIx_Info_list_release(head);
returnrc;
}
// cleanup the listPMIx_Info_list_release(head);
// define pointer to the array of info for useinfo= (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.
While working on #492, we thought that adding an example on how to use lists could be valuable.
@rhc54 proposed the following example
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.
Originally posted by @rhc54 in #492 (comment)
The text was updated successfully, but these errors were encountered: