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); 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,6 +109,19 @@ 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
*/ */
@ -116,6 +133,9 @@ static int snapc_full_open(void)
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,6 +950,7 @@ 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 * Do the transfer
*/ */
@ -978,6 +979,7 @@ static int snapc_full_global_gather_all_files(void) {
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;
opal_argv_delete(&tmp_argc, &filem_request->remote_targets, 0, 1); opal_argv_delete(&tmp_argc, &filem_request->remote_targets, 0, 1);