This source file includes following definitions.
- MPI_T_category_get_info
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 #include "ompi/mpi/tool/mpit-internal.h"
  15 
  16 #if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
  17 #pragma weak MPI_T_category_get_info = PMPI_T_category_get_info
  18 #endif
  19 
  20 #if OMPI_PROFILING_DEFINES
  21 #include "ompi/mpi/tool/profile/defines.h"
  22 #endif
  23 
  24 
  25 int MPI_T_category_get_info(int cat_index, char *name, int *name_len,
  26                             char *desc, int *desc_len, int *num_cvars,
  27                             int *num_pvars, int *num_categories)
  28 {
  29     const mca_base_var_group_t *group;
  30     int rc = MPI_SUCCESS;
  31 
  32     if (!mpit_is_initialized ()) {
  33         return MPI_T_ERR_NOT_INITIALIZED;
  34     }
  35 
  36     ompi_mpit_lock ();
  37 
  38     do {
  39         rc = mca_base_var_group_get (cat_index, &group);
  40         if (0 > rc) {
  41             rc = (OPAL_ERR_NOT_FOUND == rc) ? MPI_T_ERR_INVALID_INDEX : MPI_ERR_OTHER;
  42             break;
  43         }
  44 
  45         if (NULL != num_pvars) {
  46             *num_pvars = opal_value_array_get_size ((opal_value_array_t *) &group->group_pvars);
  47         }
  48 
  49         if (NULL != num_cvars) {
  50             *num_cvars = opal_value_array_get_size ((opal_value_array_t *) &group->group_vars);
  51         }
  52 
  53         if (NULL != num_categories) {
  54             *num_categories = opal_value_array_get_size ((opal_value_array_t *) &group->group_subgroups);
  55         }
  56 
  57         mpit_copy_string (name, name_len, group->group_full_name);
  58         mpit_copy_string (desc, desc_len, group->group_description);
  59     } while (0);
  60 
  61     ompi_mpit_unlock ();
  62 
  63     return rc;
  64 }