18.2.70. PMIx_Store_internal
PMIx_Store_internal — Store a key/value pair locally for retrieval within
this process.
18.2.70.1. SYNOPSIS
#include <pmix.h>
pmix_status_t PMIx_Store_internal(const pmix_proc_t *proc,
const char key[],
pmix_value_t *val);
18.2.70.1.1. Python Syntax
from pmix import *
foo = PMIxClient()
# ... after a successful foo.init() ...
# proc is a dict {'nspace': ..., 'rank': ...} or None for this process
# the value is a Python ``pmix_value_t`` dictionary
rc = foo.store_internal({'nspace': 'myapp', 'rank': 0}, "mykey",
{'value': 42, 'val_type': PMIX_UINT32})
18.2.70.2. INPUT PARAMETERS
proc: Pointer to apmix_proc_tidentifying the process (namespace and rank) under which the data is to be stored. IfNULL, the calling process’s own identifier is used.key: A NULL-terminated string identifying the value. The string must be no longer thanPMIX_MAX_KEYLENcharacters.val: Pointer to apmix_value_tstructure containing the value to be stored.
18.2.70.3. DESCRIPTION
Store some data locally for retrieval by other areas of the process. This is data that has only internal scope — it will never be “pushed” or otherwise posted externally to other processes. It is typically used to cache data obtained by means outside of PMIx so that it can subsequently be accessed by various parts of the same process through PMIx_Get(3).
The value is copied into internal memory before PMIx_Store_internal returns, so
the caller may modify or free val immediately afterward. Because the data is
associated with the proc identifier, a later PMIx_Get(3)
using that same identifier and key will retrieve the stored value.
Unlike PMIx_Put(3), whose data is staged for distribution to
other processes, data stored with PMIx_Store_internal never leaves the process
and requires no subsequent commit or synchronization step.
18.2.70.4. RETURN VALUE
Returns PMIX_SUCCESS on success. On error, a negative value corresponding to
a PMIx error constant is returned, including:
PMIX_ERR_BAD_PARAM— thekeyisNULLor exceedsPMIX_MAX_KEYLENcharacters.PMIX_ERR_NOT_AVAILABLE— the operation cannot be serviced because the library’s progress engine has been stopped.PMIX_ERR_INIT— the PMIx library has not been initialized.PMIX_ERR_NOMEM— the library was unable to allocate memory to store the data.
Any other negative value indicates an appropriate error condition. PMIx error
constants are defined in pmix_common.h.
18.2.70.5. NOTES
Data stored with PMIx_Store_internal has purely internal scope; it is visible
only within the storing process and is never shared with peers. To make data
available to other processes, use PMIx_Put(3) followed by
PMIx_Commit(3) instead.
See also
PMIx_Init(3), PMIx_Put(3), PMIx_Get(3), pmix_value_t(5), pmix_proc_t(5)