root/orte/mca/filem/raw/filem_raw_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. filem_raw_register
  2. filem_raw_open
  3. filem_raw_close
  4. filem_raw_query

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
   4  *                         reserved
   5  * $COPYRIGHT$
   6  *
   7  * Additional copyrights may follow
   8  *
   9  * $HEADER$
  10  */
  11 
  12 #include "orte_config.h"
  13 #include "opal/util/output.h"
  14 #include "orte/constants.h"
  15 
  16 
  17 
  18 #include "orte/mca/filem/filem.h"
  19 #include "orte/mca/filem/base/base.h"
  20 #include "filem_raw.h"
  21 
  22 /*
  23  * Public string for version number
  24  */
  25 const char *orte_filem_raw_component_version_string =
  26 "ORTE FILEM raw MCA component version " ORTE_VERSION;
  27 
  28 /*
  29  * Local functionality
  30  */
  31 static int filem_raw_register(void);
  32 static int filem_raw_open(void);
  33 static int filem_raw_close(void);
  34 static int filem_raw_query(mca_base_module_t **module, int *priority);
  35 
  36 bool orte_filem_raw_flatten_trees=false;
  37 
  38 orte_filem_base_component_t mca_filem_raw_component = {
  39     .base_version = {
  40         ORTE_FILEM_BASE_VERSION_2_0_0,
  41         /* Component name and version */
  42         .mca_component_name = "raw",
  43         MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
  44                               ORTE_RELEASE_VERSION),
  45 
  46         /* Component open and close functions */
  47         .mca_open_component = filem_raw_open,
  48         .mca_close_component = filem_raw_close,
  49         .mca_query_component = filem_raw_query,
  50         .mca_register_component_params = filem_raw_register,
  51     },
  52     .base_data = {
  53         /* The component is checkpoint ready */
  54         MCA_BASE_METADATA_PARAM_CHECKPOINT
  55     },
  56 };
  57 
  58 static int filem_raw_register(void)
  59 {
  60     mca_base_component_t *c = &mca_filem_raw_component.base_version;
  61 
  62     orte_filem_raw_flatten_trees = false;
  63     (void) mca_base_component_var_register(c, "flatten_directory_trees",
  64                                            "Put all files in the working directory instead of creating their respective directory trees",
  65                                            MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
  66                                            OPAL_INFO_LVL_9,
  67                                            MCA_BASE_VAR_SCOPE_READONLY,
  68                                            &orte_filem_raw_flatten_trees);
  69 
  70     return ORTE_SUCCESS;
  71 }
  72 
  73 static int filem_raw_open(void)
  74 {
  75     return ORTE_SUCCESS;
  76 }
  77 
  78 static int filem_raw_close(void)
  79 {
  80     return ORTE_SUCCESS;
  81 }
  82 
  83 static int filem_raw_query(mca_base_module_t **module, int *priority)
  84 {
  85     *priority = 0;
  86 
  87     /* never for an APP */
  88     if (ORTE_PROC_IS_APP) {
  89         *module = NULL;
  90         return ORTE_ERROR;
  91     }
  92 
  93     /* otherwise, use if selected */
  94     *module = (mca_base_module_t*) &mca_filem_raw_module;
  95     return ORTE_SUCCESS;
  96 }

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