MPI\_T\_CVAR\_READ(3) Open MPI MPI\_T\_CVAR\_READ(3)

MPI\_T\_cvar\_read — Read the value of a control variable

# [SYNTAX](#SYNTAX)

## [C Syntax](#C_Syntax)

```
#include <mpi.h>
int MPI_T_cvar_read(MPI_T_cvar_handle handle, const void *buf)
```

# [INPUT PARAMETERS](#INPUT_PARAMETERS)

- **handle**: Handle of the control variable to be read.
- **buf**: Initial address of storage location for variable value.

# [DESCRIPTION](#DESCRIPTION)

MPI\_T\_cvar\_read reads the value of the control variable identified by the handle specified in *handle* and stores the value in the buffer pointed to by *buf*. The caller must ensure that the buffer pointed to by *buf* is large enough to hold the entire value of the control variable.

# [ERRORS](#ERRORS)

MPI\_T\_cvar\_read will fail if:

- **MPI\_T\_ERR\_NOT\_INITIALIZED**: The MPI Tools interface not initialized
- **MPI\_T\_ERR\_INVALID\_HANDLE**: The handle is invalid

**See also:**

- MPI\_T\_cvar\_handle\_alloc &lt;#mpi-t-cvar-handle-alloc&gt;
- MPI\_T\_cvar\_get\_info &lt;#mpi-t-cvar-get-info&gt;

# [Copyright](#Copyright)

2003-2026, The Open MPI Community

September 17, 2026

---

Document: MPI_T_cvar_read(3) from openmpi-cuda-13.4 5.0.11-r0 (Chainguard OS)
