MPI_T_CVAR_GET_INFO(3)
๐ MPI_T_cvar_get_info โ okay bestie, let's get you that control-variable tea โโจ
So this whole page lives in the MPI_T manual (that's the MPI Tools interface, iykyk) โ and the spec says see MPI-3 section 14.3.5 for the full lore. ๐ซถ
MPI_T_cvar_get_info โ query information from a control variable. Fr fr, it's the "tell me everything about this cvar" function.
โจ 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 ๐
cvar_indexโ the index of the control variable you wanna snoop on. That's the one you're querying, bestie. ๐
๐ฆ INPUT/OUTPUT PARAMETERS ๐ฆ
name_lenโ the length of the string and/or buffer forname. Comes in as a length, comes out as a length. Glow-up moment. โจdesc_lenโ same deal but fordesc: length of the string and/or buffer for the description.
๐ OUTPUT PARAMETERS ๐
nameโ a buffer where the string containing the name of the control variable gets dropped. ๐ท๏ธverbosityโ the verbosity level of this variable (more on that below, and it's giving tiers).datatypeโ the MPI datatype of the info stored in the control variable.enumtypeโ an optional descriptor for enumeration information. Optional! Like a cute accessory. ๐descโ a buffer that gets the string containing the description of the control variable. Storytime.bindโ the type of MPI object this variable must be bound to.scopeโ the scope of when changes to this variable are even possible. Timing is everything. โฐ
๐ DESCRIPTION ๐
So MPI_T_cvar_get_info is literally your go-to for querying info about a control variable. It hands back the verbosity, datatype, enumeration type, binding, and scope of the queried control variable into the arguments verbosity, datatype, enumtype, bind, and scope respectively. Clean, one stop, no cap. ๐
And here's the key thing bestie: control variables in Open MPI are the same as MCA parameters. Same thing, different name. Write that down. ๐
โญ VERBOSITY โญ
Because Open MPI exposes a very large number of MCA parameters (a.k.a. control variables โ like, an unhinged amount), control variables get sorted into nine verbosity levels that match up with the equivalent ompi_info level. Nine! Here they are, in increasing order:
MPI_T_VERBOSITY_USER_BASICโ basic info of interest to usersMPI_T_VERBOSITY_USER_DETAILโ detailed info of interest to usersMPI_T_VERBOSITY_USER_ALLโ all remaining info of interest to usersMPI_T_VERBOSITY_TUNER_BASICโ basic info required for tuningMPI_T_VERBOSITY_TUNER_DETAILโ detailed info required for tuningMPI_T_VERBOSITY_TUNER_ALLโ all remaining info required for tuningMPI_T_VERBOSITY_MPIDEV_BASICโ basic info for MPI implementorsMPI_T_VERBOSITY_MPIDEV_DETAILโ detailed info for MPI implementorsMPI_T_VERBOSITY_MPIDEV_ALLโ all remaining info for MPI implementors
Want the deep lore? See MPI-3 section 14.3.1. ๐
๐ฅ DATATYPE ๐ฅ
The datatype you get back from MPI_T_cvar_get_info is restricted to one of these, periodt:
MPI_INT, MPI_UNSIGNED, MPI_UNSIGNED_LONG, MPI_UNSIGNED_LONG_LONG, MPI_COUNT, MPI_CHAR, and MPI_DOUBLE.
No freestyling. For more on datatypes in MPI_T, see MPI-3 section 14.3.5. ๐ง
๐ธ SCOPE ๐ธ
Scope describes when and how changes can be made to a control variable. Per MPI-3 section 14.3.6, scope may be any of the following:
MPI_T_SCOPE_CONSTANTโ read-only, the value is constantMPI_T_SCOPE_READONLYโ read-only, cannot be written, but it can changeMPI_T_SCOPE_LOCALโ may be writeable, and writing is a local operationMPI_T_SCOPE_GROUPโ may be writeable, must be done to a group of processes, and all processes in a group must be set to consistent valuesMPI_T_SCOPE_GROUP_EQโ may be writeable, must be done to a group of processes, and all processes in a group must be set to the same valueMPI_T_SCOPE_ALLโ may be writeable, must be done to all processes, and all connected processes must be set to consistent valuesMPI_T_SCOPE_ALL_EQโ may be writeable, must be done to all processes, and all connected processes must be set to the same value
For the full picture, see MPI-3 section 14.3.6 Table 14.4. ๐
๐ฆ NOTES ๐ฆ
Okay this part matters so listen up ๐ โ this MPI tool interface function returns two strings, and it takes two arguments for each string: a buffer to store the string, and a length which must initially specify the size of the buffer.
If the length you pass is n, then the function copies at most n - 1 characters of the string into the corresponding buffer, and sets the length to the number of characters copied - 1. Math is mathing. ๐งฎ
And if the length argument is NULL, or the value specified in the length is 0, then that corresponding string buffer is just ignored and the string is not returned. Gone. Not invited. ๐
Also lowkey important: Open MPI does not currently support binding control variables to MPI objects. That's just how it is rn. ๐ญ
๐ ERRORS ๐
MPI_T_cvar_get_info will fail if:
MPI_T_ERR_NOT_INITIALIZEDโ the MPI Tools interface not initialized (you forgot to set it up bestie, iconic mistake)MPI_T_ERR_INVALID_INDEXโ the control variable index is invalid ๐ซ
๐ SEE ALSO ๐
ompi_info
๐ COPYRIGHT ๐
2003-2026, The Open MPI Community
And that's the whole page, no notes! ๐ซถ This lil beauty comes to you from the Open MPI source, dated Sep 11, 2026 โ go off, calendar. โจ๐๐
๐ฆ where this page comes from
- arch rolling: openmpi 5.0.11-1 ยท BSD-3-Clause AND LicenseRef-MPICH
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms