root/orte/mca/schizo/base/schizo_base_frame.c

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

DEFINITIONS

This source file includes following definitions.
  1. orte_schizo_base_register
  2. orte_schizo_base_close
  3. orte_schizo_base_open

   1 /*
   2  * Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
   3  * Copyright (c) 2015      Research Organization for Information Science
   4  *                         and Technology (RIST). All rights reserved.
   5  * $COPYRIGHT$
   6  *
   7  * Additional copyrights may follow
   8  *
   9  * $HEADER$
  10  */
  11 
  12 #include "orte_config.h"
  13 #include "orte/constants.h"
  14 
  15 #include <string.h>
  16 
  17 #include "orte/mca/mca.h"
  18 #include "opal/util/argv.h"
  19 #include "opal/util/output.h"
  20 #include "opal/mca/base/base.h"
  21 
  22 #include "orte/runtime/orte_globals.h"
  23 #include "orte/util/show_help.h"
  24 #include "orte/mca/errmgr/errmgr.h"
  25 
  26 #include "orte/mca/schizo/base/base.h"
  27 /*
  28  * The following file was created by configure.  It contains extern
  29  * statements and the definition of an array of pointers to each
  30  * component's public mca_base_component_t struct.
  31  */
  32 
  33 #include "orte/mca/schizo/base/static-components.h"
  34 
  35 /*
  36  * Global variables
  37  */
  38 orte_schizo_base_t orte_schizo_base = {{{0}}};
  39 orte_schizo_base_module_t orte_schizo = {
  40     .define_cli = orte_schizo_base_define_cli,
  41     .parse_cli = orte_schizo_base_parse_cli,
  42     .parse_env = orte_schizo_base_parse_env,
  43     .setup_app = orte_schizo_base_setup_app,
  44     .setup_fork = orte_schizo_base_setup_fork,
  45     .setup_child = orte_schizo_base_setup_child,
  46     .check_launch_environment = orte_schizo_base_check_launch_environment,
  47     .get_remaining_time = orte_schizo_base_get_remaining_time,
  48     .finalize = orte_schizo_base_finalize
  49 };
  50 
  51 static char *personalities = NULL;
  52 
  53 static int orte_schizo_base_register(mca_base_register_flag_t flags)
  54 {
  55     /* pickup any defined personalities */
  56     personalities = NULL;
  57     mca_base_var_register("orte", "schizo", "base", "personalities",
  58                           "Comma-separated list of personalities",
  59                           MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0,
  60                           OPAL_INFO_LVL_9,
  61                           MCA_BASE_VAR_SCOPE_READONLY,
  62                           &personalities);
  63     return ORTE_SUCCESS;
  64 }
  65 
  66 static int orte_schizo_base_close(void)
  67 {
  68     /* cleanup globals */
  69     OPAL_LIST_DESTRUCT(&orte_schizo_base.active_modules);
  70     if (NULL != orte_schizo_base.personalities) {
  71         opal_argv_free(orte_schizo_base.personalities);
  72     }
  73 
  74     return mca_base_framework_components_close(&orte_schizo_base_framework, NULL);
  75 }
  76 
  77 /**
  78  * Function for finding and opening either all MCA components, or the one
  79  * that was specifically requested via a MCA parameter.
  80  */
  81 static int orte_schizo_base_open(mca_base_open_flag_t flags)
  82 {
  83     int rc;
  84 
  85     /* init the globals */
  86     OBJ_CONSTRUCT(&orte_schizo_base.active_modules, opal_list_t);
  87     orte_schizo_base.personalities = NULL;
  88     if (NULL != personalities) {
  89         orte_schizo_base.personalities = opal_argv_split(personalities, ',');
  90     }
  91 
  92     /* Open up all available components */
  93     rc = mca_base_framework_components_open(&orte_schizo_base_framework, flags);
  94 
  95     /* All done */
  96     return rc;
  97 }
  98 
  99 MCA_BASE_FRAMEWORK_DECLARE(orte, schizo, "ORTE Schizo Subsystem",
 100                            orte_schizo_base_register,
 101                            orte_schizo_base_open, orte_schizo_base_close,
 102                            mca_schizo_base_static_components, 0);
 103 
 104 OBJ_CLASS_INSTANCE(orte_schizo_base_active_module_t,
 105                    opal_list_item_t,
 106                    NULL, NULL);

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