diff --git a/orte/mca/ess/base/ess_base_std_orted.c b/orte/mca/ess/base/ess_base_std_orted.c index b6b5b6352c5..11ac9f19c92 100644 --- a/orte/mca/ess/base/ess_base_std_orted.c +++ b/orte/mca/ess/base/ess_base_std_orted.c @@ -15,6 +15,7 @@ * Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2013-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -601,6 +602,10 @@ int orte_ess_base_orted_setup(char **hosts) "orte_init:startup:internal-failure", true, error, ORTE_ERROR_NAME(ret), ret); + /* remove our use of the session directory tree */ + orte_session_dir_finalize(ORTE_PROC_MY_NAME); + /* ensure we scrub the session directory tree */ + orte_session_dir_cleanup(ORTE_JOBID_WILDCARD); return ORTE_ERR_SILENT; } diff --git a/orte/mca/ess/hnp/ess_hnp_module.c b/orte/mca/ess/hnp/ess_hnp_module.c index bd5e8edcfa5..c80f5a30180 100644 --- a/orte/mca/ess/hnp/ess_hnp_module.c +++ b/orte/mca/ess/hnp/ess_hnp_module.c @@ -17,6 +17,7 @@ * Copyright (c) 2013-2017 Intel, Inc. All rights reserved. * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -755,6 +756,18 @@ static int rte_init(void) true, error, ORTE_ERROR_NAME(ret), ret); } + /* remove my contact info file, if we have session directories */ + if (NULL != orte_process_info.job_session_dir) { + jobfam_dir = opal_dirname(orte_process_info.job_session_dir); + contact_path = opal_os_path(false, jobfam_dir, "contact.txt", NULL); + free(jobfam_dir); + unlink(contact_path); + free(contact_path); + } + /* remove our use of the session directory tree */ + orte_session_dir_finalize(ORTE_PROC_MY_NAME); + /* ensure we scrub the session directory tree */ + orte_session_dir_cleanup(ORTE_JOBID_WILDCARD); return ORTE_ERR_SILENT; } @@ -820,6 +833,8 @@ static int rte_finalize(void) (void) mca_base_framework_close(&orte_rml_base_framework); (void) mca_base_framework_close(&orte_oob_base_framework); + /* remove our use of the session directory tree */ + orte_session_dir_finalize(ORTE_PROC_MY_NAME); /* ensure we scrub the session directory tree */ orte_session_dir_cleanup(ORTE_JOBID_WILDCARD);