diff --git a/ompi/mca/mtl/psm2/mtl_psm2_types.h b/ompi/mca/mtl/psm2/mtl_psm2_types.h old mode 100755 new mode 100644 diff --git a/ompi/mpi/fortran/use-mpi-f08-desc/ISO_Fortran_binding.h b/ompi/mpi/fortran/use-mpi-f08-desc/ISO_Fortran_binding.h old mode 100755 new mode 100644 diff --git a/opal/mca/pmix/ext20/pmix_ext20.c b/opal/mca/pmix/ext20/pmix_ext20.c old mode 100755 new mode 100644 diff --git a/opal/mca/pmix/ext20/pmix_ext20_server_north.c b/opal/mca/pmix/ext20/pmix_ext20_server_north.c old mode 100755 new mode 100644 diff --git a/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_listener.c b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_listener.c old mode 100755 new mode 100644 diff --git a/opal/mca/pmix/pmix2x/pmix/src/tool/pmix_tool.c b/opal/mca/pmix/pmix2x/pmix/src/tool/pmix_tool.c old mode 100755 new mode 100644 diff --git a/opal/mca/pmix/pmix2x/pmix2x.c b/opal/mca/pmix/pmix2x/pmix2x.c old mode 100755 new mode 100644 diff --git a/opal/mca/pmix/pmix2x/pmix2x_server_north.c b/opal/mca/pmix/pmix2x/pmix2x_server_north.c old mode 100755 new mode 100644 diff --git a/opal/mca/pmix/pmix_server.h b/opal/mca/pmix/pmix_server.h old mode 100755 new mode 100644 diff --git a/orte/mca/ess/base/ess_base_std_app.c b/orte/mca/ess/base/ess_base_std_app.c index 3e5ed70d83..e9da311f16 100644 --- a/orte/mca/ess/base/ess_base_std_app.c +++ b/orte/mca/ess/base/ess_base_std_app.c @@ -138,7 +138,7 @@ int orte_ess_base_app_setup(bool db_restrict_local) orte_process_info.nodename)); if (ORTE_SUCCESS != (ret = orte_session_dir(true, orte_process_info.tmpdir_base, - orte_process_info.nodename, NULL, + orte_process_info.nodename, ORTE_PROC_MY_NAME))) { ORTE_ERROR_LOG(ret); error = "orte_session_dir"; diff --git a/orte/mca/ess/base/ess_base_std_orted.c b/orte/mca/ess/base/ess_base_std_orted.c index 041f27784f..1b6a1d07d1 100644 --- a/orte/mca/ess/base/ess_base_std_orted.c +++ b/orte/mca/ess/base/ess_base_std_orted.c @@ -239,23 +239,12 @@ int orte_ess_base_orted_setup(char **hosts) */ if (ORTE_SUCCESS != (ret = orte_session_dir(false, orte_process_info.tmpdir_base, - orte_process_info.nodename, NULL, + orte_process_info.nodename, ORTE_PROC_MY_NAME))) { ORTE_ERROR_LOG(ret); error = "orte_session_dir define"; goto error; } - /* if we have multiple daemons/node, then add our pid to the name */ - if (NULL != (param = getenv("OMPI_MCA_ras_base_multiplier")) && - 1 < strtol(param, NULL, 10)) { - if (0 > asprintf(¶m, "%s.%lu", orte_process_info.top_session_dir, (unsigned long)orte_process_info.pid)) { - ret = ORTE_ERR_OUT_OF_RESOURCE; - error = "create top session dir"; - goto error; - } - free(orte_process_info.top_session_dir); - orte_process_info.top_session_dir = param; - } /* clear the session directory just in case there are * stale directories laying around */ @@ -263,7 +252,7 @@ int orte_ess_base_orted_setup(char **hosts) /* now actually create the directory tree */ if (ORTE_SUCCESS != (ret = orte_session_dir(true, orte_process_info.tmpdir_base, - orte_process_info.nodename, NULL, + orte_process_info.nodename, ORTE_PROC_MY_NAME))) { ORTE_ERROR_LOG(ret); error = "orte_session_dir"; diff --git a/orte/mca/ess/base/ess_base_std_tool.c b/orte/mca/ess/base/ess_base_std_tool.c index 44e4c11039..b92fd4693e 100644 --- a/orte/mca/ess/base/ess_base_std_tool.c +++ b/orte/mca/ess/base/ess_base_std_tool.c @@ -148,7 +148,7 @@ int orte_ess_base_tool_setup(void) if (ORTE_SUCCESS != (ret = orte_session_dir_get_name(NULL, &orte_process_info.tmpdir_base, &orte_process_info.top_session_dir, - orte_process_info.nodename, NULL, NULL))) { + orte_process_info.nodename, NULL))) { ORTE_ERROR_LOG(ret); error = "define session dir names"; goto error; diff --git a/orte/mca/ess/hnp/ess_hnp_module.c b/orte/mca/ess/hnp/ess_hnp_module.c index db490b15f8..c7984a16ec 100644 --- a/orte/mca/ess/hnp/ess_hnp_module.c +++ b/orte/mca/ess/hnp/ess_hnp_module.c @@ -296,7 +296,7 @@ static int rte_init(void) */ if (ORTE_SUCCESS != (ret = orte_session_dir(false, orte_process_info.tmpdir_base, - orte_process_info.nodename, NULL, + orte_process_info.nodename, ORTE_PROC_MY_NAME))) { error = "orte_session_dir define"; goto error; @@ -309,7 +309,7 @@ static int rte_init(void) /* now actually create the directory tree */ if (ORTE_SUCCESS != (ret = orte_session_dir(true, orte_process_info.tmpdir_base, - orte_process_info.nodename, NULL, + orte_process_info.nodename, ORTE_PROC_MY_NAME))) { error = "orte_session_dir"; goto error; diff --git a/orte/mca/filem/raw/filem_raw_module.c b/orte/mca/filem/raw/filem_raw_module.c index aeedef2eae..3070bc6987 100644 --- a/orte/mca/filem/raw/filem_raw_module.c +++ b/orte/mca/filem/raw/filem_raw_module.c @@ -739,7 +739,7 @@ static int raw_link_local_files(orte_job_t *jdata, path = NULL; rc = orte_session_dir_get_name(&path, &prefix, NULL, orte_process_info.nodename, - NULL, &proc->name); + &proc->name); /* create it, if it doesn't already exist */ if (OPAL_SUCCESS != (rc = opal_os_dirpath_create(path, S_IRWXU))) { ORTE_ERROR_LOG(rc); diff --git a/orte/mca/schizo/ompi/schizo_ompi.c b/orte/mca/schizo/ompi/schizo_ompi.c index 0f4f75e190..13cb951b40 100644 --- a/orte/mca/schizo/ompi/schizo_ompi.c +++ b/orte/mca/schizo/ompi/schizo_ompi.c @@ -1106,7 +1106,7 @@ static int setup_child(orte_job_t *jdata, param = NULL; if (ORTE_SUCCESS != (rc = orte_session_dir_get_name(¶m, &value, NULL, orte_process_info.nodename, - NULL, &child->name))) { + &child->name))) { ORTE_ERROR_LOG(rc); if (NULL != value) { free(value); diff --git a/orte/orted/orted_submit.c b/orte/orted/orted_submit.c old mode 100755 new mode 100644 diff --git a/orte/orted/pmix/pmix_server.c b/orte/orted/pmix/pmix_server.c old mode 100755 new mode 100644 diff --git a/orte/orted/pmix/pmix_server_gen.c b/orte/orted/pmix/pmix_server_gen.c old mode 100755 new mode 100644 diff --git a/orte/orted/pmix/pmix_server_internal.h b/orte/orted/pmix/pmix_server_internal.h old mode 100755 new mode 100644 diff --git a/orte/test/system/pmixtool.c b/orte/test/system/pmixtool.c old mode 100755 new mode 100644 diff --git a/orte/util/session_dir.c b/orte/util/session_dir.c index b0839a74d2..561c4cef07 100644 --- a/orte/util/session_dir.c +++ b/orte/util/session_dir.c @@ -113,19 +113,18 @@ static int orte_create_dir(char *directory) } /* - * Construct the fullpath to the session directory + * Construct the fullpath to the session directory - it + * will consist of "ompi.." */ int orte_session_dir_get_name(char **fulldirpath, char **return_prefix, /* This will come back as the valid tmp dir */ char **return_frontend, char *hostid, - char *batchid, orte_process_name_t *proc) { char *hostname = NULL, *batchname = NULL, *sessions = NULL, - *user = NULL, *prefix = NULL, *frontend = NULL, *jobfam = NULL, @@ -134,15 +133,10 @@ orte_session_dir_get_name(char **fulldirpath, bool prefix_provided = false; int exit_status = ORTE_SUCCESS; size_t len; - int uid; /* Ensure that system info is set */ orte_proc_info(); - /* get the name of the user */ - uid = getuid(); - asprintf(&user, "%d", uid); - /* * set the 'hostname' */ @@ -160,24 +154,12 @@ orte_session_dir_get_name(char **fulldirpath, } } - /* - * set the 'batchid' - */ - if (NULL != batchid) - batchname = strdup(batchid); - else - batchname = strdup("0"); - - /* - * get the front part of the session directory - * Will look something like: - * openmpi-sessions-USERNAME@HOSTNAME_BATCHID - */ + /* construct the frontend of the session directory*/ if (NULL != orte_process_info.top_session_dir) { frontend = strdup(orte_process_info.top_session_dir); } else { /* If not set then construct it */ - if (0 > asprintf(&frontend, "openmpi-sessions-%s@%s_%s", user, hostname, batchname)) { + if (0 > asprintf(&frontend, "ompi.%s.%lu", hostname, (unsigned long)orte_process_info.pid)) { ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); exit_status = ORTE_ERR_OUT_OF_RESOURCE; goto cleanup; @@ -325,19 +307,30 @@ orte_session_dir_get_name(char **fulldirpath, } cleanup: - if(NULL != hostname) + if(NULL != hostname) { free(hostname); - if(NULL != batchname) + } + if(NULL != batchname) { free(batchname); - if(NULL != sessions) + } + if(NULL != sessions) { free(sessions); - if(NULL != user) - free(user); - if (NULL != prefix) free(prefix); - if (NULL != frontend) free(frontend); - if (NULL != jobfam) free(jobfam); - if (NULL != job) free(job); - if (NULL != vpidstr) free(vpidstr); + } + if (NULL != prefix) { + free(prefix); + } + if (NULL != frontend) { + free(frontend); + } + if (NULL != jobfam) { + free(jobfam); + } + if (NULL != job) { + free(job); + } + if (NULL != vpidstr) { + free(vpidstr); + } return exit_status; } @@ -347,7 +340,7 @@ orte_session_dir_get_name(char **fulldirpath, */ int orte_session_dir(bool create, char *prefix, char *hostid, - char *batchid, orte_process_name_t *proc) + orte_process_name_t *proc) { char *fulldirpath = NULL, *frontend = NULL, @@ -367,7 +360,7 @@ int orte_session_dir(bool create, &local_prefix, &frontend, hostid, - batchid, proc))) { + proc))) { if (ORTE_ERR_FATAL == rc) { /* this indicates we should abort quietly */ rc = ORTE_ERR_SILENT; diff --git a/orte/util/session_dir.h b/orte/util/session_dir.h index 034f96fb94..6570b6e16b 100644 --- a/orte/util/session_dir.h +++ b/orte/util/session_dir.h @@ -121,7 +121,7 @@ BEGIN_C_DECLS * "false") or created (if create is "true"). */ ORTE_DECLSPEC int orte_session_dir(bool create, char *prefix, char *hostid, - char *batchid, orte_process_name_t *proc); + orte_process_name_t *proc); /* * Construct the session directory name from the input parameters. @@ -131,7 +131,6 @@ ORTE_DECLSPEC int orte_session_dir_get_name(char **fulldirpath, char **prfx, char **frontend, char *hostid, - char *batchid, orte_process_name_t *proc); /** The orte_session_dir_finalize() function performs a cleanup of the