MPI_T_PVAR_HANDLE_FREE(3)
π 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 initializedMPI_T_ERR_INVALID_INDEX: the performance variable index is invalidMPI_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 initializedMPI_T_ERR_INVALID_HANDLE: the handle is invalid, or thehandleargument you passed in is not associated with thesessionargument
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_infoMPI_T_pvar_get_num
π Copyright π
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
- 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