Page 1 of 1

initializes the PAPI library

PostPosted: Tue May 29, 2012 4:51 pm
by Rabab Mohammad
How are you all?
I need your help
I have problem when I initialized the PAPI library. it causes error when I started to use this function PAPI_library_init. How I can solve this error?
I read about it is because "the event definition file and library are the same version". what dose that mean?
int main()
{
int i, maxthr, retval;
long long elapsed_us, elapsed_cyc;
char errstring[PAPI_MAX_STR_LEN];

retval = PAPI_library_init(PAPI_VER_CURRENT);
if (retval != PAPI_VER_CURRENT){
PAPI_perror(retval,errstring,PAPI_MAX_STR_LEN);
printf("%s:%d::PAPI_library_init failed. %d %s\n",
__FILE__,__LINE__,retval,errstring);
exit(1);
}

}
Thank you

Re: initializes the PAPI library

PostPosted: Sun Jun 03, 2012 5:20 pm
by Rabab Mohammad
any help :(