rename some variables following ompi's naming convention.
This commit was SVN r25487.
Этот коммит содержится в:
родитель
47499d1d3d
Коммит
15249dfc01
@ -29,8 +29,8 @@
|
|||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
extern int relocate_backing_file;
|
extern int opal_shmem_mmap_relocate_backing_file;
|
||||||
extern char *backing_file_base_dir;
|
extern char *opal_shmem_mmap_backing_file_base_dir;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* globally exported variable to hold the mmap component.
|
* globally exported variable to hold the mmap component.
|
||||||
|
@ -37,8 +37,8 @@
|
|||||||
const char *opal_shmem_mmap_component_version_string =
|
const char *opal_shmem_mmap_component_version_string =
|
||||||
"OPAL mmap shmem MCA component version " OPAL_VERSION;
|
"OPAL mmap shmem MCA component version " OPAL_VERSION;
|
||||||
|
|
||||||
int relocate_backing_file = 0;
|
int opal_shmem_mmap_relocate_backing_file = 0;
|
||||||
char *backing_file_base_dir = NULL;
|
char *opal_shmem_mmap_backing_file_base_dir = NULL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* local functions
|
* local functions
|
||||||
@ -120,10 +120,12 @@ mmap_open(void)
|
|||||||
"relocate_backing_file",
|
"relocate_backing_file",
|
||||||
"Whether to change the default placement of backing files or not "
|
"Whether to change the default placement of backing files or not "
|
||||||
"(Negative = try to relocate backing files to an area rooted at "
|
"(Negative = try to relocate backing files to an area rooted at "
|
||||||
"the path specified by shmem_mmap_backing_file_base_dir, but continue "
|
"the path specified by "
|
||||||
|
"shmem_mmap_opal_shmem_mmap_backing_file_base_dir, but continue "
|
||||||
"with the default path if the relocation fails, 0 = do not relocate, "
|
"with the default path if the relocation fails, 0 = do not relocate, "
|
||||||
"Positive = same as the negative option, but will fail if the "
|
"Positive = same as the negative option, but will fail if the "
|
||||||
"relocation fails.", false, false, 0, &relocate_backing_file
|
"relocation fails.", false, false, 0,
|
||||||
|
&opal_shmem_mmap_relocate_backing_file
|
||||||
);
|
);
|
||||||
|
|
||||||
mca_base_param_reg_string(
|
mca_base_param_reg_string(
|
||||||
@ -131,7 +133,7 @@ mmap_open(void)
|
|||||||
"backing_file_base_dir",
|
"backing_file_base_dir",
|
||||||
"Specifies where backing files will be created when "
|
"Specifies where backing files will be created when "
|
||||||
"shmem_mmap_relocate_backing_file is in use.", false, false, "/dev/shm",
|
"shmem_mmap_relocate_backing_file is in use.", false, false, "/dev/shm",
|
||||||
&backing_file_base_dir
|
&opal_shmem_mmap_backing_file_base_dir
|
||||||
);
|
);
|
||||||
|
|
||||||
return OPAL_SUCCESS;
|
return OPAL_SUCCESS;
|
||||||
@ -150,8 +152,8 @@ mmap_query(mca_base_module_t **module, int *priority)
|
|||||||
static int
|
static int
|
||||||
mmap_close(void)
|
mmap_close(void)
|
||||||
{
|
{
|
||||||
if (NULL != backing_file_base_dir) {
|
if (NULL != opal_shmem_mmap_backing_file_base_dir) {
|
||||||
free(backing_file_base_dir);
|
free(opal_shmem_mmap_backing_file_base_dir);
|
||||||
}
|
}
|
||||||
return OPAL_SUCCESS;
|
return OPAL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -256,12 +256,13 @@ segment_create(opal_shmem_ds_t *ds_buf,
|
|||||||
shmem_ds_reset(ds_buf);
|
shmem_ds_reset(ds_buf);
|
||||||
|
|
||||||
/* change the path of shmem mmap's backing store? */
|
/* change the path of shmem mmap's backing store? */
|
||||||
if (0 != relocate_backing_file) {
|
if (0 != opal_shmem_mmap_relocate_backing_file) {
|
||||||
int err;
|
int err;
|
||||||
if (path_usable(backing_file_base_dir, &err)) {
|
if (path_usable(opal_shmem_mmap_backing_file_base_dir, &err)) {
|
||||||
if (NULL ==
|
if (NULL ==
|
||||||
(real_file_name = get_uniq_file_name(backing_file_base_dir,
|
(real_file_name =
|
||||||
file_name))) {
|
get_uniq_file_name(opal_shmem_mmap_backing_file_base_dir,
|
||||||
|
file_name))) {
|
||||||
/* out of resources */
|
/* out of resources */
|
||||||
return OPAL_ERROR;
|
return OPAL_ERROR;
|
||||||
}
|
}
|
||||||
@ -270,17 +271,17 @@ segment_create(opal_shmem_ds_t *ds_buf,
|
|||||||
* cannot be used :-(. if the flag is negative, then warn and continue
|
* cannot be used :-(. if the flag is negative, then warn and continue
|
||||||
* with the default path. otherwise, fail.
|
* with the default path. otherwise, fail.
|
||||||
*/
|
*/
|
||||||
else if (relocate_backing_file < 0) {
|
else if (opal_shmem_mmap_relocate_backing_file < 0) {
|
||||||
opal_output(0, "shmem: mmap: WARNING: could not relocate "
|
opal_output(0, "shmem: mmap: WARNING: could not relocate "
|
||||||
"backing store to \"%s\" (%s). Continuing with "
|
"backing store to \"%s\" (%s). Continuing with "
|
||||||
"default path.\n", backing_file_base_dir,
|
"default path.\n",
|
||||||
strerror(err));
|
opal_shmem_mmap_backing_file_base_dir, strerror(err));
|
||||||
}
|
}
|
||||||
/* must be positive, so fail */
|
/* must be positive, so fail */
|
||||||
else {
|
else {
|
||||||
opal_output(0, "shmem: mmap: WARNING: could not relocate "
|
opal_output(0, "shmem: mmap: WARNING: could not relocate "
|
||||||
"backing store to \"%s\" (%s). Cannot continue with "
|
"backing store to \"%s\" (%s). Cannot continue with "
|
||||||
"shmem mmap.\n", backing_file_base_dir, strerror(err));
|
"shmem mmap.\n", opal_shmem_mmap_backing_file_base_dir, strerror(err));
|
||||||
return OPAL_ERROR;
|
return OPAL_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user