How Non-Root User acces NVIDIA driver files

Greetings to all,

Today i came across a strange problem about non-root users in Linux ( CentOS ).

I am able to compile & run a Java Program through below commands properly :

[root@cuda1 hadoop-0.20.2]# javac
[root@cuda1 hadoop-0.20.2]# java EnumDevices
Total number of devices: 1
Name: Tesla C1060
Version: 1.3
Clock rate: 1296000 MHz
Threads per block: 512

But I need to run it through other user hadoop in CentOS

[hadoop@ws37-mah-lin hadoop-0.20.2]$ javac
[hadoop@ws37-mah-lin hadoop-0.20.2]$ java EnumDevices
NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).
Exception in thread “main” CUDA Driver error: 100
at jcuda.CUDA.setError(
at jcuda.CUDA.init(
at jcuda.CUDA.(
at EnumDevices.main(
[hadoop@ws37-mah-lin hadoop-0.20.2]$

Actually I need to run a map-reduce code but first if it runs through simple then I will go for it.

I think the problem is that hadoop user would not able to run NVIDIA driver files .

Please guide me how to solve this issue as CLASSPATH is same through all users.

Thanks & best Regards,
Adarsh Sharma


I’m not a Linux expert, and even less for the possible access right problems… A websearch for „CUDA Driver error: 100“ shows only very few results (including 4 threads in different forums that you opened :wink: I think in this case, such a cross-posting is OK, because the question is so „interdisciplinary“ (related to CUDA, JCuda, Linux, Hadoop…) that chances are quite low to get a helpful answer in only one forum…). In the thread that you opened here it seems that the initial issue is resolved (?) but there still is an error message which contains…
Caused by: java.lang.UnsatisfiedLinkError: no jcuda in java.library.path

In the other thread about JCuda and Hadoop this could be resolved by an appropriate setting of the java.library.path, as described here. The path should point to the directory containing the native JCuda libraries. Maybe that helps.