# Configuration problem -- cudaGetDeviceCount fails Cuda / Linux configuration problem

**URL:** <https://forums.developer.nvidia.com/t/configuration-problem-cudagetdevicecount-fails-cuda-linux-configuration-problem/18709>\
**Category:** CUDA Programming and Performance\
**Created:** [September 9, 2010, 7:54pm UTC](https://forums.developer.nvidia.com/t/configuration-problem-cudagetdevicecount-fails-cuda-linux-configuration-problem/18709 "2010-09-09T19:54:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmccall](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kmccall](https://forums.developer.nvidia.com/u/kmccall)\
**Post date:** [September 9, 2010, 7:54pm UTC](https://forums.developer.nvidia.com/t/configuration-problem-cudagetdevicecount-fails-cuda-linux-configuration-problem/18709/1 "2010-09-09T19:54:02Z")

</div>

I seem to have some sort of Cuda configuration problem. Yesterday, the examples in the SDK worked perfectly, and today, after I logged into our Linux box again, they crash with an error like this:

> deviceQuery  
> deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount FAILED CUDA Driver and Runtime version may be mismatched.

FAILED

I must have some environmental variable that isn’t set properly, or maybe a problem in nvcc.profile…? If you can suggest where to look, that would be appreciated. I am running

x86\_64  
Red Hat Enterprise Linux Client release 5.4 (Tikanga)

Nvidia driver version 256.40

The Cuda toolkit I downloaded was cudatoolkit\_3.1\_linux\_64\_rhel5.4.run

The SDK I downloaded was gpucomputingsdk\_3.1\_linux.run

---

<div class="post-metadata">

**Author:** ![kmccall](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kmccall](https://forums.developer.nvidia.com/u/kmccall)\
**Post date:** [September 9, 2010, 8:44pm UTC](https://forums.developer.nvidia.com/t/configuration-problem-cudagetdevicecount-fails-cuda-linux-configuration-problem/18709/2 "2010-09-09T20:44:04Z")

</div>

I think we figured it out. The Linux installation guide, in the section “Verify the Installation”, says that on multiuser systems, access to NVIDIA devices must be enabled for remote users. So we added RW privileges to all users for every /dev/nv\* device:

crwxrw-rw- 1 root root 195, 0 Sep 2 09:51 /dev/nvidia0  
crwxrw-rw- 1 root root 195, 1 Sep 2 09:51 /dev/nvidia1  
crwxrw-rw- 1 root root 195, 2 Sep 2 09:51 /dev/nvidia2  
crwxrw-rw- 1 root root 195, 3 Sep 2 09:51 /dev/nvidia3  
crwxrw-rw- 1 root root 195, 255 Sep 2 09:51 /dev/nvidiactl  
crwxrw-rw- 1 root root 10, 144 Sep 1 10:40 /dev/nvram

The SDK examples are now working from a remote terminal.

---

<div class="post-metadata">

**Author:** ![kmccall](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kmccall](https://forums.developer.nvidia.com/u/kmccall)\
**Post date:** [September 9, 2010, 8:44pm UTC](https://forums.developer.nvidia.com/t/configuration-problem-cudagetdevicecount-fails-cuda-linux-configuration-problem/18709/3 "2010-09-09T20:44:04Z")

</div>

I think we figured it out. The Linux installation guide, in the section “Verify the Installation”, says that on multiuser systems, access to NVIDIA devices must be enabled for remote users. So we added RW privileges to all users for every /dev/nv\* device:

crwxrw-rw- 1 root root 195, 0 Sep 2 09:51 /dev/nvidia0  
crwxrw-rw- 1 root root 195, 1 Sep 2 09:51 /dev/nvidia1  
crwxrw-rw- 1 root root 195, 2 Sep 2 09:51 /dev/nvidia2  
crwxrw-rw- 1 root root 195, 3 Sep 2 09:51 /dev/nvidia3  
crwxrw-rw- 1 root root 195, 255 Sep 2 09:51 /dev/nvidiactl  
crwxrw-rw- 1 root root 10, 144 Sep 1 10:40 /dev/nvram

The SDK examples are now working from a remote terminal.
