Skip to content

Commit d4071fb

Browse files
author
Ralph Castain
committed
Fix dynamic operations by ensuring that we only fire the debugger release if the debugger is attached, and that the OPAL pmix key for directing events to non-default handlers matches the PMIx spelling
1 parent 06930a0 commit d4071fb

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

opal/mca/pmix/ext20/pmix_ext20.c

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,7 @@ static void tscon(pmix20_threadshift_t *p)
11831183
p->event_codes = NULL;
11841184
p->info = NULL;
11851185
p->evhandler = NULL;
1186+
p-<nondefault = false;
11861187
p->cbfunc = NULL;
11871188
p->opcbfunc = NULL;
11881189
p->cbdata = NULL;

opal/mca/pmix/pmix2x/pmix2x.c

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,7 @@ static void tscon(pmix2x_threadshift_t *p)
12391239
p->event_codes = NULL;
12401240
p->info = NULL;
12411241
p->evhandler = NULL;
1242+
p->nondefault = false;
12421243
p->cbfunc = NULL;
12431244
p->opcbfunc = NULL;
12441245
p->cbdata = NULL;

opal/mca/pmix/pmix_types.h

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ BEGIN_C_DECLS
4141
* these keys are RESERVED */
4242
#define OPAL_PMIX_ATTR_UNDEF NULL
4343

44-
#define OPAL_PMIX_SERVER_TOOL_SUPPORT "pmix.srvr.tool" // (bool) The host RM wants to declare itself as willing to
44+
#define OPAL_PMIX_SERVER_TOOL_SUPPORT "pmix.srvr.tool" // (bool) The host RM wants to declare itself as willing to
4545
// accept tool connection requests
46-
#define OPAL_PMIX_SERVER_PIDINFO "pmix.srvr.pidinfo" // (uint32_t) pid of the target server
46+
#define OPAL_PMIX_SERVER_PIDINFO "pmix.srvr.pidinfo" // (uint32_t) pid of the target server
4747

4848

4949
/* identification attributes */
@@ -145,7 +145,7 @@ BEGIN_C_DECLS
145145
#define OPAL_PMIX_EVENT_CUSTOM_RANGE "pmix.evrange" // (pmix_proc_t*) array of pmix_proc_t defining range of event notification
146146
#define OPAL_PMIX_EVENT_AFFECTED_PROC "pmix.evproc" // (pmix_proc_t) single proc that was affected
147147
#define OPAL_PMIX_EVENT_AFFECTED_PROCS "pmix.evaffected" // (pmix_proc_t*) array of pmix_proc_t defining affected procs
148-
#define OPAL_PMIX_EVENT_NON_DEFAULT "opal.evnondef" // (bool) event is not to be delivered to default event handlers
148+
#define OPAL_PMIX_EVENT_NON_DEFAULT "pmix.evnondef" // (bool) event is not to be delivered to default event handlers
149149
/* fault tolerance-related events */
150150
#define OPAL_PMIX_EVENT_TERMINATE_SESSION "pmix.evterm.sess" // (bool) RM intends to terminate session
151151
#define OPAL_PMIX_EVENT_TERMINATE_JOB "pmix.evterm.job" // (bool) RM intends to terminate this job

orte/orted/orted_submit.c

100644100755
Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2367,23 +2367,28 @@ void orte_debugger_init_after_spawn(int fd, short event, void *cbdata)
23672367
* message by checking here
23682368
*/
23692369
if (MPIR_proctable || 0 == jdata->num_procs) {
2370+
23702371
/* already initialized */
23712372
opal_output_verbose(5, orte_debug_output,
23722373
"%s: debugger already initialized or zero procs",
23732374
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
2374-
OBJ_RELEASE(caddy);
2375-
if (!mpir_breakpoint_fired) {
2376-
/* record that we have triggered the debugger */
2377-
mpir_breakpoint_fired = true;
2378-
2379-
/* trigger the debugger */
2380-
MPIR_Breakpoint();
23812375

2382-
opal_output_verbose(5, orte_debug_output,
2383-
"%s NOTIFYING DEBUGGER RELEASE",
2384-
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
2385-
/* notify all procs that the debugger is ready */
2386-
_send_notification();
2376+
if (MPIR_being_debugged || NULL != orte_debugger_test_daemon ||
2377+
NULL != getenv("ORTE_TEST_DEBUGGER_ATTACH")) {
2378+
OBJ_RELEASE(caddy);
2379+
if (!mpir_breakpoint_fired) {
2380+
/* record that we have triggered the debugger */
2381+
mpir_breakpoint_fired = true;
2382+
2383+
/* trigger the debugger */
2384+
MPIR_Breakpoint();
2385+
2386+
opal_output_verbose(5, orte_debug_output,
2387+
"%s NOTIFYING DEBUGGER RELEASE",
2388+
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
2389+
/* notify all procs that the debugger is ready */
2390+
_send_notification();
2391+
}
23872392
}
23882393
return;
23892394
}

0 commit comments

Comments
 (0)