MPI_T_PVAR_HANDLE_FREE(3)

πŸ“¦
version 5.0.10 Β· 4 versions
, in ubuntu stonking

πŸ’– MPI_T_PVAR_HANDLE_FREE πŸ’–

okay bestie so we're in the Open MPI manual, and today's main character is MPI_T_PVAR_HANDLE_FREE(3) β€” the whole squad here is MPI_T_pvar_handle_alloc and MPI_T_pvar_handle_free, and together they're all about allocating and freeing MPI performance variable handles. periodt. πŸŽ€


✨ SYNTAX ✨

πŸ¦‹ C Syntax

#include <mpi.h>

int MPI_T_pvar_handle_alloc(int session, int pvar_index, void *obj_handle,
                            MPI_T_pvar_handle *handle, int *count)

int MPI_T_pvar_handle_free(int session, MPI_T_pvar_handle *handle)

🌸 DESCRIPTION 🌸

so MPI_T_pvar_handle_alloc binds the performance variable you named in pvar_index to the MPI object you named in obj_handle, living inside the session identified by the session parameter. πŸ’…

the object gets passed in the obj_handle argument as an address to a local variable that stores the object's handle. and here's the plot twist β€” if MPI_T_pvar_get_info returns MPI_T_BIND_NO_OBJECT as the binding for the variable, then the obj_handle argument just gets ignored, no cap. πŸ™ˆ

the handle allocated to reference the variable comes back to you in the handle argument. and upon a successful return, count holds the number of elements (of the datatype returned by a previous MPI_T_pvar_get_info call) that were used to represent this variable. iconic.

now, the value of pvar_index should be in the range 0 to num_pvar - 1, where num_pvar is the number of available performance variables as determined from a prior call to MPI_T_pvar_get_num. lowkey important. and the type of the MPI object it references must be consistent with the type returned in the bind argument from a prior call to MPI_T_pvar_get_info. vibe check passed or it's not. ⭐

and then MPI_T_pvar_handle_free does the cleanup arc: it frees a handle that was allocated by MPI_T_pvar_handle_alloc, and it sets the handle argument to MPI_T_PVAR_HANDLE_NULL. bye bye handle, you served. πŸ‘‘


πŸ’€ ERRORS πŸ’€

MPI_T_pvar_handle_alloc will fail if:

  • MPI_T_ERR_NOT_INITIALIZED: the MPI Tools interface is not initialized
  • MPI_T_ERR_INVALID_INDEX: the performance variable index is invalid
  • MPI_T_ERR_OUT_OF_HANDLES: no more handles available 😭

MPI_T_pvar_handle_free will fail if:

  • MPI_T_ERR_NOT_INITIALIZED: the MPI Tools interface is not initialized
  • MPI_T_ERR_INVALID_HANDLE: the handle is invalid, or the handle argument you passed in is not associated with the session argument
fr fr these errors are not the vibe β€” if you see MPI_T_ERR_INVALID_HANDLE, double-check that your handle actually belongs to that session before you go blaming anybody else 🫢

πŸ”₯ See also πŸ”₯

  • MPI_T_pvar_get_info
  • MPI_T_pvar_get_num

2003-2026, The Open MPI Community


and that's the whole page bestie, you ate that πŸ“ β€” much love from the Open MPI girlies, this was the MPI_T_PVAR_HANDLE_FREE(3) page, dated Sep 10, 2026. mwah πŸ’œβœ¨

πŸ“¦ where this page comes from