Greetings,
I'm having some issues obtaining energy counter data on the AMD Zen3 platform. I see there is a thread on this subject dated Oct 2023 already which provides some useful information but doesn't seem to finish the story.
Starting at the end of that thread, on my system, the following command works and produces what appears to be meaningful data:
% perf stat -e power/event=0x02/ ./a.out
Performance counter stats for 'system wide':
127,301,255,168 power/event=0x02/
But when I run with LIKWID (5.2.2), the resulting counter data appears to be 0:
% likwid-perfctr -m -g RAPL_PKG_ENERGY:PWR1 -C N:0-0 .a.out
--------------------------------------------------------------------------------
CPU name: AMD EPYC 7763 64-Core Processor
CPU type: AMD K19 (Zen3) architecture
CPU clock: 2.45 GHz
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Region foo, Group 1: Custom
+-------------------+------------+
| Region Info | HWThread 0 |
+-------------------+------------+
| RDTSC Runtime [s] | 0.042600 |
| call count | 1 |
+-------------------+------------+
+---------------------+---------+--------------+
| Event | Counter | HWThread 0 |
+---------------------+---------+--------------+
| Runtime (RDTSC) [s] | TSC | 4.259985e-02 |
| RAPL_PKG_ENERGY | PWR1 | 0 |
+---------------------+---------+--------------+
Additional info:
On this system,
cat /proc/sys/kernel/perf_event_paranoid: 0
cat /sys/devices/power/events/energy-pkg.scale: 2.3283064365386962890625e-10
/sys/devices/power/events/energy-pkg.unit: Joules
From that earlier email thread, I see the comment about "So this means, the configuration of this event works (eg RAPL_PKG_ENERGY:PWR1). Why it does not count is out-of-scope of LIKWID. In perf_event mode, it relies on perf_event providing reasonable data".
I'm hoping there may now be more information/insight than there was a year ago.
The system in use is perlmutter at NERSC which means I have very limited options for doing an install of 5.3.0 or making other system tweaks.
Thanks,
wes