MPI_T_CVAR_GET_INFO(3)
π MPI_T_CVAR_GET_INFO(3) π
okay bestie so this is a page from the Open MPI manual, and it's literally all about one lil function that lets you snoop on a control variable. no cap. also real quick, the MPI_T stuff has a whole other home: MPI_T see MPI-3 section 14.3.5.
β¨ NAME β¨
MPI_T_cvar_get_info β Query information from a control variable π΅οΈβοΈ
πΈ 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)
bestie copy that exactly, i am not even playing. const *desc is in there like that, periodt.
π INPUT PARAMETERS π
cvar_indexβ the index of the control variable we're gonna interrogate, iykyk.
π¦ INPUT/OUTPUT PARAMETERS π¦
name_lenβ the length of the string and/or the buffer forname, okay?desc_lenβ the length of the string and/or the buffer fordesc, same energy.
π OUTPUT PARAMETERS π
nameβ the buffer where we return the string that holds the name of the control variable. iconic.verbosityβ the verbosity level of this variable, lowkey important.datatypeβ the MPI datatype of the info stored in the control variable.enumtypeβ optional descriptor for enumeration info. optional!! πdescβ the buffer where we return the string that holds the description of the control variable.bindβ the type of MPI object this variable must be bound to.scopeβ the scope of when changes to this variable are even possible.
π DESCRIPTION π
So MPI_T_cvar_get_info lets you query info about a control variable. the way it works is: it hands you back the verbosity, datatype, enumeration type, binding, and scope of the variable you asked about, dropping them into the arguments verbosity, datatype, enumtype, bind, and scope, respectively. and ngl the glow-up here is that control variables in Open MPI are literally the same thing as MCA parameters. same variable, different name. π
π VERBOSITY π
okay so Open MPI exposes a very large number of MCA parameters (a.k.a. control variables), and to keep that from being a whole chaotic mess, control variables get sorted into nine verbosity levels, matching up with the equivalent ompi_info level. the nine levels, in increasing order, bestie:
MPI_T_VERBOSITY_USER_BASIC: basic info that users actually care about β¨MPI_T_VERBOSITY_USER_DETAIL: detailed info that users care aboutMPI_T_VERBOSITY_USER_ALL: all the rest of the info that users care aboutMPI_T_VERBOSITY_TUNER_BASIC: basic info you need for tuningMPI_T_VERBOSITY_TUNER_DETAIL: detailed info you need for tuningMPI_T_VERBOSITY_TUNER_ALL: all the rest of the info you need 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 the rest of the info for MPI implementors
for more deets, see MPI-3 section 14.3.1.
π§ DATATYPE π§
the datatype that comes back from MPI_T_cvar_get_info is restricted to just one of these, no other options, that's the whole menu:
MPI_INTMPI_UNSIGNEDMPI_UNSIGNED_LONGMPI_UNSIGNED_LONG_LONGMPI_COUNTMPI_CHARMPI_DOUBLE
for more info on datatypes in MPI_T, hit up MPI-3 section 14.3.5. π«Ά
π₯ SCOPE π₯
scope is the vibe check on when and how you're allowed to change a control variable. straight from MPI-3 section 14.3.6, scope can be any of these:
MPI_T_SCOPE_CONSTANT: read-only, the value is constant π§MPI_T_SCOPE_READONLY: read-only, cannot be written, but it can still change πMPI_T_SCOPE_LOCAL: may be writeable, and writing is a local operationMPI_T_SCOPE_GROUP: may be writeable, but it has to be done to a group of processes β every process in a group must be set to consistent valuesMPI_T_SCOPE_GROUP_EQ: may be writeable, must be done to a group of processes β every process in a group must be set to the same valueMPI_T_SCOPE_ALL: may be writeable, must be done to all processes β all connected processes must be set to consistent valuesMPI_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 info see MPI-3 section 14.3.6 Table 14.4.
π NOTES π
bestie pay attention, this part is a lil tricky. this MPI tool interface function returns two strings. and for each string it takes two arguments: a buffer to store the string, and a length that has to initially specify the size of that buffer.
so if the length you pass in is n, then this function will copy at most n - 1 characters of the string into the corresponding buffer, and it sets the length to the number of characters copied minus 1. math, but make it cozy. π
and if the length argument is NULL, or the value specified in the length is 0, then the corresponding string buffer gets straight up ignored and the string is not returned at all. so don't be surprised when nothing shows up. π
also, Open MPI does not currently support binding control variables to MPI objects. so like, that's a thing that just isn't a thing yet.
π ERRORS π
MPI_T_cvar_get_info will fail if:
MPI_T_ERR_NOT_INITIALIZED: the MPI Tools interface was not initialized π΅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 bestie, slay π
β¨ this was the Open MPI manual, MPI_T_CVAR_GET_INFO(3), dated Sep 10, 2026. go query some control variables, you've got this π«Άπ
π¦ where this page comes from
- ubuntu stonking: openmpi-doc 5.0.10-6 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms