This source file includes following definitions.
- MPI_T_cvar_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_cvar_get_info = PMPI_T_cvar_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_cvar_get_info(int cvar_index, char *name, int *name_len, int *verbosity,
  26                         MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc,
  27                         int *desc_len, int *bind, int *scope)
  28 {
  29     const mca_base_var_t *var;
  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_get (cvar_index, &var);
  40         if (OPAL_SUCCESS != rc) {
  41             rc = (OPAL_ERR_VALUE_OUT_OF_BOUNDS == rc || OPAL_ERR_NOT_FOUND == rc) ? MPI_T_ERR_INVALID_INDEX :
  42                 MPI_ERR_OTHER;
  43             break;
  44         }
  45 
  46         mpit_copy_string (name, name_len, var->mbv_full_name);
  47         mpit_copy_string (desc, desc_len, var->mbv_description);
  48 
  49         
  50         rc = ompit_var_type_to_datatype (var->mbv_type, datatype);
  51         if (OMPI_SUCCESS != rc) {
  52             break;
  53         }
  54 
  55         if (NULL != enumtype) {
  56             *enumtype = var->mbv_enumerator ? (MPI_T_enum) var->mbv_enumerator : MPI_T_ENUM_NULL;
  57         }
  58 
  59         if (NULL != scope) {
  60             *scope = var->mbv_scope;
  61         }
  62 
  63         
  64         if (NULL != bind) {
  65             *bind = var->mbv_bind;
  66         }
  67 
  68         if (NULL != verbosity) {
  69             *verbosity = var->mbv_info_lvl;
  70         }
  71     } while (0);
  72 
  73     ompi_mpit_unlock ();
  74 
  75     return rc;
  76 }