18.2.146. PMIx_Proc_construct
PMIx_Proc_construct — Initialize a caller-provided
pmix_proc_t(5) structure.
18.2.146.1. SYNOPSIS
#include <pmix.h>
void PMIx_Proc_construct(pmix_proc_t *p);
18.2.146.1.1. Python Syntax
No Python equivalent
18.2.146.2. INPUT PARAMETERS
p: Pointer to the pmix_proc_t(5) structure to be initialized. The storage for the structure itself must already exist — it is supplied by the caller (typically declared on the stack or embedded within another object).
18.2.146.3. DESCRIPTION
Initialize the memory of a pmix_proc_t that the caller
has already allocated. The function zeroes the entire structure — clearing
the nspace field — and sets the rank field to PMIX_RANK_UNDEF.
No heap memory is allocated.
A proc structure should be constructed (or created with PMIx_Proc_create(3)) before its fields are referenced; using an uninitialized structure produces undefined behavior.
Because PMIx_Proc_construct operates on caller-provided storage, it must be
paired with PMIx_Proc_destruct(3). Do not
pass a constructed (as opposed to created) structure to
PMIx_Proc_free(3), as that would attempt to free
storage the library did not allocate.
18.2.146.4. RETURN VALUE
PMIx_Proc_construct returns no value (void).
18.2.146.5. NOTES
PMIx_Proc_construct is an OpenPMIx convenience routine. The corresponding
PMIX_PROC_CONSTRUCT macro is implemented as a direct call to this function.
18.2.146.6. EXAMPLES
Construct a structure and load it with a process identifier:
pmix_proc_t proc;
PMIx_Proc_construct(&proc);
PMIx_Proc_load(&proc, "myapp.job", 0);