@@ -26,7 +26,7 @@ static int papi_counters_count;
26
26
/* function to use for thread id
27
27
- it should be better than omp_get_thread_num!
28
28
*/
29
- unsigned long safe_thread_num (){
29
+ unsigned long papi_safe_thread_num (){
30
30
return oml_my_thread ()- 1 ;
31
31
}
32
32
@@ -125,9 +125,9 @@ int drhook_papi_readAll(long_long * counterArray){
125
125
printf ("DRHOOK:PAPI: Error reading counters, eventset\n" );
126
126
exit (1 );
127
127
}
128
- int err = PAPI_read (drhook_papi_event_set [safe_thread_num ()],counterArray );
128
+ int err = PAPI_read (drhook_papi_event_set [papi_safe_thread_num ()],counterArray );
129
129
if (err != PAPI_OK ){
130
- printf ("DRHOOK:PAPI:PAPI_read: Error reading counters, thread=%ld es=%d %s\n" ,safe_thread_num (),drhook_papi_event_set [safe_thread_num ()],PAPI_strerror (err ));
130
+ printf ("DRHOOK:PAPI:PAPI_read: Error reading counters, thread=%ld es=%d %s\n" ,papi_safe_thread_num (),drhook_papi_event_set [papi_safe_thread_num ()],PAPI_strerror (err ));
131
131
}
132
132
#if defined(DEBUG )
133
133
drhook_papi_print ("readAll:" ,counterArray ,0 );
@@ -201,7 +201,7 @@ int drhook_papi_init(int rank){
201
201
202
202
int nthreads = oml_get_max_threads ();
203
203
204
- paperr = PAPI_thread_init (safe_thread_num );
204
+ paperr = PAPI_thread_init (papi_safe_thread_num );
205
205
206
206
if ( paperr != PAPI_OK ){
207
207
snprintf (pmsg ,STD_MSG_LEN ,"DRHOOK:PAPI: Error, thread init failed (%s)" ,PAPI_strerror (paperr ));
@@ -233,7 +233,7 @@ int drhook_papi_init(int rank){
233
233
}
234
234
235
235
int dr_hook_papi_start_threads (int * events ){
236
- int thread = safe_thread_num ();
236
+ int thread = papi_safe_thread_num ();
237
237
int papiErr ;
238
238
char pmsg [STD_MSG_LEN ];
239
239
0 commit comments