Scroll to navigation

PMIX_RESOURCE_UNIT_T(5) OpenPMIx PMIX_RESOURCE_UNIT_T(5)

pmix_resource_unit_t — Describes a quantity of a given resource type

SYNTAX

C Syntax

#include <pmix_common.h>
typedef struct pmix_resource_unit {

pmix_device_type_t type;
size_t count; } pmix_resource_unit_t;


DESCRIPTION

The pmix_resource_unit_t structure describes a quantity of a particular type of resource. It is used, for example, to specify the minimum allocatable unit for a system or to describe the resources contained in an allocation.

The type field is a pmix_device_type_t(5) <#man5-pmix-device-type-t> value identifying the kind of resource being described (e.g., a class of compute, memory, or fabric device). The count field is the number of units of that resource type.

Arrays of pmix_resource_unit_t structures are conveyed via attributes such as PMIX_ALLOC_MAU (the minimum allocatable unit for the system) passed to PMIx_Allocation_request(3) <#man3-pmix-allocation-request>.

The PMIx_Resource_unit_string(3) <#man3-pmix-resource-unit-string> function returns a string representation of a pmix_resource_unit_t value.

STATIC INITIALIZER

A statically declared pmix_resource_unit_t may be initialized with the PMIX_RESOURCE_UNIT_STATIC_INIT macro, which sets type to PMIX_DEVTYPE_UNKNOWN and count to 0:

pmix_resource_unit_t unit = PMIX_RESOURCE_UNIT_STATIC_INIT;


See also:

PMIx_Resource_unit_string(3) <#man3-pmix-resource-unit-string>, PMIx_Allocation_request(3) <#man3-pmix-allocation-request>, PMIx_Resource_block(3) <#man3-pmix-resource-block>, pmix_device_type_t(5) <#man5-pmix-device-type-t>, pmix_info_t(5) <#man5-pmix-info-t>


Copyright

2014-2026, OpenPMIx Community

September 27, 2026