1
1

Add a 'crs_blcr_dev_null' MCA parameter. This causes BLCR to checkpoint directly to /dev/null instead of to a file.

Though this is not useful in checkpointing an application, it can be a useful diagnostic.

This commit was SVN r21125.
Этот коммит содержится в:
Josh Hursey 2009-04-30 16:32:55 +00:00
родитель a74b74a68c
Коммит 759c2b5596
3 изменённых файлов: 22 добавлений и 2 удалений

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

@ -49,6 +49,8 @@ extern "C" {
int opal_crs_blcr_component_query(mca_base_module_t **module, int *priority);
extern bool opal_crs_blcr_dev_null;
/*
* Module functions
*/

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

@ -29,6 +29,8 @@
static int crs_blcr_open(void);
static int crs_blcr_close(void);
bool opal_crs_blcr_dev_null = false;
/*
* Instantiate the public struct with all of our public information
* and pointer to our public functions in it
@ -69,7 +71,8 @@ opal_crs_blcr_component_t mca_crs_blcr_component = {
static int crs_blcr_open(void)
{
int value;
mca_base_param_reg_int(&mca_crs_blcr_component.super.base_version,
"priority",
"Priority of the CRS blcr component",
@ -94,6 +97,14 @@ static int crs_blcr_open(void)
mca_crs_blcr_component.super.output_handle = opal_crs_base_output;
}
mca_base_param_reg_int(&mca_crs_blcr_component.super.base_version,
"dev_null",
"Not for general use! For debugging only! Save checkpoint to /dev/null. [Default = disabled]",
false, false,
0,
&value);
opal_crs_blcr_dev_null = OPAL_INT_TO_BOOL(value);
/*
* Debug output
*/
@ -105,6 +116,9 @@ static int crs_blcr_open(void)
opal_output_verbose(20, mca_crs_blcr_component.super.output_handle,
"crs:blcr: open: verbosity = %d",
mca_crs_blcr_component.super.verbose);
opal_output_verbose(10, mca_crs_blcr_component.super.output_handle,
"crs:blcr: open: dev_null = %s",
(opal_crs_blcr_dev_null == true ? "True" : "False"));
return OPAL_SUCCESS;
}

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

@ -314,7 +314,11 @@ int opal_crs_blcr_checkpoint(pid_t pid, opal_crs_base_snapshot_t *base_snapshot,
char *loc_fname = NULL;
blcr_get_checkpoint_filename(&(snapshot->context_filename), pid);
asprintf(&loc_fname, "%s/%s", snapshot->super.local_location, snapshot->context_filename);
if( opal_crs_blcr_dev_null ) {
loc_fname = strdup("/dev/null");
} else {
asprintf(&loc_fname, "%s/%s", snapshot->super.local_location, snapshot->context_filename);
}
opal_output_verbose(10, mca_crs_blcr_component.super.output_handle,
"crs:blcr: checkpoint SELF <%s>",