MPI\_T\_ENUM\_GET\_INFO(3) Open MPI MPI\_T\_ENUM\_GET\_INFO(3)

MPI\_T\_enum\_get\_info — Query information about an enumerator

# [SYNTAX](#SYNTAX)

## [C Syntax](#C_Syntax)

```
#include <mpi.h>
int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len)
```

# [INPUT PARAMETERS](#INPUT_PARAMETERS)

•

**enumtype**: Enumerator to be queried.

# [INPUT/OUTPUT PARAMETERS](#INPUT/OUTPUT_PARAMETERS)

•

**name\_len**: Length of the string and/or buffer for name.

# [OUTPUT PARAMETERS](#OUTPUT_PARAMETERS)

- **num**: number of discrete values represented by this enumeration.
- **name**: Buffer to return the string containing the name of the category.

# [DESCRIPTION](#DESCRIPTION)

MPI\_T\_enum\_get\_info can be used to query information about an enumerator. The function returns the number of discrete values represented by this enumerator in the *num* parameter.

# [NOTES](#NOTES)

This MPI tool interface function returns the name of the enumeration as a string. This function takes two argument for the string: *name* which specifies a buffer where the name of the should be stored, and *name\_len* which must initially specify the size of the buffer pointed to by *name*. This function will copy at most *name\_len* - 1 characters of the name and sets *name\_len* to the number of characters returned + 1. If *name\_len* is NULL or the value specified in *name\_len* is 0 the *name* buffer is ignored and the name of the enumeration is not returned.

# [ERRORS](#ERRORS)

MPI\_T\_enum\_get\_info will fail if:

- **MPI\_T\_ERR\_NOT\_INITIALIZED**: The MPI Tools interface not initialized
- **MPI\_T\_ERR\_INVALID\_INDEX**: The enumeration is invalid or has been deleted

# [Copyright](#Copyright)

2003-2026, The Open MPI Community

September 11, 2026

---

Document: MPI_T_enum_get_info(3) from openmpi-cuda-13.3 5.0.11-r0 (Chainguard OS)
Source: https://github.com/open-mpi/ompi
