This source file includes following definitions.
- snapc_full_register
- snapc_full_open
- snapc_full_close
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 #include "orte_config.h"
  21 #include "opal/util/output.h"
  22 
  23 #include "orte/mca/snapc/snapc.h"
  24 #include "orte/mca/snapc/base/base.h"
  25 #include "snapc_full.h"
  26 
  27 
  28 
  29 
  30 const char *orte_snapc_full_component_version_string =
  31 "ORTE SNAPC full MCA component version " ORTE_VERSION;
  32 
  33 
  34 
  35 
  36 static int snapc_full_open(void);
  37 static int snapc_full_close(void);
  38 static int snapc_full_register(void);
  39 
  40 bool orte_snapc_full_skip_app   = false;
  41 bool orte_snapc_full_timing_enabled = false;
  42 int orte_snapc_full_progress_meter = 0;
  43 int orte_snapc_full_max_wait_time = 20;
  44 
  45 
  46 
  47 
  48 
  49 orte_snapc_full_component_t mca_snapc_full_component = {
  50     
  51     {
  52         
  53 
  54 
  55         .base_version = {
  56             ORTE_SNAPC_BASE_VERSION_2_0_0,
  57             
  58             .mca_component_name = "full",
  59             MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
  60                                   ORTE_RELEASE_VERSION),
  61 
  62             
  63             .mca_open_component = snapc_full_open,
  64             .mca_close_component = snapc_full_close,
  65             .mca_query_component = orte_snapc_full_component_query,
  66             .mca_register_component_params = snapc_full_register,
  67         },
  68         .base_data = {
  69             
  70             MCA_BASE_METADATA_PARAM_CHECKPOINT
  71         },
  72 
  73         .verbose = 0,
  74         .output_handle = -1,
  75     }
  76 };
  77 
  78 static int snapc_full_register (void)
  79 {
  80     mca_base_component_t *component = &mca_snapc_full_component.super.base_version;
  81     
  82 
  83 
  84 
  85 
  86     
  87     mca_snapc_full_component.super.priority = 20;
  88     (void) mca_base_component_var_register (component, "priority", "Priority of the SNAPC full component",
  89                                             MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  90                                             OPAL_INFO_LVL_9,
  91                                             MCA_BASE_VAR_SCOPE_READONLY,
  92                                             &mca_snapc_full_component.super.priority);
  93 
  94     mca_snapc_full_component.super.verbose = 0;
  95     (void) mca_base_component_var_register (component, "verbose",
  96                                             "Verbose level for the SNAPC full component",
  97                                             MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  98                                             OPAL_INFO_LVL_9,
  99                                             MCA_BASE_VAR_SCOPE_LOCAL,
 100                                             &mca_snapc_full_component.super.verbose);
 101 
 102     orte_snapc_full_skip_app = false;
 103     (void) mca_base_component_var_register (component, "skip_app",
 104                                             "Not for general use! For debugging only! Shortcut app level coord. [Default = disabled]",
 105                                             MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
 106                                             OPAL_INFO_LVL_9,
 107                                             MCA_BASE_VAR_SCOPE_LOCAL,
 108                                             &orte_snapc_full_skip_app);
 109 
 110     orte_snapc_full_timing_enabled = false;
 111     (void) mca_base_component_var_register (component, "enable_timing",
 112                                             "Enable timing information. [Default = disabled]",
 113                                             MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
 114                                             OPAL_INFO_LVL_9,
 115                                             MCA_BASE_VAR_SCOPE_LOCAL,
 116                                             &orte_snapc_full_timing_enabled);
 117 
 118     orte_snapc_full_max_wait_time = 20;
 119     (void) mca_base_component_var_register (component, "max_wait_time",
 120                                             "Wait time before orted gives up on checkpoint (seconds)",
 121                                             MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
 122                                             OPAL_INFO_LVL_9,
 123                                             MCA_BASE_VAR_SCOPE_LOCAL,
 124                                             &orte_snapc_full_max_wait_time);
 125 
 126     orte_snapc_full_progress_meter = 0;
 127     (void) mca_base_component_var_register (component, "progress_meter",
 128                                             "Display Progress every X percentage done. [Default = 0/off]",
 129                                             MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
 130                                             OPAL_INFO_LVL_9,
 131                                             MCA_BASE_VAR_SCOPE_LOCAL,
 132                                             &orte_snapc_full_progress_meter);
 133     orte_snapc_full_progress_meter %= 101;
 134 
 135     return ORTE_SUCCESS;
 136 }
 137 
 138 static int snapc_full_open(void)
 139 {
 140     
 141 
 142 
 143     if ( 0 != mca_snapc_full_component.super.verbose) {
 144         mca_snapc_full_component.super.output_handle = opal_output_open(NULL);
 145         opal_output_set_verbosity(mca_snapc_full_component.super.output_handle,
 146                                   mca_snapc_full_component.super.verbose);
 147     } else {
 148         mca_snapc_full_component.super.output_handle = orte_snapc_base_framework.framework_output;
 149     }
 150 
 151     
 152     orte_snapc_full_progress_meter %= 101;
 153 
 154     
 155 
 156 
 157     opal_output_verbose(10, mca_snapc_full_component.super.output_handle,
 158                         "snapc:full: open()");
 159     opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
 160                         "snapc:full: open: priority    = %d",
 161                         mca_snapc_full_component.super.priority);
 162     opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
 163                         "snapc:full: open: verbosity   = %d",
 164                         mca_snapc_full_component.super.verbose);
 165     opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
 166                         "snapc:full: open: max_wait_time  = %d",
 167                         orte_snapc_full_max_wait_time);
 168     opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
 169                         "snapc:full: open: progress_meter = %d",
 170                         orte_snapc_full_progress_meter);
 171 
 172     return ORTE_SUCCESS;
 173 }
 174 
 175 static int snapc_full_close(void)
 176 {
 177     opal_output_verbose(10, mca_snapc_full_component.super.output_handle,
 178                         "snapc:full: close()");
 179 
 180     return ORTE_SUCCESS;
 181 }