root/orte/mca/ess/hnp/ess_hnp_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. hnp_component_open
  2. hnp_component_query
  3. hnp_component_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-2017 Los Alamos National Security, LLC. All rights
  14  *                         reserved.
  15  * Copyright (c) 2017      Intel, Inc.  All rights reserved.
  16  * Copyright (c) 2017      Research Organization for Information Science
  17  *                         and Technology (RIST). All rights reserved.
  18  * $COPYRIGHT$
  19  *
  20  * Additional copyrights may follow
  21  *
  22  * $HEADER$
  23  *
  24  * These symbols are in a file by themselves to provide nice linker
  25  * semantics.  Since linkers generally pull in symbols by object
  26  * files, keeping these symbols as the only symbols in this file
  27  * prevents utility programs such as "ompi_info" from having to import
  28  * entire components just to query their version and parameters.
  29  */
  30 
  31 #include "opal/util/argv.h"
  32 
  33 #include "orte_config.h"
  34 #include "orte/constants.h"
  35 
  36 #include "orte/util/proc_info.h"
  37 #include "orte/util/show_help.h"
  38 
  39 #include "orte/mca/ess/ess.h"
  40 #include "orte/mca/ess/hnp/ess_hnp.h"
  41 #include "orte/runtime/orte_globals.h"
  42 
  43 extern orte_ess_base_module_t orte_ess_hnp_module;
  44 static int hnp_component_open(void);
  45 static int hnp_component_close(void);
  46 static int hnp_component_query(mca_base_module_t **module, int *priority);
  47 
  48 /*
  49  * Instantiate the public struct with all of our public information
  50  * and pointers to our public functions in it
  51  */
  52 orte_ess_base_component_t mca_ess_hnp_component = {
  53     .base_version = {
  54         ORTE_ESS_BASE_VERSION_3_0_0,
  55 
  56         /* Component name and version */
  57         .mca_component_name = "hnp",
  58         MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
  59                               ORTE_RELEASE_VERSION),
  60 
  61         /* Component open and close functions */
  62         .mca_open_component = hnp_component_open,
  63         .mca_close_component = hnp_component_close,
  64         .mca_query_component = hnp_component_query
  65     },
  66     .base_data = {
  67         /* The component is checkpoint ready */
  68         MCA_BASE_METADATA_PARAM_CHECKPOINT
  69     }
  70 };
  71 
  72 static int hnp_component_open(void)
  73 {
  74 
  75     return ORTE_SUCCESS;
  76 }
  77 
  78 
  79 static int hnp_component_query(mca_base_module_t **module, int *priority)
  80 {
  81 
  82     /* we are the hnp module - we need to be selected
  83      * IFF we are designated as the hnp
  84      */
  85     if (ORTE_PROC_IS_HNP) {
  86         *priority = 100;
  87         *module = (mca_base_module_t *)&orte_ess_hnp_module;
  88         return ORTE_SUCCESS;
  89     }
  90 
  91     /* else, we are not */
  92     *priority = -1;
  93     *module = NULL;
  94     return ORTE_ERROR;
  95 }
  96 
  97 
  98 static int hnp_component_close(void)
  99 {
 100     return ORTE_SUCCESS;
 101 }

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