@@ -896,6 +896,20 @@ int orte_submit_job(char *argv[], int *index,
896
896
}
897
897
}
898
898
899
+ /* check for debugger test envars and forward them if necessary */
900
+ if (NULL != getenv ("ORTE_TEST_DEBUGGER_ATTACH" )) {
901
+ char * evar ;
902
+ evar = getenv ("ORTE_TEST_DEBUGGER_SLEEP" );
903
+ for (i = 0 ; i < (int )jdata -> num_apps ; i ++ ) {
904
+ if (NULL != (app = (orte_app_context_t * )opal_pointer_array_get_item (jdata -> apps , i ))) {
905
+ opal_setenv ("ORTE_TEST_DEBUGGER_ATTACH" , "1" , true, & app -> env );
906
+ if (NULL != evar ) {
907
+ opal_setenv ("ORTE_TEST_DEBUGGER_SLEEP" , evar , true, & app -> env );
908
+ }
909
+ }
910
+ }
911
+ }
912
+
899
913
/* check for suicide test directives */
900
914
if (NULL != getenv ("ORTE_TEST_HNP_SUICIDE" ) ||
901
915
NULL != getenv ("ORTE_TEST_ORTED_SUICIDE" )) {
@@ -2149,8 +2163,9 @@ static void orte_debugger_init_before_spawn(orte_job_t *jdata)
2149
2163
*/
2150
2164
if (NULL != orte_debugger_test_daemon && !orte_debugger_test_attach ) {
2151
2165
opal_output_verbose (2 , orte_debug_output ,
2152
- "%s No debugger test daemon specified" ,
2153
- ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ));
2166
+ "%s Debugger test daemon specified: %s" ,
2167
+ ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ),
2168
+ orte_debugger_test_daemon );
2154
2169
goto launchit ;
2155
2170
}
2156
2171
/* if we were given an auto-detect rate, then we want to setup
@@ -2362,6 +2377,8 @@ static void setup_debugger_job(void)
2362
2377
proc = OBJ_NEW (orte_proc_t );
2363
2378
proc -> name .jobid = debugger -> jobid ;
2364
2379
proc -> name .vpid = vpid ++ ;
2380
+ /* point the proc at the local ORTE daemon as its parent */
2381
+ proc -> parent = node -> daemon -> name .vpid ;
2365
2382
/* set the local/node ranks - we don't actually care
2366
2383
* what these are, but the odls needs them
2367
2384
*/
@@ -2741,7 +2758,7 @@ static int process(char *orig_line, char *basename, opal_cmd_line_t *cmd_line,
2741
2758
static void open_fifo (void )
2742
2759
{
2743
2760
if (orte_debugger_attach_fd > 0 ) {
2744
- close (orte_debugger_attach_fd );
2761
+ close (orte_debugger_attach_fd );
2745
2762
}
2746
2763
2747
2764
orte_debugger_attach_fd = open (MPIR_attach_fifo , O_RDONLY | O_NONBLOCK , 0 );
@@ -2760,10 +2777,16 @@ static void open_fifo(void)
2760
2777
return ;
2761
2778
}
2762
2779
2763
- opal_output_verbose (2 , orte_debug_output ,
2764
- "%s Monitoring debugger attach fifo %s" ,
2765
- ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ),
2766
- MPIR_attach_fifo );
2780
+ if (orte_debugger_test_attach ) {
2781
+ opal_output (0 , "%s Monitoring debugger attach fifo %s" ,
2782
+ ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ),
2783
+ MPIR_attach_fifo );
2784
+ } else {
2785
+ opal_output_verbose (2 , orte_debug_output ,
2786
+ "%s Monitoring debugger attach fifo %s" ,
2787
+ ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ),
2788
+ MPIR_attach_fifo );
2789
+ }
2767
2790
orte_debugger_attach = (opal_event_t * )malloc (sizeof (opal_event_t ));
2768
2791
opal_event_set (orte_event_base , orte_debugger_attach , orte_debugger_attach_fd ,
2769
2792
OPAL_EV_READ , attach_debugger , orte_debugger_attach );
@@ -3232,4 +3255,3 @@ void orte_profile_wakeup(int sd, short args, void *cbdata)
3232
3255
/* abort the job */
3233
3256
ORTE_ACTIVATE_JOB_STATE (NULL , ORTE_JOB_STATE_ALL_JOBS_COMPLETE );
3234
3257
}
3235
-
0 commit comments