18.2.215. PMIx_Fabric_construct

PMIx_Fabric_construct — Initialize a caller-provided pmix_fabric_t(5) structure.

18.2.215.1. SYNOPSIS

#include <pmix.h>

void PMIx_Fabric_construct(pmix_fabric_t *p);

18.2.215.1.1. Python Syntax

No Python equivalent

18.2.215.2. INPUT PARAMETERS

  • p: Pointer to the pmix_fabric_t(5) structure to be initialized. The storage for the structure itself must already exist — it is supplied by the caller (typically declared on the stack or embedded within another object).

18.2.215.3. DESCRIPTION

Initialize the fields of a pmix_fabric_t that the caller has already allocated, placing it in a well-defined state before it is passed to PMIx_Fabric_register(3). Specifically:

  • name is set to NULL;

  • index is set to SIZE_MAX (indicating that no fabric registration object has yet been assigned by the PMIx library);

  • info is set to NULL and ninfo to zero;

  • module is set to NULL.

No heap memory is allocated. A caller that wishes to register a specific fabric by name may set the name field after construction and before calling PMIx_Fabric_register(3); leaving it NULL requests information on the default fabric.

18.2.215.4. RETURN VALUE

PMIx_Fabric_construct returns no value (void).

18.2.215.5. NOTES

The info array and other internal fields of a pmix_fabric_t are populated by the PMIx library when the structure is registered with PMIx_Fabric_register(3), and are released when the structure is deregistered with PMIx_Fabric_deregister(3). A constructed but never-registered structure holds no library-allocated resources.

18.2.215.6. EXAMPLES

Construct and register a fabric object:

pmix_fabric_t fabric;

PMIx_Fabric_construct(&fabric);
PMIx_Fabric_register(&fabric, NULL, 0);