1515.SH C Syntax
1616.nf
1717#include <mpi.h>
18- int MPI_T_pvar_handle_alloc(int \fI pvar_index \fP , void *\fI obj_handle \fP ,
18+ int MPI_T_pvar_handle_alloc(int \fI session \fP , int \ fIpvar_index \fP , void *\fI obj_handle \fP ,
1919 MPI_T_pvar_handle *\fI handle \fP , int *\fI count \fP )
2020
21- int MPI_T_pvar_handle_free(MPI_T_pvar_handle *\fI handle \fP )
21+ int MPI_T_pvar_handle_free(int \fI session \fP , MPI_T_pvar_handle *\fI handle \fP )
2222
2323.SH DESCRIPTION
2424.ft R
2525MPI_T_pvar_handle_alloc binds the performance variable specified in \fI pvar_index \fP to the MPI
26- object specified in \fI obj_handle \fP . If MPI_T_pvar_get_info returns MPI_T_BIND_NO_OBJECT
27- as the binding for the variable the \fI obj_handle \fP argument is ignored. The number of
28- values represented by this performance variable is returned in the \fI count \fP parameter.
26+ object specified in \fI obj_handle \fP in the session identified by the parameter
27+ \fI session \fP . The object is passed in the argument \fI obj_handle \fP as an
28+ address to a local variable that stores the object’s handle. If
29+ MPI_T_pvar_get_info returns MPI_T_BIND_NO_OBJECT as the binding
30+ for the variable the \fI obj_handle \fP argument is ignored. The handle
31+ allocated to reference the variable is returned in the argument \fI handle \fP . Upon successful
32+ return, \fI count \fP contains the number of elements (of the datatype returned by a previous
33+ MPI_T_PVAR_GET_INFO call) used to represent this variable.
34+
35+ The value of \fI pvar_index \fP should be in the range 0 to \fI num_pvar - 1 \fP ,
36+ where \fI num_pvar \fP is the number of available performance variables as
37+ determined from a prior call to \fI MPI_T_PVAR_GET_NUM \fP . The type of the
38+ MPI object it references must be consistent with the type returned in the
39+ bind argument in a prior call to \fI MPI_T_PVAR_GET_INFO \fP .
2940
3041MPI_T_pvar_handle_free frees a handle allocated by MPI_T_pvar_handle_alloc and sets the
3142\fI handle \fP argument to MPI_T_PVAR_HANDLE_NULL.
@@ -50,11 +61,12 @@ MPI_T_pvar_handle_free() will fail if:
5061The MPI Tools interface not initialized
5162.TP 1i
5263[MPI_T_ERR_INVALID_HANDLE]
53- The handle is invalid
64+ The handle is invalid or the handle argument passed in is not associated with the session argument
5465
5566
5667.SH SEE ALSO
5768.ft R
5869.nf
5970MPI_T_pvar_get_info
71+ MPI_T_pvar_get_num
6072
0 commit comments