From 6c879f87fb0cfc4032bcaee8e01829ab1f71feda Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Wed, 27 Jul 2011 19:37:17 +0000 Subject: [PATCH] Add a new param "orte_remote_tmpdir_base" for those situations where the compute nodes require a different session directory head than the head node. This commit was SVN r24956. --- orte/mca/ess/base/ess_base_std_app.c | 2 +- orte/mca/ess/base/ess_base_std_orted.c | 2 +- orte/mca/odls/base/odls_base_default_fns.c | 5 +++++ orte/runtime/orte_mca_params.c | 15 +++++++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/orte/mca/ess/base/ess_base_std_app.c b/orte/mca/ess/base/ess_base_std_app.c index a4f2e6f0b0..124a097f69 100644 --- a/orte/mca/ess/base/ess_base_std_app.c +++ b/orte/mca/ess/base/ess_base_std_app.c @@ -149,7 +149,7 @@ int orte_ess_base_app_setup(void) /* setup my session directory */ if (orte_create_session_dirs) { - OPAL_OUTPUT_VERBOSE((2, orte_debug_output, + OPAL_OUTPUT_VERBOSE((2, orte_ess_base_output, "%s setting up session dir with\n\ttmpdir: %s\n\thost %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (NULL == orte_process_info.tmpdir_base) ? "UNDEF" : orte_process_info.tmpdir_base, diff --git a/orte/mca/ess/base/ess_base_std_orted.c b/orte/mca/ess/base/ess_base_std_orted.c index e400980f7e..2a08182c21 100644 --- a/orte/mca/ess/base/ess_base_std_orted.c +++ b/orte/mca/ess/base/ess_base_std_orted.c @@ -340,7 +340,7 @@ int orte_ess_base_orted_setup(char **hosts) /* setup my session directory */ if (orte_create_session_dirs) { - OPAL_OUTPUT_VERBOSE((2, orte_debug_output, + OPAL_OUTPUT_VERBOSE((2, orte_ess_base_output, "%s setting up session dir with\n\ttmpdir: %s\n\thost %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (NULL == orte_process_info.tmpdir_base) ? "UNDEF" : orte_process_info.tmpdir_base, diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index 07d9646b43..44ec7f89aa 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -1014,6 +1014,11 @@ static int odls_base_default_setup_fork(orte_app_context_t *context, */ orte_ess_env_put(vpid_range, num_local_procs, environ_copy); + /* forcibly set the local tmpdir base to match ours */ + param = mca_base_param_environ_variable("orte","tmpdir","base"); + opal_setenv(param, orte_process_info.tmpdir_base, true, environ_copy); + free(param); + return ORTE_SUCCESS; } diff --git a/orte/runtime/orte_mca_params.c b/orte/runtime/orte_mca_params.c index 50172f5fb4..b979710d14 100644 --- a/orte/runtime/orte_mca_params.c +++ b/orte/runtime/orte_mca_params.c @@ -78,6 +78,21 @@ int orte_register_params(void) "Base of the session directory tree", false, false, NULL, &(orte_process_info.tmpdir_base)); + mca_base_param_reg_string_name("orte", "remote_tmpdir_base", + "Base of the session directory tree on remote nodes, if required to be different from head node", + false, false, NULL, &strval); + /* orterun will pickup the value and forward it along, but must not + * use it in its own work. So only a daemon needs to get it, and the + * daemon will pass it down to its application procs. Note that orterun + * will pass -its- value to any procs local to it + */ + if (ORTE_PROC_IS_DAEMON && NULL != strval) { + if (NULL != orte_process_info.tmpdir_base) { + free(orte_process_info.tmpdir_base); + } + orte_process_info.tmpdir_base = strval; + } + mca_base_param_reg_string_name("orte", "no_session_dirs", "Prohibited locations for session directories (multiple locations separated by ',', default=NULL)", false, false, NULL, &orte_prohibited_session_dirs);