This source file includes following definitions.
- orte_oob_base_register
- orte_oob_base_close
- orte_oob_base_open
- pr_cons
- pr_des
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  25 
  26 
  27 #include "orte_config.h"
  28 #include "orte/constants.h"
  29 
  30 #include "opal/class/opal_bitmap.h"
  31 #include "orte/mca/mca.h"
  32 #include "opal/runtime/opal_progress_threads.h"
  33 #include "opal/util/output.h"
  34 #include "opal/mca/base/base.h"
  35 
  36 #include "orte/mca/rml/base/base.h"
  37 #include "orte/mca/oob/base/base.h"
  38 
  39 #if OPAL_ENABLE_FT_CR == 1
  40 #include "orte/mca/state/state.h"
  41 #endif
  42 
  43 
  44 
  45 
  46 
  47 
  48 
  49 #include "orte/mca/oob/base/static-components.h"
  50 
  51 
  52 
  53 
  54 orte_oob_base_t orte_oob_base = {0};
  55 
  56 static int orte_oob_base_register(mca_base_register_flag_t flags)
  57 {
  58     orte_oob_base.num_threads = 0;
  59     (void)mca_base_var_register("orte", "oob", "base", "num_progress_threads",
  60                                 "Number of independent progress OOB messages for each interface",
  61                                 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  62                                 OPAL_INFO_LVL_9,
  63                                 MCA_BASE_VAR_SCOPE_READONLY,
  64                                 &orte_oob_base.num_threads);
  65 
  66 #if OPAL_ENABLE_TIMING
  67     
  68     orte_oob_base.timing = false;
  69     (void) mca_base_var_register ("orte", "oob", "base", "timing",
  70                                   "Enable OOB timings",
  71                                   MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
  72                                   OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY,
  73                                   &orte_oob_base.timing);
  74 #endif
  75     return ORTE_SUCCESS;
  76 }
  77 
  78 static int orte_oob_base_close(void)
  79 {
  80     mca_oob_base_component_t *component;
  81     mca_base_component_list_item_t *cli;
  82     opal_object_t *value;
  83     uint64_t key;
  84 
  85     
  86     while (NULL != (cli = (mca_base_component_list_item_t *) opal_list_remove_first (&orte_oob_base.actives))) {
  87         component = (mca_oob_base_component_t*)cli->cli_component;
  88         if (NULL != component->shutdown) {
  89             component->shutdown();
  90         }
  91         OBJ_RELEASE(cli);
  92     }
  93 
  94     if (!ORTE_PROC_IS_APP && !ORTE_PROC_IS_TOOL) {
  95         opal_progress_thread_finalize("OOB-BASE");
  96     }
  97 
  98     
  99     OBJ_DESTRUCT(&orte_oob_base.actives);
 100 
 101     
 102     OPAL_HASH_TABLE_FOREACH(key, uint64, value, &orte_oob_base.peers) {
 103         if (NULL != value) {
 104             OBJ_RELEASE(value);
 105         }
 106     }
 107 
 108     OBJ_DESTRUCT(&orte_oob_base.peers);
 109 
 110     return mca_base_framework_components_close(&orte_oob_base_framework, NULL);
 111 }
 112 
 113 
 114 
 115 
 116 
 117 static int orte_oob_base_open(mca_base_open_flag_t flags)
 118 {
 119     
 120     orte_oob_base.max_uri_length = -1;
 121     OBJ_CONSTRUCT(&orte_oob_base.peers, opal_hash_table_t);
 122     opal_hash_table_init(&orte_oob_base.peers, 128);
 123     OBJ_CONSTRUCT(&orte_oob_base.actives, opal_list_t);
 124 
 125     if (ORTE_PROC_IS_APP || ORTE_PROC_IS_TOOL) {
 126         orte_oob_base.ev_base = orte_event_base;
 127     } else {
 128         orte_oob_base.ev_base = opal_progress_thread_init("OOB-BASE");
 129     }
 130 
 131 
 132 #if OPAL_ENABLE_FT_CR == 1
 133     
 134     orte_state.add_job_state(ORTE_JOB_STATE_FT_CHECKPOINT, orte_oob_base_ft_event, ORTE_ERROR_PRI);
 135     orte_state.add_job_state(ORTE_JOB_STATE_FT_CONTINUE, orte_oob_base_ft_event, ORTE_ERROR_PRI);
 136     orte_state.add_job_state(ORTE_JOB_STATE_FT_RESTART, orte_oob_base_ft_event, ORTE_ERROR_PRI);
 137 #endif
 138 
 139      
 140     return mca_base_framework_components_open(&orte_oob_base_framework, flags);
 141 }
 142 
 143 MCA_BASE_FRAMEWORK_DECLARE(orte, oob, "Out-of-Band Messaging Subsystem",
 144                            orte_oob_base_register, orte_oob_base_open, orte_oob_base_close,
 145                            mca_oob_base_static_components, 0);
 146 
 147 
 148 OBJ_CLASS_INSTANCE(orte_oob_send_t,
 149                    opal_object_t,
 150                    NULL, NULL);
 151 
 152 static void pr_cons(orte_oob_base_peer_t *ptr)
 153 {
 154     ptr->component = NULL;
 155     OBJ_CONSTRUCT(&ptr->addressable, opal_bitmap_t);
 156     opal_bitmap_init(&ptr->addressable, 8);
 157 }
 158 static void pr_des(orte_oob_base_peer_t *ptr)
 159 {
 160     OBJ_DESTRUCT(&ptr->addressable);
 161 }
 162 OBJ_CLASS_INSTANCE(orte_oob_base_peer_t,
 163                    opal_object_t,
 164                    pr_cons, pr_des);