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 for name. goes in, comes back out โœจ
  • desc_len โ€” the length of the string and/or the buffer for desc. 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 an MPI_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 an MPI_UNSIGNED, MPI_UNSIGNED_LONG, MPI_UNSIGNED_LONG_LONG, or MPI_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 an MPI_UNSIGNED, MPI_UNSIGNED_LONG, MPI_UNSIGNED_LONG_LONG, or MPI_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 an MPI_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 an MPI_UNSIGNED, MPI_UNSIGNED_LONG, MPI_UNSIGNED_LONG_LONG, or MPI_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 an MPI_UNSIGNED, MPI_UNSIGNED_LONG, MPI_UNSIGNED_LONG_LONG, or MPI_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 an MPI_UNSIGNED, MPI_UNSIGNED_LONG, or MPI_UNSIGNED_LONG_LONG. The starting value is 0. ๐Ÿ”ข
  • 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 an MPI_UNSIGNED, MPI_UNSIGNED_LONG, MPI_UNSIGNED_LONG_LONG, or MPI_DOUBLE. The starting value is 0. โž•
  • 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 an MPI_UNSIGNED, MPI_UNSIGNED_LONG, MPI_UNSIGNED_LONG_LONG, or MPI_DOUBLE. If the variable is represented by an MPI_DOUBLE the units will be the same as those used by MPI_Wtime(). The starting value is 0. โฑ๏ธ
  • 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 ๐Ÿ‘€

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