2012-08-22 21:43:20 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2012 Los Alamos National Security, LLC.
|
|
|
|
* All rights reserved
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "opal/util/output.h"
|
|
|
|
#include "orte/constants.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "orte/mca/filem/filem.h"
|
|
|
|
#include "orte/mca/filem/base/base.h"
|
|
|
|
#include "filem_raw.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Public string for version number
|
|
|
|
*/
|
|
|
|
const char *orte_filem_raw_component_version_string =
|
|
|
|
"ORTE FILEM raw MCA component version " ORTE_VERSION;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local functionality
|
|
|
|
*/
|
2013-03-27 21:09:41 +00:00
|
|
|
static int filem_raw_register(void);
|
2012-08-22 21:43:20 +00:00
|
|
|
static int filem_raw_open(void);
|
|
|
|
static int filem_raw_close(void);
|
|
|
|
static int filem_raw_query(mca_base_module_t **module, int *priority);
|
|
|
|
|
2012-09-04 17:52:12 +00:00
|
|
|
bool orte_filem_raw_flatten_trees=false;
|
|
|
|
|
2012-08-22 21:43:20 +00:00
|
|
|
orte_filem_base_component_t mca_filem_raw_component = {
|
|
|
|
{
|
|
|
|
ORTE_FILEM_BASE_VERSION_2_0_0,
|
|
|
|
/* Component name and version */
|
|
|
|
"raw",
|
|
|
|
ORTE_MAJOR_VERSION,
|
|
|
|
ORTE_MINOR_VERSION,
|
|
|
|
ORTE_RELEASE_VERSION,
|
|
|
|
|
|
|
|
/* Component open and close functions */
|
|
|
|
filem_raw_open,
|
|
|
|
filem_raw_close,
|
2013-03-27 21:09:41 +00:00
|
|
|
filem_raw_query,
|
|
|
|
filem_raw_register
|
2012-08-22 21:43:20 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
/* The component is checkpoint ready */
|
|
|
|
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2013-03-27 21:09:41 +00:00
|
|
|
static int filem_raw_register(void)
|
2012-08-22 21:43:20 +00:00
|
|
|
{
|
2012-09-04 17:52:12 +00:00
|
|
|
mca_base_component_t *c = &mca_filem_raw_component.base_version;
|
|
|
|
|
2013-03-27 21:09:41 +00:00
|
|
|
orte_filem_raw_flatten_trees = false;
|
|
|
|
(void) mca_base_component_var_register(c, "flatten_directory_trees",
|
|
|
|
"Put all files in the working directory instead of creating their respective directory trees",
|
|
|
|
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&orte_filem_raw_flatten_trees);
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
2012-09-04 17:52:12 +00:00
|
|
|
|
2013-03-27 21:09:41 +00:00
|
|
|
static int filem_raw_open(void)
|
|
|
|
{
|
2012-08-22 21:43:20 +00:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int filem_raw_close(void)
|
|
|
|
{
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int filem_raw_query(mca_base_module_t **module, int *priority)
|
|
|
|
{
|
|
|
|
*priority = 0;
|
|
|
|
|
2012-09-29 18:30:35 +00:00
|
|
|
/* never for an APP */
|
2012-08-22 21:43:20 +00:00
|
|
|
if (ORTE_PROC_IS_APP) {
|
|
|
|
*module = NULL;
|
|
|
|
return ORTE_ERROR;
|
|
|
|
}
|
|
|
|
|
2012-09-29 18:30:35 +00:00
|
|
|
/* otherwise, use if selected */
|
2012-08-22 21:43:20 +00:00
|
|
|
*module = (mca_base_module_t*) &mca_filem_raw_module;
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|