MPI_T_PVAR_READRESET(3)
β¨ NAME β¨
MPI_T_pvar_readreset β atomically read and reset the value of a performance variable π
okay so real quick before anything else: this whole page is from Open MPI, and the manpage header is MPI_T_PVAR_READRESET(3) β section 3, the library-calls section, bestie. that's where we live now π«Ά
π SYNOPSIS π
C Syntax
#include <mpi.h>
int MPI_T_pvar_readreset(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const void *buf)
yeah that's it, that's the whole flex. three arguments, one int coming back at you π₯
πΈ INPUT PARAMETERS πΈ
sessionβ performance experiment session. the whole vibe container for your perf stuff, iykyk.handleβ performance variable handle. this is your lil pointer-passport to one specific variable.bufβ initial address of storage location for variable value. like, where the answer goes. you bring the space, it brings the number π¦
π¦ DESCRIPTION π¦
MPI_T_pvar_readreset is, no joke, doing TWO things in ONE breath: it atomically queries and resets the value of a performance variable bound to the handle you gave it as handle, inside the session you gave it as session. the result lands in the buffer that buf points to. iconic. main character energy. one syscall-shaped moment, two whole outcomes β¨
BUT. and this is the part where you need to lock in π’ this function can only be used with performance variables that are atomic and not readonly. not "usually". not "if you're lucky". those are the rules, periodt.
and the other thing: the caller must ensure that the buffer pointed to by buf is large enough to hold the entire value of the performance variable. that's on you, not on MPI. MPI will not check. MPI will not warn you. you're the one holding the bag π so make that buffer big enough, please, for me.
π ERRORS π
MPI_T_pvar_readreset will fail if:
MPI_T_ERR_NOT_INITIALIZEDβ the MPI Tools interface not initialized π« like, you gotta boot the thing up first, bestie.MPI_T_ERR_INVALID_HANDLEβ the handle is invalid or not associated with the session π that handle doesn't belong here.MPI_T_ERR_INVALID_SESSIONβ session argument is not a valid session π the session said "who are you".MPI_T_ERR_PVAR_NO_ATOMICβ variable cannot be read and written atomically β‘ nope, not that kind of variable, sorry.MPI_T_ERR_PVAR_NO_WRITEβ variable cannot be reset π read-only-ish energy, we can't touch it.
π SEE ALSO π
go read these next, they're all part of the same friend group:
MPI_T_pvar_handle_allocMPI_T_pvar_get_infoMPI_T_pvar_session_createMPI_T_pvar_readMPI_T_pvar_reset
π COPYRIGHT π
2003-2026, The Open MPI Community
okay that's the whole page, mwah π this was Open MPI, page MPI_T_PVAR_READRESET(3), dated Sep 10, 2026 β and the original footer says exactly that too. so go definitely-not-forget-to-size-your-buf, and I'll see you in the next man page. byeee π§π
π¦ 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