Skip to content

Commit 21d2597

Browse files
authored
Merge pull request #5974 from rhc54/cmr4/mpir
v4.0: Provide deprecation warning of MPIR debugger
2 parents d0968f5 + 8aae794 commit 21d2597

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
@@ -2257,6 +2257,8 @@ struct MPIR_PROCDESC {
22572257
* spawn we need to check if we are being run under a TotalView-like
22582258
* debugger; if so then inform applications via an MCA parameter.
22592259
*/
2260+
static bool mpir_warning_printed = false;
2261+
22602262
static void orte_debugger_init_before_spawn(orte_job_t *jdata)
22612263
{
22622264
char *env_name;
@@ -2305,6 +2307,15 @@ static void orte_debugger_init_before_spawn(orte_job_t *jdata)
23052307
launchit:
23062308
opal_output_verbose(1, orte_debug_output, "Info: Spawned by a debugger");
23072309

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

@@ -2518,6 +2529,14 @@ void orte_debugger_init_after_spawn(int fd, short event, void *cbdata)
25182529
if (MPIR_being_debugged || NULL != orte_debugger_test_daemon ||
25192530
NULL != getenv("ORTE_TEST_DEBUGGER_ATTACH")) {
25202531
OBJ_RELEASE(caddy);
2532+
/* if we haven't previously warned about it */
2533+
if (!mpir_warning_printed) {
2534+
mpir_warning_printed = true;
2535+
/* check for silencing envar */
2536+
if (NULL == getenv("OMPI_MPIR_DO_NOT_WARN")) {
2537+
orte_show_help("help-orted.txt", "mpir-debugger-detected", true);
2538+
}
2539+
}
25212540
if (!mpir_breakpoint_fired) {
25222541
/* record that we have triggered the debugger */
25232542
mpir_breakpoint_fired = true;
@@ -2613,6 +2632,15 @@ void orte_debugger_init_after_spawn(int fd, short event, void *cbdata)
26132632
*/
26142633
if (MPIR_being_debugged || NULL != orte_debugger_test_daemon ||
26152634
NULL != getenv("ORTE_TEST_DEBUGGER_ATTACH")) {
2635+
/* if we haven't previously warned about it */
2636+
if (!mpir_warning_printed) {
2637+
mpir_warning_printed = true;
2638+
/* check for silencing envar */
2639+
if (NULL == getenv("OMPI_MPIR_DO_NOT_WARN")) {
2640+
orte_show_help("help-orted.txt", "mpir-debugger-detected", true);
2641+
}
2642+
}
2643+
26162644
/* if we are not launching debugger daemons, then trigger
26172645
* the debugger - otherwise, we need to wait for the debugger
26182646
* daemons to be started
@@ -2921,6 +2949,15 @@ static void attach_debugger(int fd, short event, void *arg)
29212949
"%s Attaching debugger %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
29222950
(NULL == orte_debugger_test_daemon) ? MPIR_executable_path : orte_debugger_test_daemon);
29232951

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

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

0 commit comments

Comments
 (0)