1
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
3
* (C) 2011 by Argonne National Laboratory.
4
* See COPYRIGHT in top-level directory.
9
/* -- Begin Profiling Symbol Block for routine MPI_T_category_get_pvars */
10
#if defined(HAVE_PRAGMA_WEAK)
11
#pragma weak MPI_T_category_get_pvars = PMPI_T_category_get_pvars
12
#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
13
#pragma _HP_SECONDARY_DEF PMPI_T_category_get_pvars MPI_T_category_get_pvars
14
#elif defined(HAVE_PRAGMA_CRI_DUP)
15
#pragma _CRI duplicate MPI_T_category_get_pvars as PMPI_T_category_get_pvars
17
/* -- End Profiling Symbol Block */
19
/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build
21
#ifndef MPICH_MPI_FROM_PMPI
22
#undef MPI_T_category_get_pvars
23
#define MPI_T_category_get_pvars PMPI_T_category_get_pvars
25
/* any non-MPI functions go here, especially non-static ones */
28
#define FUNCNAME MPIR_T_category_get_pvars_impl
30
#define FCNAME MPIU_QUOTE(FUNCNAME)
31
int MPIR_T_category_get_pvars_impl(int cat_index, int len, int indices[])
33
int mpi_errno = MPI_SUCCESS;
35
/* TODO implement this function */
43
#endif /* MPICH_MPI_FROM_PMPI */
46
#define FUNCNAME MPI_T_category_get_pvars
48
#define FCNAME MPIU_QUOTE(FUNCNAME)
50
MPI_T_category_get_pvars - XXX description here
53
+ cat_index - index of the category to be queried, in the range [0,N-1] (integer)
54
- len - the length of the indices array (integer)
57
. indices - an integer array of size len, indicating performance variable indices (array of integers)
65
int MPI_T_category_get_pvars(int cat_index, int len, int indices[])
67
int mpi_errno = MPI_SUCCESS;
68
MPID_MPI_STATE_DECL(MPID_STATE_MPI_T_CATEGORY_GET_PVARS);
70
MPIU_THREAD_CS_ENTER(ALLFUNC,);
71
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_T_CATEGORY_GET_PVARS);
73
/* Validate parameters, especially handles needing to be converted */
74
# ifdef HAVE_ERROR_CHECKING
76
MPID_BEGIN_ERROR_CHECKS
79
/* TODO more checks may be appropriate */
80
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
84
# endif /* HAVE_ERROR_CHECKING */
86
/* Convert MPI object handles to object pointers */
88
/* Validate parameters and objects (post conversion) */
89
# ifdef HAVE_ERROR_CHECKING
91
MPID_BEGIN_ERROR_CHECKS
93
/* TODO more checks may be appropriate (counts, in_place, buffer aliasing, etc) */
94
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
98
# endif /* HAVE_ERROR_CHECKING */
100
/* ... body of routine ... */
102
mpi_errno = MPIR_T_category_get_pvars_impl(cat_index, len, indices);
103
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
105
/* ... end of body of routine ... */
108
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_T_CATEGORY_GET_PVARS);
109
MPIU_THREAD_CS_EXIT(ALLFUNC,);
113
/* --BEGIN ERROR HANDLING-- */
114
# ifdef HAVE_ERROR_CHECKING
116
mpi_errno = MPIR_Err_create_code(
117
mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER,
118
"**mpi_t_category_get_pvars", "**mpi_t_category_get_pvars %d %d %p", cat_index, len, indices);
121
mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno);
123
/* --END ERROR HANDLING-- */