I just upgraded to Ubuntu 16.04 LTS. In my C++ applications I use the PAPI library, so I installed it from http://icl.utk.edu/papi/. However for some reason I can not run my applications anymore without having to type sudo
in the beginning.
我刚刚升级到Ubuntu 16.04 LTS。在我的C ++应用程序中,我使用PAPI库,所以我从http://icl.utk.edu/papi/安装了它。但是由于某种原因,我不能再运行我的应用程序而不必在开始时键入sudo。
Even just typing papi_avail
on the terminal to see which counters are available I get this:
即使只是在终端上键入papi_avail来查看哪些计数器可用,我得到这个:
================================================================================
PAPI Preset Events
================================================================================
Name Code Avail Deriv Description (Note)
PAPI_L1_DCM 0x80000000 No No Level 1 data cache misses
PAPI_L1_ICM 0x80000001 No No Level 1 instruction cache misses
PAPI_L2_DCM 0x80000002 No No Level 2 data cache misses
PAPI_L2_ICM 0x80000003 No No Level 2 instruction cache misses
..........
Of 108 possible events, 0 are available, of which 0 are derived.
avail.c PASSED
If I run sudo papi_avail
I get this:
如果我运行sudo papi_avail我得到这个:
--------------------------------------------------------------------------------
Of 108 possible events, 50 are available, of which 17 are derived.
avail.c PASSED
What changed in Ubuntu 16.04?
在Ubuntu 16.04中有什么变化?
1 个解决方案
#1
0
It is related with the answer here. Theoretically, executing sudo sysctl -w kernel.perf_event_paranoid=0
should be enough.
这与答案有关。从理论上讲,执行sudo sysctl -w kernel.perf_event_paranoid = 0就足够了。
#1
0
It is related with the answer here. Theoretically, executing sudo sysctl -w kernel.perf_event_paranoid=0
should be enough.
这与答案有关。从理论上讲,执行sudo sysctl -w kernel.perf_event_paranoid = 0就足够了。