Error using PAPI_thread_init with OpenMP

Open discussion of PAPI.

Error using PAPI_thread_init with OpenMP

Postby abhishek » Wed Feb 24, 2010 11:04 pm

Hi

I am getting following error when I am trying to use PAPI with OpenMP.

1540-0256 (S) A parameter of type "extern "C" unsigned long (*)()" cannot be initialized with an expression of type "extern "C" int ()".

My code looks like this

int main(int argc, char *argv[]) {
int eventlist[] = {
PAPI_L1_DCM,
PAPI_L1_DCA
};

int NUM_EVENTS = sizeof(eventlist)/sizeof(int);
long_long values[NUM_EVENTS];

if(PAPI_library_init(PAPI_VER_CURRENT)!=PAPI_VER_CURRENT) {
cout<<"error initializing PAPI"<<endl;
exit(0);
}

if(PAPI_thread_init(omp_get_thread_num) != PAPI_OK) {
cout<<"error initializing PAPI"<<endl;
exit(0);
return 0;
}

What can be the possible reason for this error?

Thanks
Abhishek
abhishek
 
Posts: 1
Joined: Wed Feb 24, 2010 11:00 pm

Return to General discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron