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 */
|
/* Set some defaults */
|
||||||
|
|
||||||
output_prefix = strdup("output-");
|
asprintf(&output_prefix, "output-pid%d-", getpid());
|
||||||
if (NULL != (str = getenv("TMPDIR"))) {
|
if (NULL != (str = getenv("TMPDIR"))) {
|
||||||
output_dir = strdup(str);
|
output_dir = strdup(str);
|
||||||
} else if (NULL != (str = getenv("HOME"))) {
|
} 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
|
* The default value for the output directory is whatever is
|
||||||
* specified in the TMPDIR environment variable if it exists, or
|
* specified in the TMPDIR environment variable if it exists, or
|
||||||
* $HOME if it does not. The default value for the prefix is
|
* $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
|
* If dir or prefix are NULL, new values are not set. The strings
|
||||||
* represented by dir and prefix are copied into internal storage;
|
* represented by dir and prefix are copied into internal storage;
|
||||||
* it is safe to free() these values after
|
* it is safe to pass string constants or free() these values
|
||||||
* opal_output_set_output_file_info() returns.
|
* after opal_output_set_output_file_info() returns.
|
||||||
*
|
*
|
||||||
* If olddir or oldprefix are not NULL, copies of the old
|
* If olddir or oldprefix are not NULL, copies of the old
|
||||||
* directory and prefix (respectively) are returned in these
|
* 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
|
/* Once the session directory location has been established, set
|
||||||
the opal_output default file location to be in the
|
the opal_output default file location to be in the
|
||||||
proc-specific session directory. */
|
proc-specific session directory. */
|
||||||
opal_output_set_output_file_info(orte_process_info.proc_session_dir, NULL,
|
opal_output_set_output_file_info(orte_process_info.proc_session_dir,
|
||||||
NULL, NULL);
|
"output-", NULL, NULL);
|
||||||
|
|
||||||
/* if i'm the seed, get my contact info and write my setup file for others to find */
|
/* if i'm the seed, get my contact info and write my setup file for others to find */
|
||||||
if (orte_process_info.seed) {
|
if (orte_process_info.seed) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user