Gwinel / likwid

Automatically exported from code.google.com/p/likwid
GNU General Public License v3.0
0 stars 0 forks source link

Likwid can not find correct msr path on Intel Xeon Phi #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi all,

Error:
rdmsr: failed to open '/dev/msr0': Permission denied!
       Please check if the msr module                     is loaded and the device file has correct permissions.
       Alternatively you might want to                     look into (sys)daemonmode.

Before I updated MPSS from 2.3 to 3.1.2, everything is fine. Because the path 
for msr on MIC is /dev/msr*.

But after MPSS updated to 3.1.2, msr path changes to /dev/cpu/*/msr.
Likwid can not work under user space, although I have tried "chmod o+rw 
/dev/cpu/*/msr".

And wired thing is that I can use it under root ...
It seems to mean that it only can find correct path for msr under root.

Hope for your help.
Thanks.

Stephen

Original issue reported on code.google.com by wangyichao0122@gmail.com on 26 Jul 2014 at 7:52

GoogleCodeExporter commented 9 years ago
Hi Stephen,

The path /dev/cpu/*/msr is the standard path for the msr module and is checked 
by LIKWID on host systems. For the Intel MIC we added a existance check to 
determine the right path.
For root users, the default msr code is used, but for user privileges you have 
to use the accessDaemon. The Daemon does not do the check and distinguish 
between host and MIC.
Another problem could be that Intel has introduced capabilities on the MIC, a 
POSIX extention that is really annoying for us because it restricts the access 
to the msr module in the background.

Try to change the line 626 in src/access-daemon/accessDaemon.c to fit the msr 
path on your MIC and recompile. If it does not work then either, you will have 
capabilities problems or your accessDaemon has not the suid-root bit. Some 
words about the last mentioned privilege problems are in the LIKWID blog.

Greetings,
Thomas

Original comment by Thomas.R...@googlemail.com on 29 Jul 2014 at 9:13

GoogleCodeExporter commented 9 years ago
Dear Thomas,

After accessDaemon is chosen in config.mk, Likwid works under user privileges.

Thanks.

BR,
Stephen

Original comment by wangyichao0122@gmail.com on 29 Jul 2014 at 9:55

GoogleCodeExporter commented 9 years ago
I'm glad to read this.

I will close this issue as done. I have added the path check for /dev/msr* and 
/dev/cpu/*/msr to the accessDaemon, so in the future also people with older 
MPSS can use the accessDaemon.

Greetings,
Thomas

Original comment by Thomas.R...@googlemail.com on 29 Jul 2014 at 10:56

GoogleCodeExporter commented 9 years ago
Thanks.  

Original comment by wangyichao0122@gmail.com on 29 Jul 2014 at 11:06