18.2.57. PMIx_Get_attribute_string

PMIx_Get_attribute_string — Return the string key corresponding to a PMIx attribute name.

18.2.57.1. SYNOPSIS

#include <pmix.h>

const char* PMIx_Get_attribute_string(const char *attribute);

18.2.57.1.1. Python Syntax

from pmix import *

foo = PMIxClient()
key = foo.get_attribute_string("PMIX_UNIV_SIZE")

18.2.57.2. INPUT PARAMETERS

  • attribute: The name of a PMIx attribute as it appears in the header definitions — for example, "PMIX_UNIV_SIZE". The comparison is case-insensitive.

18.2.57.3. DESCRIPTION

Look up the given PMIx attribute name in the library’s attribute dictionary and return its corresponding string key — for example, "PMIX_UNIV_SIZE" maps to "pmix.univ.size". This is the string representation transmitted on the wire and used to label the attribute internally.

If the attribute name is not found in the dictionary, or if the dictionary has not yet been initialized (for example, before PMIx_Init(3) has been called), the function returns the input attribute pointer unchanged.

The returned pointer refers to constant storage owned by the PMIx library (or to the caller-supplied attribute string in the not-found case). In either case the caller must not modify or free it.

PMIx_Get_attribute_name performs the inverse mapping, translating a string key back to its attribute name.

18.2.57.4. RETURN VALUE

Returns a pointer to a constant character string: the string key for the attribute when known, or the unmodified input pointer when the attribute is unknown or the dictionary is not yet initialized. The pointer must not be freed by the caller.