rename some variables following ompi's naming convention.
This commit was SVN r25487.
Этот коммит содержится в:
родитель
47499d1d3d
Коммит
15249dfc01
@ -29,8 +29,8 @@
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
extern int relocate_backing_file;
|
||||
extern char *backing_file_base_dir;
|
||||
extern int opal_shmem_mmap_relocate_backing_file;
|
||||
extern char *opal_shmem_mmap_backing_file_base_dir;
|
||||
|
||||
/**
|
||||
* globally exported variable to hold the mmap component.
|
||||
|
@ -37,8 +37,8 @@
|
||||
const char *opal_shmem_mmap_component_version_string =
|
||||
"OPAL mmap shmem MCA component version " OPAL_VERSION;
|
||||
|
||||
int relocate_backing_file = 0;
|
||||
char *backing_file_base_dir = NULL;
|
||||
int opal_shmem_mmap_relocate_backing_file = 0;
|
||||
char *opal_shmem_mmap_backing_file_base_dir = NULL;
|
||||
|
||||
/**
|
||||
* local functions
|
||||
@ -120,10 +120,12 @@ mmap_open(void)
|
||||
"relocate_backing_file",
|
||||
"Whether to change the default placement of backing files or not "
|
||||
"(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, "
|
||||
"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(
|
||||
@ -131,7 +133,7 @@ mmap_open(void)
|
||||
"backing_file_base_dir",
|
||||
"Specifies where backing files will be created when "
|
||||
"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;
|
||||
@ -150,8 +152,8 @@ mmap_query(mca_base_module_t **module, int *priority)
|
||||
static int
|
||||
mmap_close(void)
|
||||
{
|
||||
if (NULL != backing_file_base_dir) {
|
||||
free(backing_file_base_dir);
|
||||
if (NULL != opal_shmem_mmap_backing_file_base_dir) {
|
||||
free(opal_shmem_mmap_backing_file_base_dir);
|
||||
}
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
@ -256,12 +256,13 @@ segment_create(opal_shmem_ds_t *ds_buf,
|
||||
shmem_ds_reset(ds_buf);
|
||||
|
||||
/* change the path of shmem mmap's backing store? */
|
||||
if (0 != relocate_backing_file) {
|
||||
if (0 != opal_shmem_mmap_relocate_backing_file) {
|
||||
int err;
|
||||
if (path_usable(backing_file_base_dir, &err)) {
|
||||
if (path_usable(opal_shmem_mmap_backing_file_base_dir, &err)) {
|
||||
if (NULL ==
|
||||
(real_file_name = get_uniq_file_name(backing_file_base_dir,
|
||||
file_name))) {
|
||||
(real_file_name =
|
||||
get_uniq_file_name(opal_shmem_mmap_backing_file_base_dir,
|
||||
file_name))) {
|
||||
/* out of resources */
|
||||
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
|
||||
* 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 "
|
||||
"backing store to \"%s\" (%s). Continuing with "
|
||||
"default path.\n", backing_file_base_dir,
|
||||
strerror(err));
|
||||
"default path.\n",
|
||||
opal_shmem_mmap_backing_file_base_dir, strerror(err));
|
||||
}
|
||||
/* must be positive, so fail */
|
||||
else {
|
||||
opal_output(0, "shmem: mmap: WARNING: could not relocate "
|
||||
"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;
|
||||
}
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user