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 for name. Comes in as a length, comes out as a length. Glow-up moment. โœจ
  • desc_len โ€” same deal but for desc: 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:

  1. MPI_T_VERBOSITY_USER_BASIC โ€” basic info of interest to users
  2. MPI_T_VERBOSITY_USER_DETAIL โ€” detailed info of interest to users
  3. MPI_T_VERBOSITY_USER_ALL โ€” all remaining info of interest to users
  4. MPI_T_VERBOSITY_TUNER_BASIC โ€” basic info required for tuning
  5. MPI_T_VERBOSITY_TUNER_DETAIL โ€” detailed info required for tuning
  6. MPI_T_VERBOSITY_TUNER_ALL โ€” all remaining info required for tuning
  7. MPI_T_VERBOSITY_MPIDEV_BASIC โ€” basic info for MPI implementors
  8. MPI_T_VERBOSITY_MPIDEV_DETAIL โ€” detailed info for MPI implementors
  9. MPI_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 constant
  • MPI_T_SCOPE_READONLY โ€” read-only, cannot be written, but it can change
  • MPI_T_SCOPE_LOCAL โ€” may be writeable, and writing is a local operation
  • MPI_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 values
  • MPI_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 value
  • MPI_T_SCOPE_ALL โ€” may be writeable, must be done to all processes, and all connected processes must be set to consistent values
  • MPI_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

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