Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified ompi/mca/mtl/psm2/mtl_psm2_types.h
100755 → 100644
Empty file.
Empty file modified ompi/mpi/fortran/use-mpi-f08-desc/ISO_Fortran_binding.h
100755 → 100644
Empty file.
Empty file modified opal/mca/pmix/ext20/pmix_ext20.c
100755 → 100644
Empty file.
Empty file modified opal/mca/pmix/ext20/pmix_ext20_server_north.c
100755 → 100644
Empty file.
Empty file modified opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_listener.c
100755 → 100644
Empty file.
Empty file modified opal/mca/pmix/pmix2x/pmix/src/tool/pmix_tool.c
100755 → 100644
Empty file.
Empty file modified opal/mca/pmix/pmix2x/pmix2x.c
100755 → 100644
Empty file.
Empty file modified opal/mca/pmix/pmix2x/pmix2x_server_north.c
100755 → 100644
Empty file.
Empty file modified opal/mca/pmix/pmix_server.h
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion orte/mca/ess/base/ess_base_std_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
15 changes: 2 additions & 13 deletions orte/mca/ess/base/ess_base_std_orted.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,31 +239,20 @@ 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(&param, "%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
*/
orte_session_dir_cleanup(ORTE_JOBID_WILDCARD);
/* 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";
Expand Down
2 changes: 1 addition & 1 deletion orte/mca/ess/base/ess_base_std_tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions orte/mca/ess/hnp/ess_hnp_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion orte/mca/filem/raw/filem_raw_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion orte/mca/schizo/ompi/schizo_ompi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ static int setup_child(orte_job_t *jdata,
param = NULL;
if (ORTE_SUCCESS != (rc = orte_session_dir_get_name(&param, &value, NULL,
orte_process_info.nodename,
NULL, &child->name))) {
&child->name))) {
ORTE_ERROR_LOG(rc);
if (NULL != value) {
free(value);
Expand Down
Empty file modified orte/orted/orted_submit.c
100755 → 100644
Empty file.
Empty file modified orte/orted/pmix/pmix_server.c
100755 → 100644
Empty file.
Empty file modified orte/orted/pmix/pmix_server_gen.c
100755 → 100644
Empty file.
Empty file modified orte/orted/pmix/pmix_server_internal.h
100755 → 100644
Empty file.
Empty file modified orte/test/system/pmixtool.c
100755 → 100644
Empty file.
61 changes: 27 additions & 34 deletions orte/util/session_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.<hostname>.<pid>"
*/
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,
Expand All @@ -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'
*/
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -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,
Expand All @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions orte/util/session_dir.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down