root/orte/mca/rmaps/round_robin/rmaps_rr_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. orte_rmaps_round_robin_register
  2. orte_rmaps_round_robin_open
  3. orte_rmaps_round_robin_query
  4. orte_rmaps_round_robin_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) 2015      Los Alamos National Security, LLC. All rights
  14  *                         reserved.
  15  * $COPYRIGHT$
  16  *
  17  * Additional copyrights may follow
  18  *
  19  * $HEADER$
  20  */
  21 
  22 #include "orte_config.h"
  23 #include "orte/constants.h"
  24 
  25 #include "opal/mca/base/base.h"
  26 
  27 #include "orte/mca/rmaps/base/rmaps_private.h"
  28 #include "rmaps_rr.h"
  29 
  30 /*
  31  * Local functions
  32  */
  33 
  34 static int orte_rmaps_round_robin_register(void);
  35 static int orte_rmaps_round_robin_open(void);
  36 static int orte_rmaps_round_robin_close(void);
  37 static int orte_rmaps_round_robin_query(mca_base_module_t **module, int *priority);
  38 
  39 static int my_priority;
  40 
  41 orte_rmaps_base_component_t mca_rmaps_round_robin_component = {
  42     .base_version = {
  43         ORTE_RMAPS_BASE_VERSION_2_0_0,
  44 
  45         .mca_component_name = "round_robin",
  46         MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
  47                               ORTE_RELEASE_VERSION),
  48         .mca_open_component = orte_rmaps_round_robin_open,
  49         .mca_close_component = orte_rmaps_round_robin_close,
  50         .mca_query_component = orte_rmaps_round_robin_query,
  51         .mca_register_component_params = orte_rmaps_round_robin_register,
  52     },
  53     .base_data = {
  54         /* The component is checkpoint ready */
  55         MCA_BASE_METADATA_PARAM_CHECKPOINT
  56     },
  57 };
  58 
  59 
  60 /**
  61   * component register/open/close/init function
  62   */
  63 static int orte_rmaps_round_robin_register(void)
  64 {
  65     my_priority = 10;
  66     (void) mca_base_component_var_register(&mca_rmaps_round_robin_component.base_version,
  67                                            "priority", "Priority of the rr rmaps component",
  68                                            MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
  69                                            OPAL_INFO_LVL_9,
  70                                            MCA_BASE_VAR_SCOPE_READONLY, &my_priority);
  71 
  72     return ORTE_SUCCESS;
  73 }
  74 
  75 static int orte_rmaps_round_robin_open(void)
  76 {
  77     return ORTE_SUCCESS;
  78 }
  79 
  80 
  81 static int orte_rmaps_round_robin_query(mca_base_module_t **module, int *priority)
  82 {
  83     /* the RMAPS framework is -only- opened on HNP's,
  84      * so no need to check for that here
  85      */
  86 
  87     *priority = my_priority;
  88     *module = (mca_base_module_t *)&orte_rmaps_round_robin_module;
  89     return ORTE_SUCCESS;
  90 }
  91 
  92 /**
  93  *  Close all subsystems.
  94  */
  95 
  96 static int orte_rmaps_round_robin_close(void)
  97 {
  98     return ORTE_SUCCESS;
  99 }
 100 
 101 

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