table of contents
- unstable 7.0.0~rc1-1
| PMIX_PROC_CREATE(3) | OpenPMIx | PMIX_PROC_CREATE(3) |
PMIx_Proc_create — Allocate and initialize an array of pmix_proc_t(5) <#man5-pmix-proc-t> structures.
SYNOPSIS¶
#include <pmix.h> pmix_proc_t* PMIx_Proc_create(size_t n);
Python Syntax¶
No Python equivalent
INPUT PARAMETERS¶
- •
- n: Number of pmix_proc_t(5) <#man5-pmix-proc-t> structures to allocate.
DESCRIPTION¶
Allocate a contiguous array of n pmix_proc_t <#man5-pmix-proc-t> structures on the heap and construct each element — zeroing the nspace field and setting rank to PMIX_RANK_UNDEF — exactly as PMIx_Proc_construct(3) <#man3-pmix-proc-construct> would.
The returned array is owned by the caller and must be released with PMIx_Proc_free(3) <#man3-pmix-proc-free>, which destructs each element and frees the underlying storage.
RETURN VALUE¶
Returns a pointer to the newly allocated array of pmix_proc_t <#man5-pmix-proc-t> structures, or NULL if n is zero or the allocation fails.
NOTES¶
PMIx_Proc_create is an OpenPMIx convenience routine. The corresponding PMIX_PROC_CREATE macro assigns the returned pointer to its first argument and is implemented as a call to this function.
EXAMPLES¶
Allocate an array of proc structures and release it when done:
pmix_proc_t *procs; size_t nprocs = 4; procs = PMIx_Proc_create(nprocs); /* ... populate and use the array ... */ PMIx_Proc_free(procs, nprocs);
See also:
Copyright¶
2014-2026, OpenPMIx Community
| September 27, 2026 |