18.2.150. PMIx_Proc_load
PMIx_Proc_load — Initialize a pmix_proc_t(5)
with a namespace and rank.
18.2.150.1. SYNOPSIS
#include <pmix.h>
void PMIx_Proc_load(pmix_proc_t *p,
const char *nspace, pmix_rank_t rank);
18.2.150.1.1. Python Syntax
No Python equivalent
18.2.150.2. INPUT PARAMETERS
p: Pointer to the pmix_proc_t(5) structure to be loaded. The storage for the structure itself must already exist (caller supplied).nspace: Namespace string to copy into the structure’snspacefield (see pmix_nspace_t(5)). May beNULL, in which case thenspacefield is left cleared.rank: Process rank to store in the structure’srankfield (see pmix_rank_t(5)).
18.2.150.3. DESCRIPTION
Initialize a pmix_proc_t and populate it with a process
identifier. The function first constructs the structure — exactly as
PMIx_Proc_construct(3) would, zeroing the
nspace field — then copies the supplied nspace string into the
nspace field and stores rank in the rank field.
The namespace string is copied with truncation: at most PMIX_MAX_NSLEN
characters are stored, and the result is always null-terminated. If nspace
is NULL, only the rank field is set (the nspace field remains
cleared).
18.2.150.4. RETURN VALUE
PMIx_Proc_load returns no value (void).
18.2.150.5. NOTES
PMIx_Proc_load is an OpenPMIx convenience routine. The corresponding
PMIX_PROC_LOAD macro is implemented as a direct call to this function.
Because PMIx_Proc_load re-constructs the structure before loading it, any
previous contents are discarded. As a pmix_proc_t
owns no heap-allocated payload, this is safe to call on a previously loaded
structure without leaking memory.
18.2.150.6. EXAMPLES
Load a proc structure with a namespace and rank:
pmix_proc_t proc;
PMIx_Proc_load(&proc, "myapp.job", 3);