PAPI Usage fails with PAPI_EINVAL for PAPI_TOT_CYC

Open discussion of PAPI.

PAPI Usage fails with PAPI_EINVAL for PAPI_TOT_CYC

Postby grundprinzip » Tue Aug 09, 2011 1:22 am

I have a Intel Xeon 7560 system with a 2.6.38-10-server Ubuntu kernel, with perf_events enabled. I can compile papi totally fine, but all tests fail as listed below:

Papi Avail shows all available events and they look fine (including PAPI_TOT_CYC)

Code: Select all
PAPI Version             :
Vendor string and code   : GenuineIntel (1)
Model string and code    : Intel(R) Xeon(R) CPU           X7560  @ 2.27GHz (46)
CPU Revision             : 6.000000
CPUID Info               : Family: 6  Model: 46  Stepping: 6
CPU Megahertz            : 2264.013916
CPU Clock Megahertz      : 2264
Hdw Threads per core     : 2
Cores per Socket         : 8
NUMA Nodes               : 4
CPU's per Node           : 16
Total CPU's              : 64
Number Hardware Counters : 7
Max Multiplex Counters   : 512

However, if I execute the ctests/zero test program it fails because it cannot start the counters for PAPI_TOT_CYC and PAPI_FP_INS and the output is the following:

Code: Select all
$ ./zero
PAPI_FP_INS is not available.
PAPI_TOT_CYC is not available.
zero.c                                   FAILED
Line # 64
Error in PAPI_start: PAPI_EINVAL

Test case 0: start, stop.
Default domain is: 1 (PAPI_DOM_USER)
Default granularity is: 1 (PAPI_GRN_THR)
Using 20000000 iterations of c += a*b
Test type    :               1
PAPI_FP_INS  :     140486078337560
Real usec    :           188213
Real cycles  :        426153441
Virt usec    :           188090
Virt cycles  :        425838024
Verification: none

There is something wrong, but I canot say where. The following other approaches I tried:

  • Different kernel: In addition to the above mentioned kernel I tried the 2.6.38-8 kernel
  • DIfferent Papi verion: I tried all 4.* Papi versions the error messages are a little bit different, but the problem remains. The message for is: "PAPI Error: sys_perf_event_open returned error on event #0. Unix says, Operation not permitted."

The only hint that something is wrong is the dmesg output:

Code: Select all
$ dmesg | grep Per
[    0.358822] Performance Events: PEBS fmt1+, Nehalem events, Broken BIOS detected, using software events only.

Does anyone has an idea how I can enable Papi?

Thanks a lot

Posts: 2
Joined: Tue Aug 09, 2011 1:11 am

Re: PAPI Usage fails with PAPI_EINVAL for PAPI_TOT_CYC

Postby grundprinzip » Wed Aug 10, 2011 12:17 pm

I'm not sure what was actually wrong, but using the Linux kernel from Ubuntu "oneiric" solved the issue and PAPI is working fine.
Posts: 2
Joined: Tue Aug 09, 2011 1:11 am

Return to General discussion

Who is online

Users browsing this forum: Walterscum and 1 guest