* Try to default to a value if the env variable isn't specified for starting
up the cofs code (variable is where to use as the comm directory). This commit was SVN r2020.
Этот коммит содержится в:
родитель
cb9706005d
Коммит
d1f6b7ebe7
@ -65,11 +65,18 @@ mca_oob_t* mca_oob_cofs_init(bool *allow_multi_user_threads, bool *have_hidden_t
|
||||
/*
|
||||
* See if we can write in our directory...
|
||||
*/
|
||||
if((tmp = getenv("OMPI_MCA_oob_cofs_dir")) == NULL) {
|
||||
ompi_output(0, "mca_oob_cofs_init: invalid/missing OMPI_MCA_oob_cofs_dir\n");
|
||||
if((tmp = getenv("OMPI_MCA_oob_cofs_dir")) != NULL) {
|
||||
/* user specified in env variable */
|
||||
strncpy(mca_oob_cofs_comm_loc, tmp, sizeof(mca_oob_cofs_comm_loc));
|
||||
} else if ((tmp = getenv("HOME")) != NULL) {
|
||||
/* just default to $HOME/cofs */
|
||||
snprintf(mca_oob_cofs_comm_loc, sizeof(mca_oob_cofs_comm_loc),
|
||||
"%s/cofs", tmp);
|
||||
} else {
|
||||
ompi_output(0, "mca_oob_cofs_init: invalid/missing "
|
||||
"OMPI_MCA_oob_cofs_dir\n");
|
||||
return NULL;
|
||||
}
|
||||
strncpy(mca_oob_cofs_comm_loc, tmp, sizeof(mca_oob_cofs_comm_loc));
|
||||
|
||||
len = strlen(tmp) + 32;
|
||||
tmp = malloc(len);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user