1
1

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.
Этот коммит содержится в:
Josh Hursey 2007-09-24 16:19:45 +00:00
родитель c7105eadc7
Коммит b5fc722c35
3 изменённых файлов: 48 добавлений и 24 удалений

Просмотреть файл

@ -52,6 +52,8 @@ extern "C" {
OBJ_CLASS_DECLARATION(orte_snapc_full_global_snapshot_t);
extern bool orte_snapc_full_skip_filem;
/*
* Module functions
*/

Просмотреть файл

@ -33,6 +33,8 @@ const char *orte_snapc_full_component_version_string =
static int snapc_full_open(void);
static int snapc_full_close(void);
bool orte_snapc_full_skip_filem = false;
/*
* Instantiate the public struct with all of our public information
* 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)
{
int value;
/*
* This should be the last componet to ever get used since
* it doesn't do anything.
@ -104,6 +108,19 @@ static int snapc_full_open(void)
} else {
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
@ -111,11 +128,14 @@ static int snapc_full_open(void)
opal_output_verbose(10, mca_snapc_full_component.super.output_handle,
"snapc:full: open()");
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);
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);
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;
}

Просмотреть файл

@ -950,33 +950,35 @@ static int snapc_full_global_gather_all_files(void) {
local_dir = strdup(vpid_snapshot->crs_snapshot_super.local_location);
opal_argv_append(&tmp_argc, &filem_request->local_targets, opal_dirname(local_dir));
/*
* 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 {
if( !orte_snapc_full_skip_filem ) {
/*
* Update the metadata file
* Do the transfer
*/
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))) {
if(ORTE_SUCCESS != (ret = orte_filem.get(filem_request) ) ) {
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
*/
if(ORTE_SUCCESS != (ret = orte_filem.rm(filem_request)) ) {
exit_status = ret;
/* Keep getting all the other files, eventually return an error */
/*
* Once we have brought it locally, then remove the remote copy
*/
if(ORTE_SUCCESS != (ret = orte_filem.rm(filem_request)) ) {
exit_status = ret;
/* Keep getting all the other files, eventually return an error */
}
}
tmp_argc = 0;