Scroll to navigation

PMIX_INFO_LIST_START(3) OpenPMIx PMIX_INFO_LIST_START(3)

PMIx_Info_list_start — Initialize an opaque list for accumulating pmix_info_t(5) <#man5-pmix-info-t> structures

SYNOPSIS

#include <pmix.h>
void* PMIx_Info_list_start(void);


Python Syntax

No Python equivalent

INPUT PARAMETERS

None

DESCRIPTION

Constructing an array of pmix_info_t <#man5-pmix-info-t> structures for passing to a PMIx API can be tedious, since the pmix_info_t is not itself a list object and the number of entries is frequently not known in advance. The PMIx_Info_list_start function begins that process by allocating an opaque, implementation-dependent list object and returning a void* handle to it.

The returned handle is passed to the other PMIx_Info_list_* routines to accumulate entries — for example PMIx_Info_list_add(3) <#man3-pmix-info-list-add>, PMIx_Info_list_xfer(3) <#man3-pmix-info-list-xfer>, or PMIx_Info_list_prepend(3) <#man3-pmix-info-list-prepend> — and is ultimately converted into a contiguous pmix_data_array_t(5) <#man5-pmix-data-array-t> of pmix_info_t via PMIx_Info_list_convert(3) <#man3-pmix-info-list-convert>. When the caller is finished with the list, the handle must be passed to PMIx_Info_list_release(3) <#man3-pmix-info-list-release> to free all associated storage.

The object referenced by the returned handle is opaque: the caller must not modify or dereference it.

RETURN VALUE

Returns a void* handle to the newly created list, or NULL if the object could not be allocated.

NOTES

PMIx_Info_list_start begins a workflow that is completed by PMIx_Info_list_release(3) <#man3-pmix-info-list-release>. Every handle obtained from PMIx_Info_list_start must eventually be released to avoid leaking memory.

EXAMPLES

Build a list, convert it, and release it:

void *ilist;
pmix_data_array_t darray;
pmix_status_t rc;
ilist = PMIx_Info_list_start();
PMIx_Info_list_add(ilist, PMIX_RANK, &rank, PMIX_PROC_RANK);
PMIx_Info_list_add(ilist, PMIX_HOSTNAME, host, PMIX_STRING);
rc = PMIx_Info_list_convert(ilist, &darray);
PMIx_Info_list_release(ilist);


See also:

PMIx_Info_list_add(3) <#man3-pmix-info-list-add>, PMIx_Info_list_add_unique(3) <#man3-pmix-info-list-add-unique>, PMIx_Info_list_add_value(3) <#man3-pmix-info-list-add-value>, PMIx_Info_list_add_value_unique(3) <#man3-pmix-info-list-add-value-unique>, PMIx_Info_list_prepend(3) <#man3-pmix-info-list-prepend>, PMIx_Info_list_insert(3) <#man3-pmix-info-list-insert>, PMIx_Info_list_xfer(3) <#man3-pmix-info-list-xfer>, PMIx_Info_list_xfer_unique(3) <#man3-pmix-info-list-xfer-unique>, PMIx_Info_list_convert(3) <#man3-pmix-info-list-convert>, PMIx_Info_list_get_info(3) <#man3-pmix-info-list-get-info>, PMIx_Info_list_get_size(3) <#man3-pmix-info-list-get-size>, PMIx_Info_list_release(3) <#man3-pmix-info-list-release>, pmix_info_t(5) <#man5-pmix-info-t>, pmix_data_array_t(5) <#man5-pmix-data-array-t>


Copyright

2014-2026, OpenPMIx Community

November 5, 2026