root/orte/mca/rmaps/ppr/rmaps_ppr_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. orte_rmaps_ppr_open
  2. orte_rmaps_ppr_query
  3. orte_rmaps_ppr_close
  4. orte_rmaps_ppr_register

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2011      Cisco Systems, Inc.  All rights reserved.
   4  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
   5  *                         reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 
  13 #include "orte_config.h"
  14 #include "orte/constants.h"
  15 
  16 #include "opal/mca/base/base.h"
  17 
  18 #include "orte/util/show_help.h"
  19 
  20 #include "orte/mca/rmaps/base/base.h"
  21 #include "rmaps_ppr.h"
  22 
  23 /*
  24  * Local functions
  25  */
  26 
  27 static int orte_rmaps_ppr_open(void);
  28 static int orte_rmaps_ppr_close(void);
  29 static int orte_rmaps_ppr_query(mca_base_module_t **module, int *priority);
  30 static int orte_rmaps_ppr_register(void);
  31 
  32 orte_rmaps_base_component_t mca_rmaps_ppr_component = {
  33     .base_version = {
  34         ORTE_RMAPS_BASE_VERSION_2_0_0,
  35 
  36         .mca_component_name = "ppr",
  37         MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
  38                               ORTE_RELEASE_VERSION),
  39         .mca_open_component = orte_rmaps_ppr_open,
  40         .mca_close_component = orte_rmaps_ppr_close,
  41         .mca_query_component = orte_rmaps_ppr_query,
  42         .mca_register_component_params = orte_rmaps_ppr_register,
  43     },
  44     .base_data = {
  45         /* The component is checkpoint ready */
  46         MCA_BASE_METADATA_PARAM_CHECKPOINT
  47     },
  48 };
  49 
  50 static int my_priority;
  51 
  52 static int orte_rmaps_ppr_open(void)
  53 {
  54     return ORTE_SUCCESS;
  55 }
  56 
  57 
  58 static int orte_rmaps_ppr_query(mca_base_module_t **module, int *priority)
  59 {
  60     *priority = my_priority;
  61     *module = (mca_base_module_t *)&orte_rmaps_ppr_module;
  62     return ORTE_SUCCESS;
  63 }
  64 
  65 /**
  66  *  Close all subsystems.
  67  */
  68 
  69 static int orte_rmaps_ppr_close(void)
  70 {
  71     return ORTE_SUCCESS;
  72 }
  73 
  74 
  75 static int orte_rmaps_ppr_register(void)
  76 {
  77     my_priority = 90;
  78     (void) mca_base_component_var_register(&mca_rmaps_ppr_component.base_version,
  79                                            "priority", "Priority of the ppr rmaps component",
  80                                            MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  81                                            OPAL_INFO_LVL_9,
  82                                            MCA_BASE_VAR_SCOPE_READONLY, &my_priority);
  83 
  84     return ORTE_SUCCESS;
  85 }

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