This source file includes following definitions.
- ucx_runtime_query
- ucx_register
- ucx_open
- ucx_query
- ucx_close
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 #include "oshmem_config.h"
  13 
  14 #include "opal/constants.h"
  15 
  16 #include "oshmem/mca/sshmem/sshmem.h"
  17 #include "oshmem/mca/sshmem/base/base.h"
  18 #include "oshmem/mca/spml/base/base.h"
  19 
  20 #include "sshmem_ucx.h"
  21 
  22 
  23 
  24 
  25 const char *mca_sshmem_ucx_component_version_string =
  26     "OSHMEM ucx sshmem MCA component version " OSHMEM_VERSION;
  27 
  28 
  29 
  30 
  31 
  32 static int ucx_register(void);
  33 static int ucx_open(void);
  34 static int ucx_close(void);
  35 static int ucx_query(mca_base_module_t **module, int *priority);
  36 static int ucx_runtime_query(mca_base_module_t **module,
  37                              int *priority,
  38                              const char *hint);
  39 
  40 
  41 
  42 
  43 
  44 mca_sshmem_ucx_component_t mca_sshmem_ucx_component = {
  45     
  46     
  47     
  48     {
  49         
  50 
  51 
  52         .base_version = {
  53             MCA_SSHMEM_BASE_VERSION_2_0_0,
  54 
  55             
  56             .mca_component_name = "ucx",
  57             MCA_BASE_MAKE_VERSION(component, OSHMEM_MAJOR_VERSION, OSHMEM_MINOR_VERSION,
  58                                   OSHMEM_RELEASE_VERSION),
  59 
  60             .mca_open_component = ucx_open,
  61             .mca_close_component = ucx_close,
  62             .mca_query_component = ucx_query,
  63             .mca_register_component_params = ucx_register,
  64         },
  65         
  66         .base_data = {
  67             
  68             MCA_BASE_METADATA_PARAM_CHECKPOINT
  69         },
  70         .runtime_query = ucx_runtime_query,
  71     },
  72 };
  73 
  74 static int
  75 ucx_runtime_query(mca_base_module_t **module,
  76                    int *priority,
  77                    const char *hint)
  78 {
  79     
  80     if (strcmp(mca_spml_base_selected_component.spmlm_version.mca_component_name, "ucx")) {
  81         *module = NULL;
  82         return OSHMEM_ERR_NOT_AVAILABLE;
  83     }
  84 
  85     *priority = mca_sshmem_ucx_component.priority;
  86     *module = (mca_base_module_t *)&mca_sshmem_ucx_module.super;
  87     return OPAL_SUCCESS;
  88 }
  89 
  90 static int
  91 ucx_register(void)
  92 {
  93     
  94     mca_sshmem_ucx_component.priority = 100;
  95     mca_base_component_var_register (&mca_sshmem_ucx_component.super.base_version,
  96                                      "priority", "Priority for sshmem ucx "
  97                                      "component (default: 100)", MCA_BASE_VAR_TYPE_INT,
  98                                      NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
  99                                      OPAL_INFO_LVL_3,
 100                                      MCA_BASE_VAR_SCOPE_ALL_EQ,
 101                                      &mca_sshmem_ucx_component.priority);
 102 
 103     return OSHMEM_SUCCESS;
 104 }
 105 
 106 static int
 107 ucx_open(void)
 108 {
 109     return OSHMEM_SUCCESS;
 110 }
 111 
 112 static int
 113 ucx_query(mca_base_module_t **module, int *priority)
 114 {
 115     *priority = mca_sshmem_ucx_component.priority;
 116     *module = (mca_base_module_t *)&mca_sshmem_ucx_module.super;
 117     return OSHMEM_SUCCESS;
 118 }
 119 
 120 static int
 121 ucx_close(void)
 122 {
 123     return OSHMEM_SUCCESS;
 124 }
 125