root/orte/mca/state/novm/state_novm_component.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. state_novm_open
  2. state_novm_close
  3. state_novm_component_query

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
   4  *                         reserved.
   5  *
   6  * Copyright (c) 2017      Intel, Inc. All rights reserved.
   7  * $COPYRIGHT$
   8  *
   9  * Additional copyrights may follow
  10  *
  11  * $HEADER$
  12  */
  13 
  14 #include "orte_config.h"
  15 #include "opal/util/output.h"
  16 
  17 #include "orte/runtime/orte_globals.h"
  18 #include "orte/mca/state/state.h"
  19 #include "orte/mca/state/base/base.h"
  20 #include "state_novm.h"
  21 
  22 /*
  23  * Public string for version number
  24  */
  25 const char *orte_state_novm_component_version_string =
  26     "ORTE STATE novm MCA component version " ORTE_VERSION;
  27 
  28 /*
  29  * Local functionality
  30  */
  31 static int state_novm_open(void);
  32 static int state_novm_close(void);
  33 static int state_novm_component_query(mca_base_module_t **module, int *priority);
  34 
  35 /*
  36  * Instantiate the public struct with all of our public information
  37  * and pointer to our public functions in it
  38  */
  39 orte_state_base_component_t mca_state_novm_component =
  40 {
  41     /* Handle the general mca_component_t struct containing
  42      *  meta information about the component
  43      */
  44     .base_version = {
  45         ORTE_STATE_BASE_VERSION_1_0_0,
  46         /* Component name and version */
  47         .mca_component_name = "novm",
  48         MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
  49                               ORTE_RELEASE_VERSION),
  50 
  51         /* Component open and close functions */
  52         .mca_open_component = state_novm_open,
  53         .mca_close_component = state_novm_close,
  54         .mca_query_component = state_novm_component_query
  55     },
  56     .base_data = {
  57         /* The component is checkpoint ready */
  58         MCA_BASE_METADATA_PARAM_CHECKPOINT
  59     },
  60 };
  61 
  62 static int state_novm_open(void)
  63 {
  64     return ORTE_SUCCESS;
  65 }
  66 
  67 static int state_novm_close(void)
  68 {
  69     return ORTE_SUCCESS;
  70 }
  71 
  72 static int state_novm_component_query(mca_base_module_t **module, int *priority)
  73 {
  74     if (ORTE_PROC_IS_HNP && orte_no_vm) {
  75         /* set our priority high so we'll be selected if user desires */
  76         *priority = 1000;
  77         *module = (mca_base_module_t *)&orte_state_novm_module;
  78         return ORTE_SUCCESS;
  79     }
  80 
  81     *priority = -1;
  82     *module = NULL;
  83     return ORTE_ERROR;
  84 }

/* [<][>][^][v][top][bottom][index][help] */