likwid

likwid-perfctr doesn't work on ryzen 5 3600


I'm trying to use likwid (I've used before, but the system was set by a professor, so I had never installed it. I followed every step listed for the installation) on my Ryzen 5 3600 and it only works partially. Some commands such as likwid-topology work without problem, but when i try to use likwid-perfctr it says that zen 2 is not supported, which doesn't make sense, as it lists Zen2 on the github repository. The error message is as shown below

user@Ryzen3600:~$ sudo likwid-perfctr -C 1 -g L3 ./main
--------------------------------------------------------------------------------
CPU name:   AMD Ryzen 5 3600 6-Core Processor              
CPU type:   nil
CPU clock:  4.22 GHz
ERROR - [./src/perfmon.c:perfmon_init_maps:1174] Unsupported AMD Zen Processor
Segmentation fault

I'm using sudo because otherwise it says I cannot access msr modules.

user@Ryzen3600:~$ likwid-perfctr -C 1 -g L3 ./main
--------------------------------------------------------------------------------
CPU name:   AMD Ryzen 5 3600 6-Core Processor              
CPU type:   nil
CPU clock:  4.22 GHz
ERROR - [./src/perfmon.c:perfmon_init_maps:1174] Unsupported AMD Zen Processor
ERROR - [./src/access_x86_msr.c:access_x86_msr_init:193] Permission denied.
Cannot access MSR device file /dev/cpu/1/msr: Permission denied.
ERROR - [./src/access_x86_msr.c:access_x86_msr_init:194] Please check if 'msr' module is loaded and device files have correct permissions
ERROR - [./src/access_x86_msr.c:access_x86_msr_init:195] Alternatively you might want to look into (sys)daemonmode
ERROR - [./src/perfmon.c:perfmon_init:1752] Cannot get access to performance counters

Has anybody experienced this sort of problem?


Solution

  • I had the same problem with a Ryzen 9 3900X. The LIKWID devs didn't have a Zen2 processor for testing, so they needed the processor info from a user and produced a patch, see details here:

    https://github.com/RRZE-HPC/likwid/issues/289