- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am pretty new on PCM. Basically, I added some CPU counters in my test code and when I try to run my test I got the following output:
Number of physical cores: 8
Number of logical cores: 16
Threads (logical cores) per physical core: 2
Num sockets: 2
Core PMU (perfmon) version: 3
Number of core PMU generic (programmable) counters: 4
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Can not access CPUs Model Specific Registers (MSRs).
Try to execute 'modprobe msr' as root user and then
you also must have read and write permissions for /dev/cpu/*/msr devices (/dev/msr* for Android). The 'chown' command can help.
Segmentation fault (core dumped)
So what I did was:
- Login as root
- Execute the command 'modprobe msr'
- Run chmod -R ugo+rw /dev/cpu/
- I also checked if the msr module was correctly loaded using modprobe -l | grep msr, and the output was lib/modules/3.0.101-0.7.17-
default/kernel/drivers/scsi/ arcmsr/arcmsr.ko
But I am still getting the same error.
Any thoughts about that?
Many thanks,
Mahieddine
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mahieddine,
When you use the base code (without your changes), does the code work properly?
If so, then you probably introduced errors with your changes.
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Patrick,
Actually just find out that pcm shoul run as root. So I just had to do a script to load my user environment while login as root.
Thanks though for the help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using a Docker container (https://www.docker.com/) on our server and I am facing an identical problem. I am root in my container but still I am receiving this message. Is the problem from using the container or there is a way to fix it.
Message:
Can not access CPUs Model Specific Registers (MSRs).
Try to execute 'modprobe msr' as root user and then
you also must have read and write permissions for /dev/cpu/*/msr devices (/dev/msr* for Android). The 'chown' command can help.
Access to Intel(r) Performance Counter Monitor has denied (no MSR or PCI CFG space access).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AFAIK some of MSRs are only accessible from BIOS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mohammadreza,
Is Docker something like a virtual machine? If so, I don't think PCM works in virtual environments because virtual machines usually restrict access to most MSRs.
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Pat,
No, it is not like a virtual machine. In docker each user can has a container which is run by a thread on the main OS. I am no expert in knowing Docker, but I think there are some limitations for each container to keep it safe to invade other users' containers, though, I am not fully sure and that is why I am here!
I have asked this question on Docker forum as well; yet without any reply!
Patrick Fay (Intel) wrote:
Hello Mohammadreza,
Is Docker something like a virtual machine? If so, I don't think PCM works in virtual environments because virtual machines usually restrict access to most MSRs.
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would try running PCM on the same machine without docker. Lets say PCM works in this case.
Then run PCM the exact same way inside docker on the same system. If PCM no longer works then I'd say docker is preventing it from accessing the HW.
Sorry to not be more helpful.
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mohammadreza N. wrote:
Hi,
I am using a Docker container (https://www.docker.com/) on our server and I am facing an identical problem. I am root in my container but still I am receiving this message. Is the problem from using the container or there is a way to fix it.
Message:
Can not access CPUs Model Specific Registers (MSRs).
Try to execute 'modprobe msr' as root user and then
you also must have read and write permissions for /dev/cpu/*/msr devices (/dev/msr* for Android). The 'chown' command can help.
Access to Intel(r) Performance Counter Monitor has denied (no MSR or PCI CFG space access).
It is possible to run PCM in a docker container if you specify --privileged flag like here: https://github.com/opcm/pcm/blob/master/DOCKER_README.md
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page