1
1

Provide a new option that allows a user to leave an ssh session open without getting deluged by ORTE debug output. The new option is --leave-session-attached, with a corresponding MCA param of orte_leave_session_attached.

Theoretically, any PLM could use this - but in reality, all of them except rsh/ssh already leave the session attached anyway.

This fixes trac:656 - a REALLY old ticket

This commit was SVN r19294.

The following Trac tickets were found above:
  Ticket 656 --> https://svn.open-mpi.org/trac/ompi/ticket/656
This commit is contained in:
Ralph Castain 2008-08-14 18:59:01 +00:00
parent bb585922fd
commit 49745c5f40
5 changed files with 25 additions and 9 deletions

View File

@ -598,7 +598,8 @@ static int setup_launch(int *argcptr, char ***argvptr,
if (!mca_plm_rsh_component.tree_spawn &&
!orte_debug_flag &&
!orte_debug_daemons_flag &&
!orte_debug_daemons_file_flag) {
!orte_debug_daemons_file_flag &&
!orte_leave_session_attached) {
opal_argv_append(&argc, &argv, "--daemonize");
}
@ -994,7 +995,8 @@ int orte_plm_rsh_launch(orte_job_t *jdata)
goto launch_apps;
}
if (0 < opal_output_get_verbosity(orte_plm_globals.output) &&
if ((0 < opal_output_get_verbosity(orte_plm_globals.output) ||
orte_leave_session_attached) &&
mca_plm_rsh_component.num_concurrent < map->num_new_daemons) {
/**
* If we are in '--debug-daemons' we keep the ssh connection

View File

@ -48,6 +48,7 @@
bool orte_timing;
bool orte_debug_daemons_flag = false;
bool orte_debug_daemons_file_flag = false;
bool orte_leave_session_attached;
bool orte_do_not_launch = false;
bool orted_spin_flag = false;
bool orte_static_ports = false;

View File

@ -368,6 +368,7 @@ ORTE_DECLSPEC orte_job_t* orte_get_job_data_object(orte_jobid_t job);
/* global variables used by RTE - instanced in orte_globals.c */
ORTE_DECLSPEC extern bool orte_reuse_daemons, orte_timing;
ORTE_DECLSPEC extern bool orte_debug_daemons_flag, orte_debug_daemons_file_flag;
ORTE_DECLSPEC extern bool orte_leave_session_attached;
ORTE_DECLSPEC extern bool orte_do_not_launch;
ORTE_DECLSPEC extern bool orted_spin_flag;
ORTE_DECLSPEC extern bool orte_static_ports;

View File

@ -76,6 +76,14 @@ int orte_register_params(void)
orte_debug_daemons_flag = true;
}
/* do we want session output left open? */
mca_base_param_reg_int_name("orte", "leave_session_attached",
"Whether applications and/or daemons should leave their sessions "
"attached so that any output can be received - this allows X forwarding "
"without all the attendant debugging output",
false, false, (int)false, &value);
orte_leave_session_attached = OPAL_INT_TO_BOOL(value);
/* See comment in orte/tools/orterun/debuggers.c about this MCA
param (this param is internal) */
mca_base_param_reg_int_name("orte",

View File

@ -142,12 +142,12 @@ static opal_cmd_line_init_t cmd_line_init[] = {
"Indicates that multiple app_contexts are being provided that are a mix of 32/64 bit binaries" },
/* select XML output */
{ "orte", "xml", "output", '\0', NULL, "xml", 0,
{ "orte", "xml", "output", '\0', "xml", "xml", 0,
NULL, OPAL_CMD_LINE_TYPE_BOOL,
"Provide all output in XML format" },
/* Specify the launch agent to be used */
{ "orte", "launch", "agent", '\0', NULL, "launch-agent", 1,
{ "orte", "launch", "agent", '\0', "launch-agent", "launch-agent", 1,
NULL, OPAL_CMD_LINE_TYPE_STRING,
"Command used to start processes on remote nodes (default: orted)" },
@ -279,23 +279,27 @@ static opal_cmd_line_init_t cmd_line_init[] = {
"Sequence of debuggers to search for when \"--debug\" is used" },
/* OpenRTE arguments */
{ "orte", "debug", NULL, 'd', NULL, "debug-devel", 0,
{ "orte", "debug", NULL, 'd', "debug-devel", "debug-devel", 0,
NULL, OPAL_CMD_LINE_TYPE_BOOL,
"Enable debugging of OpenRTE" },
{ "orte", "debug", "daemons", '\0', NULL, "debug-daemons", 0,
{ "orte", "debug", "daemons", '\0', "debug-daemons", "debug-daemons", 0,
NULL, OPAL_CMD_LINE_TYPE_INT,
"Enable debugging of any OpenRTE daemons used by this application" },
{ "orte", "debug", "daemons_file", '\0', NULL, "debug-daemons-file", 0,
{ "orte", "debug", "daemons_file", '\0', "debug-daemons-file", "debug-daemons-file", 0,
NULL, OPAL_CMD_LINE_TYPE_BOOL,
"Enable debugging of any OpenRTE daemons used by this application, storing output in files" },
{ NULL, NULL, NULL, '\0', NULL, "tmpdir", 1,
{ "orte", "leave", "session_attached", '\0', "leave-session-attached", "leave-session-attached", 0,
NULL, OPAL_CMD_LINE_TYPE_BOOL,
"Enable debugging of OpenRTE" },
{ NULL, NULL, NULL, '\0', "tmpdir", "tmpdir", 1,
&orte_process_info.tmpdir_base, OPAL_CMD_LINE_TYPE_STRING,
"Set the root for the session directory tree for orterun ONLY" },
{ "orte", "do_not", "launch", '\0', NULL, "do-not-launch", 0,
{ "orte", "do_not", "launch", '\0', "do-not-launch", "do-not-launch", 0,
NULL, OPAL_CMD_LINE_TYPE_BOOL,
"Perform all necessary operations to prepare to launch the application, but do not actually launch it" },