Fix session dir cleanup code.
Этот коммит содержится в:
родитель
dc0ab674de
Коммит
74a11d7832
@ -94,7 +94,7 @@ static int rte_init(void)
|
||||
uint16_t u16, *u16ptr;
|
||||
char **peers=NULL, *mycpuset, **cpusets=NULL;
|
||||
opal_process_name_t wildcard_rank, pname;
|
||||
bool bool_val, tdir_mca_override = false;
|
||||
bool bool_val, *bool_ptr = &bool_val, tdir_mca_override = false;
|
||||
size_t i;
|
||||
|
||||
/* run the prolog */
|
||||
@ -247,7 +247,7 @@ static int rte_init(void)
|
||||
OPAL_MODEX_RECV_VALUE_OPTIONAL(ret, OPAL_PMIX_TMPDIR, &wildcard_rank, &val, OPAL_STRING);
|
||||
if (OPAL_SUCCESS == ret && NULL != val) {
|
||||
/* TODO: who has precedence - pmix of MCA setting??? */
|
||||
if( NULL != orte_process_info.top_session_dir ){
|
||||
if( NULL == orte_process_info.top_session_dir ){
|
||||
orte_process_info.top_session_dir = val;
|
||||
} else {
|
||||
/* keep the MCA setting */
|
||||
@ -288,9 +288,9 @@ static int rte_init(void)
|
||||
}
|
||||
|
||||
if( !tdir_mca_override ){
|
||||
OPAL_MODEX_RECV_VALUE_OPTIONAL(ret, OPAL_PMIX_TDIR_RMCLEAN, &wildcard_rank, &bool_val, OPAL_BOOL);
|
||||
OPAL_MODEX_RECV_VALUE_OPTIONAL(ret, OPAL_PMIX_TDIR_RMCLEAN, &wildcard_rank, &bool_ptr, OPAL_BOOL);
|
||||
if (OPAL_SUCCESS == ret ) {
|
||||
orte_process_info.rm_session_dirs = val;
|
||||
orte_process_info.rm_session_dirs = bool_val;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -444,8 +444,6 @@ int
|
||||
orte_session_dir_finalize(orte_process_name_t *proc)
|
||||
{
|
||||
int rc;
|
||||
char *tmp;
|
||||
char *job_session_dir, *vpid, *proc_session_dir;
|
||||
|
||||
if (!orte_create_session_dirs || orte_process_info.rm_session_dirs ) {
|
||||
/* we haven't created them or RM will clean them up for us*/
|
||||
@ -512,7 +510,7 @@ orte_session_dir_finalize(orte_process_name_t *proc)
|
||||
if (orte_debug_flag) {
|
||||
opal_output(0, "sess_dir_finalize: found top session dir empty - deleting");
|
||||
}
|
||||
rmdir(tmp);
|
||||
rmdir(orte_process_info.top_session_dir);
|
||||
} else {
|
||||
if (orte_debug_flag) {
|
||||
if (OPAL_ERR_NOT_FOUND ==
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user