Add a new MCA param (and corresponding mpirun cmd line option) to output the debugger proctable info after launch. The output is just the job map with the process pid included, so you get a node-by-node list of the process ranks on that node and thier pids.
Works for initial launch and comm_spawn. xml and non-xml output is available This commit was SVN r22725.
Этот коммит содержится в:
родитель
8c7f3a0c44
Коммит
6c0d7940c7
@ -253,6 +253,19 @@ static void process_msg(int fd, short event, void *data)
|
||||
}
|
||||
job = jdata->jobid;
|
||||
|
||||
/* output debugger proctable, if requested */
|
||||
if (orte_output_debugger_proctable) {
|
||||
char *output;
|
||||
opal_dss.print(&output, NULL, jdata->map, ORTE_JOB_MAP);
|
||||
if (orte_xml_output) {
|
||||
fprintf(orte_xml_fp, "%s\n", output);
|
||||
fflush(orte_xml_fp);
|
||||
} else {
|
||||
opal_output(orte_clean_output, "%s", output);
|
||||
}
|
||||
free(output);
|
||||
}
|
||||
|
||||
/* return the favor so that any repetitive comm_spawns track each other */
|
||||
parent->bookmark = jdata->bookmark;
|
||||
}
|
||||
|
@ -80,9 +80,11 @@ bool orte_allocation_required;
|
||||
char *orte_launch_agent = NULL;
|
||||
char **orted_cmd_line=NULL;
|
||||
|
||||
/* debugger flags */
|
||||
orte_job_t *orte_debugger_daemon=NULL;
|
||||
bool orte_enable_debug_cospawn_while_running;
|
||||
int orte_debugger_check_rate;
|
||||
bool orte_output_debugger_proctable=false;
|
||||
|
||||
orte_trigger_event_t orte_exit, orteds_exit;
|
||||
int orte_exit_status = 0;
|
||||
|
@ -554,9 +554,11 @@ ORTE_DECLSPEC extern bool orte_allocation_required;
|
||||
ORTE_DECLSPEC extern char *orte_launch_agent;
|
||||
ORTE_DECLSPEC extern char **orted_cmd_line;
|
||||
|
||||
/* debugger flags */
|
||||
ORTE_DECLSPEC extern orte_job_t *orte_debugger_daemon;
|
||||
ORTE_DECLSPEC extern bool orte_enable_debug_cospawn_while_running;
|
||||
ORTE_DECLSPEC extern int orte_debugger_check_rate;
|
||||
ORTE_DECLSPEC extern bool orte_output_debugger_proctable;
|
||||
|
||||
/* exit triggers and flags */
|
||||
ORTE_DECLSPEC extern orte_trigger_event_t orte_exit;
|
||||
|
@ -135,6 +135,12 @@ int orte_register_params(void)
|
||||
"has attached to a running job and requested cospawn support (default: 2 sec)",
|
||||
false, false, 2, &orte_debugger_check_rate);
|
||||
|
||||
mca_base_param_reg_int_name("orte",
|
||||
"output_debugger_proctable",
|
||||
"Whether or not to output the debugger proctable after launch (default: false)",
|
||||
true, false, 0, &value);
|
||||
orte_output_debugger_proctable = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
mca_base_param_reg_int_name("orte", "do_not_launch",
|
||||
"Perform all necessary operations to prepare to launch the application, but do not actually launch it",
|
||||
false, false, (int)false, &value);
|
||||
|
@ -376,7 +376,10 @@ static opal_cmd_line_init_t cmd_line_init[] = {
|
||||
{ "orte", "base", "user_debugger", '\0', "debugger", "debugger", 1,
|
||||
NULL, OPAL_CMD_LINE_TYPE_STRING,
|
||||
"Sequence of debuggers to search for when \"--debug\" is used" },
|
||||
|
||||
{ "orte", "output", "debugger_proctable", '\0', "output-proctable", "output-proctable", 0,
|
||||
NULL, OPAL_CMD_LINE_TYPE_BOOL,
|
||||
"Output the debugger proctable after launch" },
|
||||
|
||||
/* OpenRTE arguments */
|
||||
{ "orte", "debug", NULL, 'd', "debug-devel", "debug-devel", 0,
|
||||
NULL, OPAL_CMD_LINE_TYPE_BOOL,
|
||||
@ -791,6 +794,19 @@ int orterun(int argc, char *argv[])
|
||||
/* Spawn the job */
|
||||
rc = orte_plm.spawn(jdata);
|
||||
|
||||
/* output debugger proctable, if requested */
|
||||
if (orte_output_debugger_proctable) {
|
||||
char *output;
|
||||
opal_dss.print(&output, NULL, jdata->map, ORTE_JOB_MAP);
|
||||
if (orte_xml_output) {
|
||||
fprintf(orte_xml_fp, "%s\n", output);
|
||||
fflush(orte_xml_fp);
|
||||
} else {
|
||||
opal_output(orte_clean_output, "%s", output);
|
||||
}
|
||||
free(output);
|
||||
}
|
||||
|
||||
/* complete debugger interface */
|
||||
orte_debugger_init_after_spawn(jdata);
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user