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 β€” the session argument 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_alloc
  • MPI_T_pvar_get_info
  • MPI_T_pvar_session_create
  • MPI_T_pvar_read
  • MPI_T_pvar_reset

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