18.2.162. PMIx_Query_qualifiers_create
PMIx_Query_qualifiers_create — Allocate the qualifiers array of a
pmix_query_t(5) structure.
18.2.162.1. SYNOPSIS
#include <pmix.h>
void PMIx_Query_qualifiers_create(pmix_query_t *p, size_t n);
18.2.162.1.1. Python Syntax
No Python equivalent
18.2.162.2. INPUT PARAMETERS
p: Pointer to the pmix_query_t(5) structure whosequalifiersarray is to be allocated.n: Number of pmix_info_t(5) qualifier structures to allocate.
18.2.162.3. DESCRIPTION
Allocate and initialize an array of n pmix_info_t(5) structures and attach it to the qualifiers field of the
supplied pmix_query_t, recording the count in the
structure’s nqual field. The new qualifier array is constructed (zeroed)
and is owned by the query structure; it is released when the query structure is
destructed or freed.
Qualifiers refine a query by attaching directive key-value pairs (for example, restricting a query to a particular namespace or session). After creating the array, the caller loads each element with the desired key and value before passing the query to PMIx_Query_info(3).
The target pmix_query_t must already have been initialized with
PMIx_Query_construct(3) or
PMIx_Query_create(3).
18.2.162.4. RETURN VALUE
PMIx_Query_qualifiers_create returns no value (void).
18.2.162.5. NOTES
The PMIX_QUERY_QUALIFIERS_CREATE convenience macro is a direct wrapper for
this function.
The qualifier array becomes part of the query structure’s contents; do not free it independently. Releasing the query structure with PMIx_Query_destruct(3), PMIx_Query_free(3), or PMIx_Query_release(3) also releases the qualifiers.
18.2.162.6. EXAMPLES
Attach a single qualifier to a query:
pmix_query_t query;
PMIx_Query_construct(&query);
PMIx_Query_qualifiers_create(&query, 1);
PMIX_INFO_LOAD(&query.qualifiers[0], PMIX_NSPACE,
"myjob", PMIX_STRING);