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

MPI\_T\_pvar\_read — Read the value of a performance variable

# [SYNTAX](#SYNTAX)

## [C Syntax](#C_Syntax)

```
#include <mpi.h>
int MPI_T_pvar_read(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const void *buf)
```

# [INPUT PARAMETERS](#INPUT_PARAMETERS)

- **session**: Performance experiment session.
- **handle**: Performance variable handle.
- **buf**: Initial address of storage location for variable value.

# [DESCRIPTION](#DESCRIPTION)

MPI\_T\_pvar\_read queries the value of a performance variable identified by the handle specified in *handle* in the session specified in *session*. The result is stored 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 performance variable.

# [ERRORS](#ERRORS)

MPI\_T\_pvar\_read will fail if:

- **MPI\_T\_ERR\_NOT\_INITIALIZED**: The MPI Tools interface not initialized
- **MPI\_T\_ERR\_INVALID\_HANDLE**: The handle is invalid or not associated with the session
- **MPI\_T\_ERR\_INVALID\_SESSION**: Session argument is not a valid session

**See also:**

- MPI\_T\_pvar\_handle\_alloc &lt;#mpi-t-pvar-handle-alloc&gt;
- MPI\_T\_pvar\_get\_info &lt;#mpi-t-pvar-get-info&gt;
- MPI\_T\_pvar\_session\_create &lt;#mpi-t-pvar-session-create&gt;

# [Copyright](#Copyright)

2003-2026, The Open MPI Community

October 30, 2026

---

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