Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
This repository was archived by the owner on Oct 29, 2025. It is now read-only.

No counters available despite papi_avail showing them #45

@cristobal-ortega

Description

@cristobal-ortega

papi_high.num_counters() reports 0 counters while papi_avail shows plenty of them:

$ papi_avail 
Available PAPI preset and user defined events plus hardware information.
--------------------------------------------------------------------------------
PAPI version             : 7.1.0.0
Operating system         : Linux 5.15.0-91-generic
Vendor string and code   : GenuineIntel (1, 0x1)
Model string and code    : Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (165, 0xa5)
CPU revision             : 2.000000
CPUID                    : Family/Model/Stepping 6/165/2, 0x06/0xa5/0x02
CPU Max MHz              : 5000
CPU Min MHz              : 800
Total cores              : 12
SMT threads per core     : 2
Cores per socket         : 6
Sockets                  : 1
Cores per NUMA region    : 12
NUMA regions             : 1
Running in a VM          : no
Number Hardware Counters : 11
Max Multiplex Counters   : 384
Fast counter read (rdpmc): yes
--------------------------------------------------------------------------------

================================================================================
  PAPI Preset Events
================================================================================
    Name        Code    Avail Deriv Description (Note)
PAPI_L1_DCM  0x80000000  Yes   No   Level 1 data cache misses
PAPI_L1_ICM  0x80000001  Yes   No   Level 1 instruction cache misses
...
PAPI_TOT_CYC 0x8000003b  Yes   No   Total cycles
...
Of 108 possible events, 59 are available, of which 18 are derived.

When trying to start a counter through the high level interface or add it through the low level interface I get the following error:

    papi_low.add_event(group1, PAPI_TOT_CYC)
NameError: name 'PAPI_TOT_CYC' is not defined

libpfm is here: /usr/lib/libpfm.so

Note that I installed PAPI through the source code and not from the repo.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions