Skip to content

Commit 1a97555

Browse files
author
Ralph Castain
authored
Merge pull request #5947 from rhc54/topic/mpir
Provide deprecation warning of MPIR debugger
2 parents 049bfb6 + 2cb2717 commit 1a97555

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

orte/orted/help-orted.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# University of Stuttgart. All rights reserved.
1111
# Copyright (c) 2004-2005 The Regents of the University of California.
1212
# All rights reserved.
13-
# Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
13+
# Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
1414
# $COPYRIGHT$
1515
#
1616
# Additional copyrights may follow
@@ -89,3 +89,21 @@ to it - please check the connection info and ensure the server
8989
is alive:
9090

9191
Connection: %s
92+
#
93+
[mpir-debugger-detected]
94+
Open MPI has detected that you have attached a debugger to this MPI
95+
job, and that debugger is using the legacy "MPIR" method of
96+
attachment.
97+
98+
Please note that Open MPI has deprecated the "MPIR" debugger
99+
attachment method in favor of the new "PMIx" debugger attchment
100+
mechanisms.
101+
102+
*** This means that future versions of Open MPI may not support the
103+
*** "MPIR" debugger attachment method at all. Specifically: the
104+
*** debugger you just attached may not work with future versions of
105+
*** Open MPI.
106+
107+
You may wish to contact your debugger vendor to inquire about support
108+
for PMIx-based debugger attachment mechanisms. Meantime, you can
109+
disable this warning by setting the OMPI_MPIR_DO_NOT_WARN envar to 1.

orte/orted/orted_submit.c

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,6 +2258,8 @@ struct MPIR_PROCDESC {
22582258
* spawn we need to check if we are being run under a TotalView-like
22592259
* debugger; if so then inform applications via an MCA parameter.
22602260
*/
2261+
static bool mpir_warning_printed = false;
2262+
22612263
static void orte_debugger_init_before_spawn(orte_job_t *jdata)
22622264
{
22632265
char *env_name;
@@ -2307,6 +2309,15 @@ static void orte_debugger_init_before_spawn(orte_job_t *jdata)
23072309
launchit:
23082310
opal_output_verbose(1, orte_debug_output, "Info: Spawned by a debugger");
23092311

2312+
/* if we haven't previously warned about it */
2313+
if (!mpir_warning_printed) {
2314+
mpir_warning_printed = true;
2315+
/* check for silencing envar */
2316+
if (NULL == getenv("OMPI_MPIR_DO_NOT_WARN")) {
2317+
orte_show_help("help-orted.txt", "mpir-debugger-detected", true);
2318+
}
2319+
}
2320+
23102321
/* tell the procs they are being debugged */
23112322
(void) mca_base_var_env_name ("orte_in_parallel_debugger", &env_name);
23122323

@@ -2520,6 +2531,14 @@ void orte_debugger_init_after_spawn(int fd, short event, void *cbdata)
25202531
if (MPIR_being_debugged || NULL != orte_debugger_test_daemon ||
25212532
NULL != getenv("ORTE_TEST_DEBUGGER_ATTACH")) {
25222533
OBJ_RELEASE(caddy);
2534+
/* if we haven't previously warned about it */
2535+
if (!mpir_warning_printed) {
2536+
mpir_warning_printed = true;
2537+
/* check for silencing envar */
2538+
if (NULL == getenv("OMPI_MPIR_DO_NOT_WARN")) {
2539+
orte_show_help("help-orted.txt", "mpir-debugger-detected", true);
2540+
}
2541+
}
25232542
if (!mpir_breakpoint_fired) {
25242543
/* record that we have triggered the debugger */
25252544
mpir_breakpoint_fired = true;
@@ -2615,6 +2634,15 @@ void orte_debugger_init_after_spawn(int fd, short event, void *cbdata)
26152634
*/
26162635
if (MPIR_being_debugged || NULL != orte_debugger_test_daemon ||
26172636
NULL != getenv("ORTE_TEST_DEBUGGER_ATTACH")) {
2637+
/* if we haven't previously warned about it */
2638+
if (!mpir_warning_printed) {
2639+
mpir_warning_printed = true;
2640+
/* check for silencing envar */
2641+
if (NULL == getenv("OMPI_MPIR_DO_NOT_WARN")) {
2642+
orte_show_help("help-orted.txt", "mpir-debugger-detected", true);
2643+
}
2644+
}
2645+
26182646
/* if we are not launching debugger daemons, then trigger
26192647
* the debugger - otherwise, we need to wait for the debugger
26202648
* daemons to be started
@@ -2923,6 +2951,15 @@ static void attach_debugger(int fd, short event, void *arg)
29232951
"%s Attaching debugger %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
29242952
(NULL == orte_debugger_test_daemon) ? MPIR_executable_path : orte_debugger_test_daemon);
29252953

2954+
/* if we haven't previously warned about it */
2955+
if (!mpir_warning_printed) {
2956+
mpir_warning_printed = true;
2957+
/* check for silencing envar */
2958+
if (NULL == getenv("OMPI_MPIR_DO_NOT_WARN")) {
2959+
orte_show_help("help-orted.txt", "mpir-debugger-detected", true);
2960+
}
2961+
}
2962+
29262963
/* a debugger has attached! All the MPIR_Proctable
29272964
* data is already available, so we only need to
29282965
* check to see if we should spawn any daemons
@@ -3038,6 +3075,15 @@ static void run_debugger(char *basename, opal_cmd_line_t *cmd_line,
30383075
free(env_name);
30393076
}
30403077

3078+
/* if we haven't previously warned about it */
3079+
if (!mpir_warning_printed) {
3080+
mpir_warning_printed = true;
3081+
/* check for silencing envar */
3082+
if (NULL == getenv("OMPI_MPIR_DO_NOT_WARN")) {
3083+
orte_show_help("help-orted.txt", "mpir-debugger-detected", true);
3084+
}
3085+
}
3086+
30413087
/* Launch the debugger */
30423088
execvp(new_argv[0], new_argv);
30433089
value = opal_argv_join(new_argv, ' ');

0 commit comments

Comments
 (0)