@@ -4040,6 +4040,7 @@ c_drhook_print_(const int *ftnunitno,
4040
4040
)
4041
4041
{
4042
4042
static int first_time = 0 ;
4043
+ static int reported_open_regions = 0 ;
4043
4044
int tid = (thread_id && (* thread_id >= 1 ) && (* thread_id <= numthreads ))
4044
4045
? * thread_id : drhook_oml_get_thread_num ();
4045
4046
int mytid = drhook_oml_get_thread_num ();
@@ -4289,6 +4290,11 @@ c_drhook_print_(const int *ftnunitno,
4289
4290
cycles [t ] += self_cycles ;
4290
4291
}
4291
4292
nprof ++ ;
4293
+ } else if (keyptr -> name && keyptr -> status == 0 && !reported_open_regions ) {
4294
+ fprintf (stderr ,
4295
+ "%s %s [%s@%s:%d] WARNING: Region '%s' was never closed or stopped by a signal. No output will be produced for this region.\n" ,
4296
+ pfx ,TIMESTR (tid ),FFL , keyptr -> name );
4297
+ reported_open_regions = 1 ;
4292
4298
}
4293
4299
keyptr = keyptr -> next ;
4294
4300
} /* while (keyptr && keyptr->status == 0) */
@@ -4611,6 +4617,11 @@ c_drhook_print_(const int *ftnunitno,
4611
4617
tot [t ] += self ;
4612
4618
maxseen_tot [t ] = MAX (maxseen_tot [t ], keyptr -> mem_seenmax );
4613
4619
nprof ++ ;
4620
+ } else if (keyptr -> name && keyptr -> status == 0 && !reported_open_regions ) {
4621
+ fprintf (stderr ,
4622
+ "%s %s [%s@%s:%d] WARNING: Region '%s' was never closed or stopped by a signal. No output will be produced for this region.\n" ,
4623
+ pfx ,TIMESTR (tid ),FFL , keyptr -> name );
4624
+ reported_open_regions = 1 ;
4614
4625
}
4615
4626
keyptr = keyptr -> next ;
4616
4627
} /* while (keyptr && keyptr->status == 0) */
0 commit comments