MPI_T_PVAR_READRESET(3)
π MPI_T_pvar_readreset β the Open MPI glow-up π¦
okay bestie, so we're in the Open MPI manual and today's main character is MPI_T_pvar_readreset β the function that reads a performance variable and resets it, all in one atomic lil swoop. no cap, it's giving "one trip, two jobs" energy β¨
β¨ SYNOPSIS β¨
π C Syntax
#include <mpi.h>
int MPI_T_pvar_readreset(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const void *buf)
πΈ INPUT PARAMETERS πΈ
sessionβ the performance experiment session. like, the whole vibe container for your experiment π§handleβ the performance variable handle. this is your little VIP pass to one specific variable πbufβ the initial address of the storage location for the variable value. you're handing it a place to put the answer π
π DESCRIPTION π
so MPI_T_pvar_readreset does the cutest thing: it atomically queries and resets the value of a performance variable that's bound to the handle you passed in handle, inside the session you passed in session. the result gets stashed in the buffer that buf points to. π«
but listen β this function can only be used with performance variables that are atomic and not readonly. if your variable isn't both of those, it's a no from the function, periodt π
and one thing you cannot skip: the caller has to make sure the buffer pointed to by buf is big enough to hold the entire value of the performance variable. under-size it and that's on you, bestie π like, the function is not gonna check your math.
π ERRORS π
MPI_T_pvar_readreset will fail if:
MPI_T_ERR_NOT_INITIALIZEDβ the MPI Tools interface not initialized π«MPI_T_ERR_INVALID_HANDLEβ the handle is invalid or not associated with the session πMPI_T_ERR_INVALID_SESSIONβ thesessionargument is not a valid session πMPI_T_ERR_PVAR_NO_ATOMICβ the variable cannot be read and written atomically π«MPI_T_ERR_PVAR_NO_WRITEβ the variable cannot be reset π«
π SEE ALSO π
like obviously go read these too, iykyk:
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 β iconic, they've been serving since 2003 π₯
okay that's the whole page, bestie, you ate that π«Ά and for the sign-off: this was the Open MPI manual, page MPI_T_PVAR_READRESET(3), dated Sep 11, 2026 β go forth and readreset responsibly ππ¦β
π¦ 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