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

MPI\_T see MPI-3 section 14.3.5.

MPI\_T\_cvar\_get\_info — Query information from a control variable

# [SYNTAX](#SYNTAX)

## [C Syntax](#C_Syntax)

```
#include <mpi.h>
int MPI_T_cvar_get_info(int cvar_index, char *name, int *name_len,


                        int *verbosity, MPI_Datatype *datatype, MPI_T_enum *enumtype,


                        const *desc, int *desc_len, int *bind, int *scope)
```

# [INPUT PARAMETERS](#INPUT_PARAMETERS)

•

**cvar\_index**: Index of the control variable to be queried.

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

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

# [OUTPUT PARAMETERS](#OUTPUT_PARAMETERS)

- **name**: Buffer to return the string containing the name of the control variable.
- **verbosity**: Verbosity level of this variable.
- **datatype**: MPI datatype of the information stored in the control variable.
- **enumtype**: Optional descriptor for enumeration information.
- **desc**: Buffer to return the string containing the description of the control variable.
- **bind**: Type of MPI object to which this variable must be bound.
- **scope**: Scope of when changes to this variable are possible.

# [DESCRIPTION](#DESCRIPTION)

MPI\_T\_cvar\_get\_info can be used to query information about a control variable. The function returns the verbosity, datatype, enumeration type, binding, and scope of the queried control variable in the arguments *verbosity*, *datatype*, *enumtype*, *bind*, and *scope*, respectively. Control variables in Open MPI are the same as MCA parameters.

# [VERBOSITY](#VERBOSITY)

As Open MPI exposes a very large number of MCA parameters (control variables), control variables are categorized into nine verbosity levels corresponding to the equivalent ompi\_info &lt;#man1-ompi-info&gt; level. The nine levels are (in increasing order):

1\.

**MPI\_T\_VERBOSITY\_USER\_BASIC**: Basic information of interest to users

2\.

**MPI\_T\_VERBOSITY\_USER\_DETAIL**: Detailed information of interest to users

3\.

**MPI\_T\_VERBOSITY\_USER\_ALL**: All remaining information of interest to users

4\.

**MPI\_T\_VERBOSITY\_TUNER\_BASIC**: Basic information required for tuning

5\.

**MPI\_T\_VERBOSITY\_TUNER\_DETAIL**: Detailed information required for tuning

6\.

**MPI\_T\_VERBOSITY\_TUNER\_ALL**: All remaining information required for tuning

7\.

**MPI\_T\_VERBOSITY\_MPIDEV\_BASIC**: Basic information for MPI implementors

8\.

**MPI\_T\_VERBOSITY\_MPIDEV\_DETAIL**: Detailed information for MPI implementors

9\.

**MPI\_T\_VERBOSITY\_MPIDEV\_ALL**: All remaining information for MPI implementors

For more information see MPI-3 section 14.3.1.

# [DATATYPE](#DATATYPE)

The datatype returned by MPI\_T\_cvar\_get\_info is restricted to one of the following datatypes: **MPI\_INT**, **MPI\_UNSIGNED**, **MPI\_UNSIGNED\_LONG**, **MPI\_UNSIGNED\_LONG\_LONG**, **MPI\_COUNT**, **MPI\_CHAR**, and **MPI\_DOUBLE**. For more information on datatypes in MPI\_T see MPI-3 section 14.3.5.

# [SCOPE](#SCOPE)

The scope describes when and how changes can be made to a control variable. From MPI-3 section 14.3.6, the scope may be any of the following:

- **MPI\_T\_SCOPE\_CONSTANT**: read-only, value is constant
- **MPI\_T\_SCOPE\_READONLY**: read-only, cannot be written, but can change
- **MPI\_T\_SCOPE\_LOCAL**: may be writeable, writing is a local operation
- **MPI\_T\_SCOPE\_GROUP**: may be writeable, must be done to a group of processes, all processes in a group must be set to consistent values
- **MPI\_T\_SCOPE\_GROUP\_EQ**: may be writeable, must be done to a group of processes, all processes in a group must be set to the same value
- **MPI\_T\_SCOPE\_ALL**: may be writeable, must be done to all processes, all connected processes must be set to consistent values
- **MPI\_T\_SCOPE\_ALL\_EQ**: may be writeable, must be done to all processes, all connected processes must be set to the same value

For more information see MPI-3 section 14.3.6 Table 14.4.

# [NOTES](#NOTES)

This MPI tool interface function returns two strings. This function takes two argument for each string: a buffer to store the string, and a length which must initially specify the size of the buffer. If the length passed is n then this function will copy at most n - 1 characters of the string into the corresponding buffer and set the length to the number of characters copied - 1. If the length argument is NULL or the value specified in the length is 0 the corresponding string buffer is ignored and the string is not returned.

Open MPI does not currently support binding control variables to MPI objects.

# [ERRORS](#ERRORS)

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

- **MPI\_T\_ERR\_NOT\_INITIALIZED**: The MPI Tools interface not initialized
- **MPI\_T\_ERR\_INVALID\_INDEX**: The control variable index is invalid

**See also:**

ompi\_info &lt;#man1-ompi-info&gt;

# [Copyright](#Copyright)

2003-2026, The Open MPI Community

September 16, 2026

---

Document: MPI_T_cvar_get_info(3) from openmpi 5.0.11-r1 (Chainguard OS)
Source: https://github.com/open-mpi/ompi
