Skip to content

Multiple commits#3825

Merged
rhc54 merged 4 commits intoopenpmix:v6.1from
rhc54:cmr61/up
Feb 27, 2026
Merged

Multiple commits#3825
rhc54 merged 4 commits intoopenpmix:v6.1from
rhc54:cmr61/up

Conversation

@rhc54
Copy link
Contributor

@rhc54 rhc54 commented Feb 27, 2026

Terminate an array and return correct size

The PMIx_Value_unload function follows the format of the data in the
pmix_value_t structure. If the data type in the pmix_value_t:

  • is a simple data field (e.g., a size_t), then the function just copies
    the data across. The caller needs to provide the storage for the data.

  • is a pointer (e.g., the pmix_envar_t field), then the function malloc's
    the storage for the value, copies the fields into the new storage, and
    returns that storage to the caller. The caller needs to provide storage
    for the pointer to the returned value.

So in other words, the caller needs to provide storage (and a pointer to) the
place where the final data is to be put. If it's a simple data field, the value
will be placed in the provided storage. If it's a complex data field (e.g., a
struct), then the function will place the pointer to that malloc'd data in the
provided storage.

Note that this has an unusual side effect. For example, consider the case where
the pmix_value_t contains a pmix_byte_object_t. In this case, the caller
would need to pass a pmix_byte_object_t to the PMIx_Value_unload function
since the byte object (and not its data) is what is being unloaded. The returned
size, therefore, is the size of a pmix_byte_object_t, not the number of bytes
in the bytes field of the object.

Signed-off-by: Ralph Castain rhc@pmix.org
(cherry picked from commit 4258fdb)

Add a man page on PMIx_Value_unlaod

Explanation of what this function does and how to use
it isn't straightforward, and the Standard lacks sufficient
detail - leaving people a bit confused. So provide a
little more explanation.

Signed-off-by: Ralph Castain rhc@pmix.org
(cherry picked from commit e3c6c9a)

Extend the PMIx_Value_unload man page

Add some examples in an attempt to further
clarify how to use this function.

Signed-off-by: Ralph Castain rhc@pmix.org
(cherry picked from commit 53fce42)

Update man pages to better explain a couple of PMIx functions

Update/extend the man pages for PMIx_Value_unload and
PMIx_Value_get_number to better explain how they operate
and provide examples on their use.

Signed-off-by: Ralph Castain rhc@pmix.org
(cherry picked from commit d75a2bc)

The `PMIx_Value_unload` function follows the format of the data in the
`pmix_value_t` structure. If the data type in the `pmix_value_t`:

   * is a simple data field (e.g., a `size_t`), then the function just copies
     the data across. The caller needs to provide the storage for the data.

   * is a pointer (e.g., the pmix_envar_t field), then the function malloc's
     the storage for the value, copies the fields into the new storage, and
     returns that storage to the caller. The caller needs to provide storage
     for the pointer to the returned value.

So in other words, the caller needs to provide storage (and a pointer to) the
place where the final data is to be put. If it's a simple data field, the value
will be placed in the provided storage. If it's a complex data field (e.g., a
struct), then the function will place the pointer to that malloc'd data in the
provided storage.

Note that this has an unusual side effect. For example, consider the case where
the ``pmix_value_t`` contains a ``pmix_byte_object_t``. In this case, the caller
would need to pass a ``pmix_byte_object_t`` to the `PMIx_Value_unload` function
since the byte object (and not its data) is what is being unloaded. The returned
size, therefore, is the size of a ``pmix_byte_object_t``, *not* the number of bytes
in the ``bytes`` field of the object.

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit 4258fdb)
Explanation of what this function does and how to use
it isn't straightforward, and the Standard lacks sufficient
detail - leaving people a bit confused. So provide a
little more explanation.

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit e3c6c9a)
Add some examples in an attempt to further
clarify how to use this function.

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit 53fce42)
Update/extend the man pages for PMIx_Value_unload and
PMIx_Value_get_number to better explain how they operate
and provide examples on their use.

Signed-off-by: Ralph Castain <rhc@pmix.org>
(cherry picked from commit d75a2bc)
@rhc54 rhc54 merged commit 2678cc9 into openpmix:v6.1 Feb 27, 2026
26 checks passed
@rhc54 rhc54 deleted the cmr61/up branch February 27, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant