Skip to content
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

Merged
merged 2 commits into from
Mar 14, 2024
Merged

Add value and info APIs #492

merged 2 commits into from
Mar 14, 2024

Conversation

raffenet
Copy link
Contributor

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 #455.

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]>
@raffenet
Copy link
Contributor Author

Please use emoji reactions ON THIS COMMENT to indicate your position on this proposal.

You do not need to vote on every proposal
If you have no opinion, don't vote - that is also useful data
If you've already commented on this issue, please still vote so
we know your current thoughts
Not all proposals solve exactly the same problem, so we may end
up accepting proposals that appear to have some overlap
This is not a binding majority-rule vote, but it will be a very
significant input into the corresponding ASC decision.

Here are the meanings for the emojis:

Hooray or Rocket: I support this so strongly that I
want to be an advocate for it
Heart: I think this is an ideal solution
Thumbs up: I'd be happy with this solution
Confused: I'd rather we not do this, but I can tolerate it
Thumbs down: I'd be actively unhappy, and may even consider
other technologies instead
If you want to explain in more detail, feel free to add another
comment, but please also vote on this comment.

@jjhursey jjhursey added the Eligible Eligible for consideration by ASC label Oct 4, 2023
Chap_API_Struct.tex Outdated Show resolved Hide resolved
Chap_API_Struct.tex Outdated Show resolved Hide resolved
Chap_API_Struct.tex Outdated Show resolved Hide resolved
Chap_API_Struct.tex Outdated Show resolved Hide resolved
Chap_API_Struct.tex Outdated Show resolved Hide resolved
Chap_API_Struct.tex Outdated Show resolved Hide resolved
Chap_API_Struct.tex Outdated Show resolved Hide resolved
Chap_API_Struct.tex Outdated Show resolved Hide resolved
Chap_API_Struct.tex Outdated Show resolved Hide resolved
Chap_API_Struct.tex Outdated Show resolved Hide resolved
Chap_API_Struct.tex Outdated Show resolved Hide resolved
@rhc54
Copy link
Member

rhc54 commented Oct 18, 2023

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.

@jjhursey
Copy link
Member

PMIx ASC 4Q 2023 Meeting

  • Passed first vote: 9 yes / 0 no / 0 abstain
  • Can be presented for a second vote during the 1Q 2024 meeting

@jjhursey jjhursey added the First Vote Passed ASC first vote passed label Oct 19, 2023
@raffenet raffenet added this to the PMIx v5.1 Standard milestone Dec 14, 2023
@abouteiller abouteiller added the Accepted as Provisional ASC vote passed. Accepted as Provisional! label Feb 28, 2024
@abouteiller
Copy link
Contributor

PMIx ASC 2024Q1 Meeting

Passed first vote: 9 yes / 0 no / 0 abstain
Accepted as provisional.

@abouteiller
Copy link
Contributor

abouteiller commented Feb 28, 2024

@dsolt @raffenet ready to merge at your leisure

@raffenet raffenet merged commit 2c75dc2 into pmix:master Mar 14, 2024
@raffenet raffenet deleted the issue-455 branch March 14, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted as Provisional ASC vote passed. Accepted as Provisional! Eligible Eligible for consideration by ASC First Vote Passed ASC first vote passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drift: info list
4 participants