MPI_T_PVAR_GET_INFO(3)
๐ MPI_T_PVAR_GET_INFO ๐
okay so bestie, this is a page from the Open MPI manual, and it's literally all about MPI_T_pvar_get_info โ the little function that spills the tea on a performance variable ๐
โจ NAME โจ
MPI_T_pvar_get_info โ query information from a performance variable ๐
โจ SYNTAX โจ
๐ธ C Syntax
#include <mpi.h>
int MPI_T_pvar_get_info(int pvar_index, char *name, int *name_len,
int *verbosity, int *var_class, MPI_Datatype *datatype, MPI_T_enum *enumtype,
char *desc, int *desc_len, int *bind, int *readonly, int *continuous,
int *atomic)
๐ INPUT PARAMETERS ๐
pvar_indexโ the index of the performance variable you're trying to get info about. like, which one, bestie ๐
๐ฆ INPUT/OUTPUT PARAMETERS ๐ฆ
name_lenโ the length of the string and/or the buffer forname. goes in, comes back out โจdesc_lenโ the length of the string and/or the buffer fordesc. same deal ๐ซ
๐ OUTPUT PARAMETERS ๐
nameโ buffer where the string holding the performance variable's name gets returned ๐verbosityโ the verbosity level of this variable ๐ฃ๏ธvar_classโ the class of performance variable it belongs to ๐datatypeโ the MPI datatype of the info stored in the performance variable ๐ท๏ธenumtypeโ optional descriptor for enumeration info, iykyk ๐งdescโ buffer where the string holding the performance variable's description gets returned ๐bindโ the type of MPI object this variable has to be bound to ๐readonlyโ flag saying whether the variable can be written/reset ๐continuousโ flag saying whether the variable can be started and stopped, or whether it's continuously active โพ๏ธatomicโ flag saying whether the variable can be atomically read and reset โ๏ธ
๐ DESCRIPTION ๐
So MPI_T_pvar_get_info is the function you call to query info from a performance variable. It hands back the verbosity, class, datatype, enumeration type, and binding of the queried control variable in the arguments verbosity, var_class, datatype, enumtype, and bind respectively โ yes, in that exact order, no cap ๐
The flags telling you whether the variable is read-only, continuous, or atomic come back in readonly, continuous, and atomic accordingly. Peep MPI-3 section 14.3.7 for more, and if you wanna know about variable verbosity, go read the man page for MPI_T_cvar_get_info ๐ซถ
๐ VARIABLE CLASS ๐
Performance variables are sorted into classes, and those classes describe their initial value, their valid types, and their behavior. the var_class parameter can hand you back one of these, bestie:
MPI_T_PVAR_CLASS_STATEโ the variable represents a set of discrete states, which may be described by an enumerator. Variables of this class must be represented by anMPI_INT. The starting value is the current state of the variable. ๐๏ธMPI_T_PVAR_CLASS_LEVELโ the variable represents the current utilization level of a resource. Variables of this class must be represented by anMPI_UNSIGNED,MPI_UNSIGNED_LONG,MPI_UNSIGNED_LONG_LONG, orMPI_DOUBLE. The starting value is the current utilization level of the resource. ๐MPI_T_PVAR_CLASS_SIZEโ the variable represents the fixed size of a resource. Variables of this class are represented by anMPI_UNSIGNED,MPI_UNSIGNED_LONG,MPI_UNSIGNED_LONG_LONG, orMPI_DOUBLE. The starting value is the current size of the resource. ๐MPI_T_PVAR_CLASS_PERCENTAGEโ the variable represents the current percentage utilization level of a resource. Variables of this class are represented by anMPI_DOUBLE. The starting value is the current percentage utilization of the resource. ๐ฏMPI_T_PVAR_CLASS_HIGHWATERMARKโ the variable represents the high watermark of the utilization of a resource. Variables of this class are represented by anMPI_UNSIGNED,MPI_UNSIGNED_LONG,MPI_UNSIGNED_LONG_LONG, orMPI_DOUBLE. The starting value is the current utilization of the resource. ๐MPI_T_PVAR_CLASS_HIGHWATERMARKโ okay yes, this one is listed a second time under the exact same name, but the description says it represents the low watermark of the utilization of a resource. Variables of this class are represented by anMPI_UNSIGNED,MPI_UNSIGNED_LONG,MPI_UNSIGNED_LONG_LONG, orMPI_DOUBLE. The starting value is the current utilization of the resource. I'm just the messenger, don't come for me ๐MPI_T_PVAR_CLASS_COUNTERโ the variable represents a count of how many times a specific event happened. Variables of this class are represented by anMPI_UNSIGNED,MPI_UNSIGNED_LONG, orMPI_UNSIGNED_LONG_LONG. The starting value is0. ๐ขMPI_T_PVAR_CLASS_COUNTERโ and here's the name again (fr fr, twice on the page), this time for a variable that represents an aggregated value โ a sum of arguments processed during a specific event. Variables of this class are represented by anMPI_UNSIGNED,MPI_UNSIGNED_LONG,MPI_UNSIGNED_LONG_LONG, orMPI_DOUBLE. The starting value is0. โMPI_T_PVAR_CLASS_TIMERโ the variable represents the aggregated time the MPI implementation spent processing an event, a type of event, or a section of code. Variables of this class are represented by anMPI_UNSIGNED,MPI_UNSIGNED_LONG,MPI_UNSIGNED_LONG_LONG, orMPI_DOUBLE. If the variable is represented by anMPI_DOUBLEthe units will be the same as those used byMPI_Wtime(). The starting value is0. โฑ๏ธMPI_T_PVAR_CLASS_GENERICโ the variable just doesn't fit into any other class. Can be represented by a type supported by the MPI tool information interface (peep DATATYPE below). The starting value is variable specific. ๐ฒ
For more info, see MPI-3 section 14.3.7. ๐
โญ DATATYPE โญ
The datatype that MPI_T_pvar_get_info hands back 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. For more on datatypes in the MPI Tool information interface, see MPI-3 section 14.3.5. ๐งฌ
๐ BINDING ๐
Performance variables may be bound to an MPI object, and the binding that comes back in the bind parameter can be one of these:
MPI_T_BIND_NO_OBJECTโ no object ๐ซฅMPI_T_BIND_MPI_COMMโ MPI communicator ๐กMPI_T_BIND_MPI_DATATYPEโ MPI datatype ๐ท๏ธMPI_T_BIND_MPI_ERRHANDLERโ MPI error handler ๐จMPI_T_BIND_MPI_FILEโ MPI file handle ๐MPI_T_BIND_MPI_GROUPโ MPI group ๐ฏMPI_T_BIND_MPI_OPโ MPI reduction operator โMPI_T_BIND_MPI_REQUESTโ MPI request ๐จMPI_T_BIND_MPI_WINโ MPI window for one-sided communication ๐ชMPI_T_BIND_MPI_MESSAGEโ MPI message object ๐MPI_T_BIND_MPI_INFOโ MPI info object โน๏ธ
For more info, see MPI-3 section 14.3.2. ๐
๐ง NOTES ๐ง
This MPI tool interface function returns two strings, so it takes two arguments for each string: a buffer to store the string, and a length that must initially specify the size of the buffer. 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 set the length to the number of characters copied minus 1. ๐งฎ
If the length argument is NULL, or the value specified in the length is 0, then the corresponding string buffer is ignored and the string is not returned. lowkey important, don't forget it ๐
For more info, see MPI-3 section 14.3.3. ๐
๐ ERRORS ๐
MPI_T_pvar_get_info will fail if:
MPI_T_ERR_NOT_INITIALIZEDโ the MPI Tools interface isn't initialized ๐ดMPI_T_ERR_INVALID_INDEXโ the performance variable index is invalid ๐ซ
๐ธ SEE ALSO ๐ธ
MPI_T_cvar_get_info๐
๐ COPYRIGHT ๐
alright bestie, that's the whole page, you ate that ๐
the copyright up top belongs to 2003-2026, The Open MPI Community, and this gorgeous little doc was dated Sep 11, 2026 under the MPI_T_PVAR_GET_INFO(3) Open MPI banner. now go query some performance variables, you icon ๐โจ๐ฆ
๐ฆ 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