Skip to content

Commit b19fdd2

Browse files
Fix safe_thread_num -> papi_safe_thread_num
1 parent 77179d9 commit b19fdd2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/fiat/drhook/drhook_papi.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static int papi_counters_count;
2626
/* function to use for thread id
2727
- it should be better than omp_get_thread_num!
2828
*/
29-
unsigned long safe_thread_num(){
29+
unsigned long papi_safe_thread_num(){
3030
return oml_my_thread()-1;
3131
}
3232

@@ -125,9 +125,9 @@ int drhook_papi_readAll(long_long * counterArray){
125125
printf("DRHOOK:PAPI: Error reading counters, eventset\n");
126126
exit (1);
127127
}
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);
129129
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));
131131
}
132132
#if defined(DEBUG)
133133
drhook_papi_print("readAll:",counterArray,0);
@@ -201,7 +201,7 @@ int drhook_papi_init(int rank){
201201

202202
int nthreads=oml_get_max_threads();
203203

204-
paperr=PAPI_thread_init(safe_thread_num);
204+
paperr=PAPI_thread_init(papi_safe_thread_num);
205205

206206
if( paperr != PAPI_OK ){
207207
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){
233233
}
234234

235235
int dr_hook_papi_start_threads(int* events){
236-
int thread=safe_thread_num();
236+
int thread=papi_safe_thread_num();
237237
int papiErr;
238238
char pmsg[STD_MSG_LEN];
239239

0 commit comments

Comments
 (0)