Per request from Brian, enable mapping of stddiag output (output from opal_output calls) to stderr of the local process. This allows you to obtain that output in a local window (for example, when using xterm for each process) instead of having it automatically forwarded to mpirun. Turn this on automatically whenever someone uses the -xterm option, and to be set manually using the orte_map_stddiag_to_stderr mca param.
This commit was SVN r26352.
Этот коммит содержится в:
родитель
46f47e08b6
Коммит
f3e3704c9e
@ -186,12 +186,14 @@ orte_iof_base_setup_child(orte_iof_base_io_conf_t *opts, char ***env)
|
||||
close(opts->p_stderr[1]);
|
||||
}
|
||||
|
||||
/* Set an environment variable that the new child process can use
|
||||
to get the fd of the pipe connected to the INTERNAL IOF tag. */
|
||||
asprintf(&str, "%d", opts->p_internal[1]);
|
||||
if (NULL != str) {
|
||||
opal_setenv("OPAL_OUTPUT_STDERR_FD", str, true, env);
|
||||
free(str);
|
||||
if (!orte_map_stddiag_to_stderr) {
|
||||
/* Set an environment variable that the new child process can use
|
||||
to get the fd of the pipe connected to the INTERNAL IOF tag. */
|
||||
asprintf(&str, "%d", opts->p_internal[1]);
|
||||
if (NULL != str) {
|
||||
opal_setenv("OPAL_OUTPUT_STDERR_FD", str, true, env);
|
||||
free(str);
|
||||
}
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
|
@ -183,6 +183,9 @@ char *orte_forward_envars = NULL;
|
||||
/* preload binaries */
|
||||
bool orte_preload_binaries = false;
|
||||
|
||||
/* map stddiag output to stderr so it isn't forwarded to mpirun */
|
||||
bool orte_map_stddiag_to_stderr = false;
|
||||
|
||||
/* progress thread */
|
||||
#if ORTE_ENABLE_PROGRESS_THREAD
|
||||
opal_thread_t orte_progress_thread;
|
||||
|
@ -695,6 +695,9 @@ ORTE_DECLSPEC extern char *orte_forward_envars;
|
||||
/* preload binaries */
|
||||
ORTE_DECLSPEC extern bool orte_preload_binaries;
|
||||
|
||||
/* map stddiag output to stderr so it isn't forwarded to mpirun */
|
||||
ORTE_DECLSPEC extern bool orte_map_stddiag_to_stderr;
|
||||
|
||||
#endif /* ORTE_DISABLE_FULL_SUPPORT */
|
||||
|
||||
END_C_DECLS
|
||||
|
@ -421,8 +421,20 @@ int orte_register_params(void)
|
||||
* back to the controlling terminal
|
||||
*/
|
||||
orte_leave_session_attached = true;
|
||||
/* also want to redirect stddiag output from opal_output
|
||||
* to stderr from the process so those messages show
|
||||
* up in the xterm window instead of being forwarded to mpirun
|
||||
*/
|
||||
orte_map_stddiag_to_stderr = true;
|
||||
}
|
||||
|
||||
/* whether or not to map stddiag to stderr */
|
||||
mca_base_param_reg_int_name("orte", "map_stddiag_to_stderr",
|
||||
"Map output from opal_output to stderr of the local process [default: no]",
|
||||
false, false,
|
||||
(int) false, &value);
|
||||
orte_map_stddiag_to_stderr = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
/* whether or not to forward SIGTSTP and SIGCONT signals */
|
||||
mca_base_param_reg_int_name("orte", "forward_job_control",
|
||||
"Forward SIGTSTP (after converting to SIGSTOP) and SIGCONT signals to the application procs [default: no]",
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user