root/orte/mca/rmaps/mindist/rmaps_mindist_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. orte_rmaps_mindist_register
  2. orte_rmaps_mindist_open
  3. orte_rmaps_mindist_query
  4. orte_rmaps_mindist_close

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2005 The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
  10  *                         University of Stuttgart.  All rights reserved.
  11  * Copyright (c) 2004-2005 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2013-2015 Los Alamos National Security, LLC.  All rights reserved.
  14  * $COPYRIGHT$
  15  *
  16  * Additional copyrights may follow
  17  *
  18  * $HEADER$
  19  */
  20 
  21 #include "orte_config.h"
  22 #include "orte/constants.h"
  23 
  24 #include "opal/mca/base/base.h"
  25 #include "opal/mca/base/mca_base_var.h"
  26 
  27 #include "orte/mca/rmaps/base/rmaps_private.h"
  28 #include "rmaps_mindist.h"
  29 
  30 /*
  31  * Local functions
  32  */
  33 
  34 static int orte_rmaps_mindist_open(void);
  35 static int orte_rmaps_mindist_close(void);
  36 static int orte_rmaps_mindist_query(mca_base_module_t **module, int *priority);
  37 static int orte_rmaps_mindist_register(void);
  38 
  39 static int my_priority = 20;
  40 
  41 orte_rmaps_base_component_t mca_rmaps_mindist_component = {
  42     .base_version = {
  43         ORTE_RMAPS_BASE_VERSION_2_0_0,
  44 
  45         .mca_component_name = "mindist",
  46         MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
  47                               ORTE_RELEASE_VERSION),
  48         .mca_open_component = orte_rmaps_mindist_open,
  49         .mca_close_component = orte_rmaps_mindist_close,
  50         .mca_query_component = orte_rmaps_mindist_query,
  51         .mca_register_component_params = orte_rmaps_mindist_register,
  52     },
  53     .base_data = {
  54         /* The component is checkpoint ready */
  55         MCA_BASE_METADATA_PARAM_CHECKPOINT
  56     },
  57 };
  58 
  59 
  60 static int orte_rmaps_mindist_register(void)
  61 {
  62     (void) mca_base_component_var_register(&mca_rmaps_mindist_component.base_version,
  63                                            "priority", "Priority of the mindist rmaps component",
  64                                            MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  65                                            OPAL_INFO_LVL_9,
  66                                            MCA_BASE_VAR_SCOPE_READONLY,
  67                                            &my_priority);
  68     return ORTE_SUCCESS;
  69 }
  70 
  71 /**
  72   * component open/close/init function
  73   */
  74 static int orte_rmaps_mindist_open(void)
  75 {
  76     return ORTE_SUCCESS;
  77 }
  78 
  79 
  80 static int orte_rmaps_mindist_query(mca_base_module_t **module, int *priority)
  81 {
  82     /* the RMAPS framework is -only- opened on HNP's,
  83      * so no need to check for that here
  84      */
  85 
  86     *priority = my_priority;
  87     *module = (mca_base_module_t *)&orte_rmaps_mindist_module;
  88     return ORTE_SUCCESS;
  89 }
  90 
  91 /**
  92  *  Close all subsystems.
  93  */
  94 
  95 static int orte_rmaps_mindist_close(void)
  96 {
  97     return ORTE_SUCCESS;
  98 }
  99 

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