Scroll to navigation

PMIX_QUERY_QUALIFIERS_CREATE(3) OpenPMIx PMIX_QUERY_QUALIFIERS_CREATE(3)

PMIx_Query_qualifiers_create — Allocate the qualifiers array of a pmix_query_t(5) <#man5-pmix-query-t> structure.

SYNOPSIS

#include <pmix.h>
void PMIx_Query_qualifiers_create(pmix_query_t *p, size_t n);


Python Syntax

No Python equivalent

INPUT PARAMETERS

  • p: Pointer to the pmix_query_t(5) <#man5-pmix-query-t> structure whose qualifiers array is to be allocated.
  • n: Number of pmix_info_t(5) <#man5-pmix-info-t> qualifier structures to allocate.

DESCRIPTION

Allocate and initialize an array of n pmix_info_t(5) <#man5-pmix-info-t> structures and attach it to the qualifiers field of the supplied pmix_query_t <#man5-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) <#man3-pmix-query-info>.

The target pmix_query_t must already have been initialized with PMIx_Query_construct(3) <#man3-pmix-query-construct> or PMIx_Query_create(3) <#man3-pmix-query-create>.

RETURN VALUE

PMIx_Query_qualifiers_create returns no value (void).

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) <#man3-pmix-query-destruct>, PMIx_Query_free(3) <#man3-pmix-query-free>, or PMIx_Query_release(3) <#man3-pmix-query-release> also releases the qualifiers.

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);


See also:

PMIx_Query_construct(3) <#man3-pmix-query-construct>, PMIx_Query_destruct(3) <#man3-pmix-query-destruct>, PMIx_Query_create(3) <#man3-pmix-query-create>, PMIx_Query_free(3) <#man3-pmix-query-free>, PMIx_Query_release(3) <#man3-pmix-query-release>, PMIx_Query_info(3) <#man3-pmix-query-info>, pmix_query_t(5) <#man5-pmix-query-t>, pmix_info_t(5) <#man5-pmix-info-t>


Copyright

2014-2026, OpenPMIx Community

November 5, 2026