Problem with this command

155 views
Skip to first unread message

techsun

unread,
Mar 15, 2020, 6:38:18 AM3/15/20
to likwid-users
I'm unable to run this command
$likwid-perfctr  -C S0:1  -g BRANCH  ./a.out
output :
CPU name:	Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
CPU type:	Intel Coffeelake processor
CPU clock:	2.21 GHz
ERROR - [./src/includes/perfmon_skylake.h:perfmon_init_skylake:72] No such file or directory.
Cannot zero 0x3F1 (0x3F1)
ERROR - [./src/includes/perfmon_skylake.h:perfmon_init_skylake:77] No such file or directory.
Cannot zero 0x3F7 (0x3F7)
ERROR: No event in given event string can be configured.
       Either the events or counters do not exist for the
       current architecture. If event options are set, they might
       be invalid.

Thomas Gruber

unread,
Mar 16, 2020, 8:34:26 AM3/16/20
to likwid-users
Can you please send the output of:

$ likwid-perfctr -C S0:1 -g BRANCH -V 3 ./a.out

Best regards,
Thomas

techsun

unread,
Mar 17, 2020, 5:58:45 AM3/17/20
to likwid-users
$ likwid-perfctr -C S0:1 -g BRANCH -V 3 ./a.out

output :
--------------------------------------------------------------------------------
CPU name: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
CPU type: Intel Coffeelake processor
CPU clock: 2.21 GHz
CPU family: 6
CPU model: 158
CPU short: skylake
CPU stepping: 10
CPU features: FP ACPI MMX SSE SSE2 HTT TM RDTSCP MONITOR VMX EIST TM2 SSSE FMA SSE4.1 SSE4.2 AES AVX RDRAND AVX2 RDSEED SSE3 
CPU arch: x86_64
--------------------------------------------------------------------------------
PERFMON version: 4
PERFMON number of counters: 4
PERFMON width of counters: 48
PERFMON number of fixed counters: 3
--------------------------------------------------------------------------------
[likwid-pin] Main PID -> core 1 - OK
DEBUG - [HPMinit:98] Adjusting functions for x86 architecture in daemon mode
DEBUG - [access_client_startDaemon:136] Starting daemon /usr/local/sbin/likwid-accessD
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:184] Still waiting for socket /tmp/likwid-25745 for CPU 1...
DEBUG - [access_client_startDaemon:196] Successfully opened socket /tmp/likwid-25745 to daemon for CPU 1
DEBUG - [HPMaddThread:143] Adding CPU 1 to access module
DEBUG - [access_client_read:331] Got error 'failed to read/write register' from access daemon reading reg 0x63B at CPU 1
DEBUG - [power_init:401] Deactivating perf register for RAPL domain PP0
DEBUG - [access_client_read:331] Got error 'failed to read/write register' from access daemon reading reg 0x61C at CPU 1
DEBUG - [power_init:375] Deactivating info register for RAPL domain DRAM
DEBUG - [access_client_write:421] Got error 'failed to read/write register' from access daemon writing reg 0x3F1 at CPU 1
ERROR - [./src/includes/perfmon_skylake.h:perfmon_init_skylake:72] No such file or directory.
Cannot zero 0x3F1 (0x3F1)
DEBUG - [access_client_write:421] Got error 'failed to read/write register' from access daemon writing reg 0x3F7 at CPU 1
ERROR - [./src/includes/perfmon_skylake.h:perfmon_init_skylake:77] No such file or directory.
Cannot zero 0x3F7 (0x3F7)
Executing: ./a.out
DEBUG - [perfmon_addEventSet:1944] Currently 1 groups of 2 active
DEBUG - [perfgroup_readGroup:852] Reading group BRANCH from /usr/local/share/likwid/perfgroups/skylake/BRANCH.txt
DEBUG - [access_client_write:421] Got error 'failed to read/write register' from access daemon writing reg 0x38D at CPU 1
DEBUG - [checkAccess:267] Counter FIXC0 not writeable on this machine
DEBUG - [perfmon_addEventSet:2052] Cannot access counter register FIXC0
DEBUG - [access_client_write:421] Got error 'failed to read/write register' from access daemon writing reg 0x38D at CPU 1
DEBUG - [checkAccess:267] Counter FIXC1 not writeable on this machine
DEBUG - [perfmon_addEventSet:2052] Cannot access counter register FIXC1
DEBUG - [access_client_write:421] Got error 'failed to read/write register' from access daemon writing reg 0x38D at CPU 1
DEBUG - [checkAccess:267] Counter FIXC2 not writeable on this machine
DEBUG - [perfmon_addEventSet:2052] Cannot access counter register FIXC2
DEBUG - [access_client_write:421] Got error 'failed to read/write register' from access daemon writing reg 0x186 at CPU 1
DEBUG - [checkAccess:267] Counter PMC0 not writeable on this machine
DEBUG - [perfmon_addEventSet:2052] Cannot access counter register PMC0
DEBUG - [access_client_write:421] Got error 'failed to read/write register' from access daemon writing reg 0x187 at CPU 1
DEBUG - [checkAccess:267] Counter PMC1 not writeable on this machine
DEBUG - [perfmon_addEventSet:2052] Cannot access counter register PMC1
ERROR: No event in given event string can be configured.
       Either the events or counters do not exist for the
       current architecture. If event options are set, they might
       be invalid.
DEBUG - [HPMfinalize:170] Removing CPU 1 from access module

Thomas Gruber

unread,
Mar 17, 2020, 6:16:24 AM3/17/20
to likwid-users
Hi,

Your system does not allow accesses to the hardware registers. My guess would be that your system is booted in "Secure Mode". You have to turn it off in the BIOS.

Another option would be the perf_event backend because it uses a different access mechanism. (ACCESSMODE=perf_event in config.mk, make distclean, make, make install). Maybe you have to adjust the setting in /proc/sys/kernel/perf_event_paranoid to 0 (echo 0 | sudo tee /proc/sys/kernel/perf_event_paranoid).

Best,
Thomas

techsun

unread,
Mar 17, 2020, 11:19:28 AM3/17/20
to likwid-users
Thank you so much!!!! 

Thomas Gruber

unread,
Mar 18, 2020, 7:08:55 AM3/18/20
to likwid-users
Hi,

glad to read that it works now. Which method have you chosen? Deactivate Secure Boot or use the perf_event backend?

Best,
Thomas

Sunil Singh

unread,
Mar 18, 2020, 7:15:08 AM3/18/20
to likwid...@googlegroups.com
Perf_event.

Thanks once again. 

--

---
You received this message because you are subscribed to the Google Groups "likwid-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to likwid-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/likwid-users/adfddbe2-795d-4361-922c-0a16717ef1b7%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages