root/orte/mca/ess/env/ess_env_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. orte_ess_env_component_open
  2. orte_ess_env_component_query
  3. orte_ess_env_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      Los Alamos National Security, LLC. All rights
  14  *                         reserved.
  15  * $COPYRIGHT$
  16  *
  17  * Additional copyrights may follow
  18  *
  19  * $HEADER$
  20  *
  21  * These symbols are in a file by themselves to provide nice linker
  22  * semantics.  Since linkers generally pull in symbols by object
  23  * files, keeping these symbols as the only symbols in this file
  24  * prevents utility programs such as "ompi_info" from having to import
  25  * entire components just to query their version and parameters.
  26  */
  27 
  28 #include "orte_config.h"
  29 #include "orte/constants.h"
  30 
  31 #include "orte/util/proc_info.h"
  32 
  33 #include "orte/mca/ess/ess.h"
  34 #include "orte/mca/ess/env/ess_env.h"
  35 
  36 extern orte_ess_base_module_t orte_ess_env_module;
  37 
  38 /*
  39  * Instantiate the public struct with all of our public information
  40  * and pointers to our public functions in it
  41  */
  42 orte_ess_base_component_t mca_ess_env_component = {
  43     .base_version = {
  44         ORTE_ESS_BASE_VERSION_3_0_0,
  45 
  46         /* Component name and version */
  47         .mca_component_name = "env",
  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 = orte_ess_env_component_open,
  53         .mca_close_component = orte_ess_env_component_close,
  54         .mca_query_component = orte_ess_env_component_query,
  55     },
  56     .base_data = {
  57         /* The component is checkpoint ready */
  58         MCA_BASE_METADATA_PARAM_CHECKPOINT
  59     },
  60 };
  61 
  62 
  63 int
  64 orte_ess_env_component_open(void)
  65 {
  66     return ORTE_SUCCESS;
  67 }
  68 
  69 int orte_ess_env_component_query(mca_base_module_t **module, int *priority)
  70 {
  71     /* we are the env module, only used by daemons that are
  72      * launched by ssh so allow any enviro-specifc modules
  73      * to override us */
  74     if (ORTE_PROC_IS_DAEMON) {
  75         *priority = 1;
  76         *module = (mca_base_module_t *)&orte_ess_env_module;
  77         return ORTE_SUCCESS;
  78     }
  79 
  80     /* if not, then return NULL - we cannot be selected */
  81     *priority = -1;
  82     *module = NULL;
  83     return ORTE_ERROR;
  84 }
  85 
  86 
  87 int
  88 orte_ess_env_component_close(void)
  89 {
  90     return ORTE_SUCCESS;
  91 }
  92 

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