18.3.25. pmix_regattr_t

pmix_regattr_t — Registers attribute support for a PMIx function

18.3.25.1. SYNTAX

18.3.25.1.1. C Syntax

#include <pmix_common.h>

typedef struct pmix_regattr_t {
    char *name;
    pmix_key_t string;
    pmix_data_type_t type;
    char **description;
} pmix_regattr_t;

18.3.25.2. DESCRIPTION

The pmix_regattr_t structure is used to register attribute support for a PMIx function.

The fields are:

name

The actual name of the attribute — e.g., "PMIX_MAX_PROCS". Must be a NULL-terminated string composed of standard alphanumeric values supported by common utilities such as strcmp.

string

The literal string value of the attribute — e.g., "pmix.max.size" for the PMIX_MAX_PROCS attribute. Must be a NULL-terminated string composed of standard alphanumeric values.

type

A PMIx data type (pmix_data_type_t) identifying the type of data associated with this attribute.

description

A NULL-terminated array of strings describing the attribute, optionally including a human-readable description of the range of accepted values — e.g., "ALL POSITIVE INTEGERS", or a comma-delimited list of enum value names.

Although not strictly required, both PMIx library implementers and host environments are strongly encouraged to provide both human-readable and machine-parsable descriptions of supported attributes when registering them.

18.3.25.3. DESCRIPTIVE VALUE ATTRIBUTES

Beyond the free-form description field, the following keys provide a standardized, machine-parsable vocabulary for describing the range of values an attribute accepts:

  • PMIX_MAX_VALUE (varies) — the maximum valid value for the associated attribute. The value carries the attribute’s own declared data type.

  • PMIX_MIN_VALUE (varies) — the minimum valid value for the associated attribute. The value carries the attribute’s own declared data type.

  • PMIX_ENUM_VALUE (char*) — the accepted values for the associated attribute. Numerical values shall be presented in a form convertible to the attribute’s declared data type; named values (i.e., those defined by constant names via a typical C-language enum declaration) must be provided as their numerical equivalent.

18.3.25.4. STATIC INITIALIZER

A statically declared pmix_regattr_t may be initialized with the PMIX_REGATTR_STATIC_INIT macro, which sets name and description to NULL, clears the string key, and sets type to PMIX_UNDEF:

pmix_regattr_t attr = PMIX_REGATTR_STATIC_INIT;