Add a flag to 'pretend' to do filem in snapc. This is useful when doing
performance characterization, and should not be used by anyone doing anything else since it will not produce a globally consistent checkpoint in this mode. This commit was SVN r16192.
Этот коммит содержится в:
родитель
c7105eadc7
Коммит
b5fc722c35
@ -52,6 +52,8 @@ extern "C" {
|
|||||||
|
|
||||||
OBJ_CLASS_DECLARATION(orte_snapc_full_global_snapshot_t);
|
OBJ_CLASS_DECLARATION(orte_snapc_full_global_snapshot_t);
|
||||||
|
|
||||||
|
extern bool orte_snapc_full_skip_filem;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Module functions
|
* Module functions
|
||||||
*/
|
*/
|
||||||
|
@ -33,6 +33,8 @@ const char *orte_snapc_full_component_version_string =
|
|||||||
static int snapc_full_open(void);
|
static int snapc_full_open(void);
|
||||||
static int snapc_full_close(void);
|
static int snapc_full_close(void);
|
||||||
|
|
||||||
|
bool orte_snapc_full_skip_filem = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Instantiate the public struct with all of our public information
|
* Instantiate the public struct with all of our public information
|
||||||
* and pointer to our public functions in it
|
* and pointer to our public functions in it
|
||||||
@ -77,6 +79,8 @@ orte_snapc_full_component_t mca_snapc_full_component = {
|
|||||||
|
|
||||||
static int snapc_full_open(void)
|
static int snapc_full_open(void)
|
||||||
{
|
{
|
||||||
|
int value;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This should be the last componet to ever get used since
|
* This should be the last componet to ever get used since
|
||||||
* it doesn't do anything.
|
* it doesn't do anything.
|
||||||
@ -105,17 +109,33 @@ static int snapc_full_open(void)
|
|||||||
mca_snapc_full_component.super.output_handle = orte_snapc_base_output;
|
mca_snapc_full_component.super.output_handle = orte_snapc_base_output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mca_base_param_reg_int(&mca_snapc_full_component.super.snapc_version,
|
||||||
|
"skip_filem",
|
||||||
|
"Not for general use! For debugging only! Pretend to move files. [Default = disabled]",
|
||||||
|
false, false,
|
||||||
|
0,
|
||||||
|
&value);
|
||||||
|
if( 0 != value ) { /* Enabled */
|
||||||
|
orte_snapc_full_skip_filem = true;
|
||||||
|
}
|
||||||
|
else { /* Disabled */
|
||||||
|
orte_snapc_full_skip_filem = false;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Debug Output
|
* Debug Output
|
||||||
*/
|
*/
|
||||||
opal_output_verbose(10, mca_snapc_full_component.super.output_handle,
|
opal_output_verbose(10, mca_snapc_full_component.super.output_handle,
|
||||||
"snapc:full: open()");
|
"snapc:full: open()");
|
||||||
opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
|
opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
|
||||||
"snapc:full: open: priority = %d",
|
"snapc:full: open: priority = %d",
|
||||||
mca_snapc_full_component.super.priority);
|
mca_snapc_full_component.super.priority);
|
||||||
opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
|
opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
|
||||||
"snapc:full: open: verbosity = %d",
|
"snapc:full: open: verbosity = %d",
|
||||||
mca_snapc_full_component.super.verbose);
|
mca_snapc_full_component.super.verbose);
|
||||||
|
opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
|
||||||
|
"snapc:full: open: skip_filem = %s",
|
||||||
|
(orte_snapc_full_skip_filem == true ? "True" : "False"));
|
||||||
|
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -950,33 +950,35 @@ static int snapc_full_global_gather_all_files(void) {
|
|||||||
local_dir = strdup(vpid_snapshot->crs_snapshot_super.local_location);
|
local_dir = strdup(vpid_snapshot->crs_snapshot_super.local_location);
|
||||||
opal_argv_append(&tmp_argc, &filem_request->local_targets, opal_dirname(local_dir));
|
opal_argv_append(&tmp_argc, &filem_request->local_targets, opal_dirname(local_dir));
|
||||||
|
|
||||||
/*
|
if( !orte_snapc_full_skip_filem ) {
|
||||||
* Do the transfer
|
|
||||||
*/
|
|
||||||
if(ORTE_SUCCESS != (ret = orte_filem.get(filem_request) ) ) {
|
|
||||||
exit_status = ret;
|
|
||||||
/* Keep getting all the other files, eventually return an error */
|
|
||||||
goto skip;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/*
|
/*
|
||||||
* Update the metadata file
|
* Do the transfer
|
||||||
*/
|
*/
|
||||||
if(ORTE_SUCCESS != (ret = orte_snapc_base_add_vpid_metadata(&vpid_snapshot->process_name,
|
if(ORTE_SUCCESS != (ret = orte_filem.get(filem_request) ) ) {
|
||||||
global_snapshot.reference_name,
|
|
||||||
vpid_snapshot->crs_snapshot_super.reference_name,
|
|
||||||
vpid_snapshot->crs_snapshot_super.local_location))) {
|
|
||||||
exit_status = ret;
|
exit_status = ret;
|
||||||
goto cleanup;
|
/* Keep getting all the other files, eventually return an error */
|
||||||
|
goto skip;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/*
|
||||||
|
* Update the metadata file
|
||||||
|
*/
|
||||||
|
if(ORTE_SUCCESS != (ret = orte_snapc_base_add_vpid_metadata(&vpid_snapshot->process_name,
|
||||||
|
global_snapshot.reference_name,
|
||||||
|
vpid_snapshot->crs_snapshot_super.reference_name,
|
||||||
|
vpid_snapshot->crs_snapshot_super.local_location))) {
|
||||||
|
exit_status = ret;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Once we have brought it locally, then remove the remote copy
|
* Once we have brought it locally, then remove the remote copy
|
||||||
*/
|
*/
|
||||||
if(ORTE_SUCCESS != (ret = orte_filem.rm(filem_request)) ) {
|
if(ORTE_SUCCESS != (ret = orte_filem.rm(filem_request)) ) {
|
||||||
exit_status = ret;
|
exit_status = ret;
|
||||||
/* Keep getting all the other files, eventually return an error */
|
/* Keep getting all the other files, eventually return an error */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp_argc = 0;
|
tmp_argc = 0;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user