Closed georges-da-costa closed 8 months ago
Thanks for reporting. After testing it successfully on an Intel Cascadelake SP, I looked at the code. There is a break
missing: https://github.com/RRZE-HPC/likwid/blob/master/src/perfmon.c#L1140-L1147 . Please add one, recompile and try again. I cannot test it, I have no Tigerlake system anymore.
Note: You don't need sudo
with the access daemon.
Thanks, it actually seems to be missing but it is not sufficient. I also had to change https://github.com/RRZE-HPC/likwid/blob/49ec7af2e7739b2d59f1ace6433ba6643120e3a8/src/perfmon.c#L2528C1-L2528C60
from
if (((valid_events > fixed_counters) || isPerfGroup) &&
to
if (((valid_events >= fixed_counters) || isPerfGroup) &&
and now it works. I also tested it with multiple events and it still work. I can contribute a patch but I'm not sure if it adds a problem somewhere else. What is your opinion ?
Can you please provide the output with -V 3
again after you just added the break
? I think there is something else not working properly. With a single event, valid_events
should be fixed_counters + 1
, so the original check should work.
I just tried with one and two events (actually the same in two different registers), with only the break and it works only with the second one. I added the following code just before the line 2528:
printf("DEBUG#591 : valid_events:%d, fixed_counters:%d\n", valid_events, fixed_counters);
For the one event version it prints:
DEBUG#591 : valid_events:4, fixed_counters:4
For the two events version it prints:
DEBUG#591 : valid_events:5, fixed_counters:4
You can find the complete version below for both execution:
But with a single event, it should be valid_events=5
. The issue is caused by the fourth available fixed counter being not added for Tigerlake: https://github.com/RRZE-HPC/likwid/blob/master/src/perfgroup.c#L778 . Add it to the condition (cpuid_info.model == TIGERLAKE1 || cpuid_info.model == TIGERLAKE2
) and the valid_events
check should work in its original version.
I try to use perfmon_addEventSet to monitor a single event. As I did not manage to make it work while being able to monitor two or more events, I tried with likwid-perfctr.
Similarly, likwid-perfctr makes an error when used with only one event, while it works well with the same event used along with another one. I suppose it should be able to monitor a single event.
To Reproduce
Neither
sudo likwid-perfctr -g L2_TRANS_DEMAND_DATA_RD:PMC0 sleep 1
norsudo likwid-perfctr -g L2_TRANS_RFO:PMC1 sleep 1
work, whilesudo likwid-perfctr -g L2_TRANS_DEMAND_DATA_RD:PMC0,L2_TRANS_RFO:PMC1 sleep 1
works well. The error is similar in both cases:The version of likwid is the one on Debian-SID
If more information is needed, feel free to ask. Thanks
Full output with -V 3