This is discussed in a number of places. There are certain system files that must be created at each boot cycle to use a GPU. Creation of these files requires root privilege. This reason is mentioned in the linux getting started guide:
“If a CUDA-capable device and the CUDA Driver are installed but deviceQuery reports that no CUDA-capable devices are present, this likely means that the /dev/nvidia* files are missing or have the wrong permissions.”
You can read more about it here, as well as a possible solution:
SO Folks DONT SKIP THIS INPORTANT STEP!!!
It seem’s like others are also having this problem… I will cross post!!
Good Luck…
On the bright side this install (os and cuda) only took a day (85% being opensuse’s)!
This is far better then the cuda 5.5 which had to be done by manually shuting down the
graphics subsystem! That and fedora which trashed my drives took a month to set up!
But I have to say for those who are new… stick with it … It is well worth it!
Cuda will change how you solve computational problems… and for the better!
I think if would be helpful if you could file an enhancement request for the documentation, using the bug reporting form linked from the registered developer website. Please prefix the synopsis with "RFE: " to mark it as a “request for enhancement” rather than a bug.
I now got the same problem after updating my system from SLES12SP1 to SLES12SP2 and subsequently updating the nvidia drivers (now 367.57). Has anyone have a solution?
I am trying to run basic cuda samples included within the cuda directory. But all files are under root access and require sudo with every action. is this the reason I am not able to install tensorflow ?
I have the problem of the original poster. No CUDA examples work (giving the original poster error message) until at least one of them is run with sudo. Only then they will work also without sudo.
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85
nvidia-smi
Sat Jan 13 17:17:45 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.12 Driver Version: 390.12 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1050 Off | 00000000:01:00.0 Off | N/A |
| N/A 45C P8 N/A / N/A | 438MiB / 4042MiB | 7% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1175 G /usr/lib/xorg/Xorg 251MiB |
| 0 2191 G compiz 105MiB |
| 0 22048 G ...-token=66A499926B7F83A4D6350846F6AAE0DB 80MiB |
+-----------------------------------------------------------------------------+
I have installed CUDA with the runfile.
The linked solution was “fairly well-tested on RHEL/CentOS systems, but probably works on other distros with no or minor modifications”. But I have Ubuntu 16.04 LTS. Should I adopt that solution nevertheless to avoid having to start the first CUDA example as sudo?
I don’t know if this is related to this problem or not. If not, please tell me and I will open another thread.