我正在尝试使用 PAPI 检查大学作业的处理器事件,但使用时没有显示任何 PAPI 预设事件
papi_avail -a
在我安装了 libopenmpi-dev、papi-tools 和 PAPI 7.1.0 后,
papi_avail -a
的输出是:
Available PAPI preset and user defined events plus hardware information.
--------------------------------------------------------------------------------
PAPI version : 7.1.0.0
Operating system : Linux 6.5.0-17-generic
Vendor string and code : GenuineIntel (1, 0x1)
Model string and code : 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (140, 0x8c)
CPU revision : 1.000000
CPUID : Family/Model/Stepping 6/140/1, 0x06/0x8c/0x01
CPU Max MHz : 4700
CPU Min MHz : 400
Total cores : 8
SMT threads per core : 2
Cores per socket : 4
Sockets : 1
Cores per NUMA region : 8
NUMA regions : 1
Running in a VM : no
Number Hardware Counters : 19
Max Multiplex Counters : 384
Fast counter read (rdpmc): no
--------------------------------------------------------------------------------
================================================================================
PAPI Preset Events
================================================================================
Name Code Deriv Description (Note)
--------------------------------------------------------------------------------
Of 0 available events, 0 are derived.
No events detected! Check papi_component_avail to find out why.
在此之后我使用了
papi_component_avail
,输出是:
Compiled-in components:
Name: perf_event Linux perf_event CPU counters
Name: perf_event_uncore Linux perf_event CPU uncore and northbridge
\-> Disabled: No uncore PMUs or events found
Name: sysdetect System info detection component
Active components:
Name: perf_event Linux perf_event CPU counters
Native: 165, Preset: 0, Counters: 19
PMUs supported: ix86arch, perf, perf_raw, icl
Name: sysdetect System info detection component
Native: 0, Preset: 0, Counters: 0
那么我需要做什么才能让 papi 检测到处理器事件呢? 感谢您的帮助!
你尝试过吗
papi_native_avail
?这应该显示 165 个不同的本机事件。 papi_avail
仅显示预设事件(可能是原生事件或源自原生事件)。
您的 PAPI 版本似乎在系统上配置了 0 个预设事件。但是,您可以根据本机事件计算性能指标(例如 FLOP 或 L1/L2/L3 数据缓存未命中)。