Slight change to the defaults -- make the prefix "output-pid<pid>-" so
that multiple processes don't overwrite each other. Change that default in orte_init_stage1() to just "output-" (because the file will be in a process-unique directory at that point; the pid is no longer necessary). This commit was SVN r7256.
Этот коммит содержится в:
родитель
86cca77046
Коммит
0b255830e0
@ -137,7 +137,7 @@ bool opal_output_init(void)
|
||||
|
||||
/* Set some defaults */
|
||||
|
||||
output_prefix = strdup("output-");
|
||||
asprintf(&output_prefix, "output-pid%d-", getpid());
|
||||
if (NULL != (str = getenv("TMPDIR"))) {
|
||||
output_dir = strdup(str);
|
||||
} else if (NULL != (str = getenv("HOME"))) {
|
||||
|
@ -404,12 +404,13 @@ struct opal_output_stream_t {
|
||||
* The default value for the output directory is whatever is
|
||||
* specified in the TMPDIR environment variable if it exists, or
|
||||
* $HOME if it does not. The default value for the prefix is
|
||||
* "output-".
|
||||
* "output-pid<pid>-" (where "<pid>" is replaced by the PID of the
|
||||
* current process).
|
||||
*
|
||||
* If dir or prefix are NULL, new values are not set. The strings
|
||||
* represented by dir and prefix are copied into internal storage;
|
||||
* it is safe to free() these values after
|
||||
* opal_output_set_output_file_info() returns.
|
||||
* it is safe to pass string constants or free() these values
|
||||
* after opal_output_set_output_file_info() returns.
|
||||
*
|
||||
* If olddir or oldprefix are not NULL, copies of the old
|
||||
* directory and prefix (respectively) are returned in these
|
||||
|
@ -282,8 +282,8 @@ int orte_init_stage1(bool infrastructure)
|
||||
/* Once the session directory location has been established, set
|
||||
the opal_output default file location to be in the
|
||||
proc-specific session directory. */
|
||||
opal_output_set_output_file_info(orte_process_info.proc_session_dir, NULL,
|
||||
NULL, NULL);
|
||||
opal_output_set_output_file_info(orte_process_info.proc_session_dir,
|
||||
"output-", NULL, NULL);
|
||||
|
||||
/* if i'm the seed, get my contact info and write my setup file for others to find */
|
||||
if (orte_process_info.seed) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user