I am trying to run some Theano script using THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python gpu_test.py
, I get the following error message:
WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available
(error: Unable to get the number of gpus available: no CUDA-capable device is detected)
I run Kubuntu 15.10 x64 with a Nvidia GTX 690.
CUDA seems to be correctly installed:
f@f-Aurora-R4:~/theano$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2014 NVIDIA Corporation
Built on Thu_Jul_17_21:41:27_CDT_2014
Cuda compilation tools, release 6.5, V6.5.12
f@f-Aurora-R4:~/theano$ nvidia-smi
Sat Nov 14 21:18:51 2015
+------------------------------------------------------+
| NVIDIA-SMI 4.304... Driver Version: 304.128 |
|-------------------------------+----------------------+----------------------+
| GPU Name | Bus-Id Disp. | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 690 | 0000:04:00.0 N/A | N/A |
| 30% 33C N/A N/A / N/A | 0% 8MB / 2047MB | N/A Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX 690 | 0000:05:00.0 N/A | N/A |
| 30% 36C N/A N/A / N/A | 12% 237MB / 2047MB | N/A Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Compute processes: GPU Memory |
| GPU PID Process name Usage |
|=============================================================================|
| 0 Not Supported |
| 1 Not Supported |
+-----------------------------------------------------------------------------+
I used the instructions from the official guide Easy Installation of an Optimized Theano on Current Ubuntu, on a fresh installation of Kubuntu, namely:
# Python requirements
sudo apt-get -y install python-numpy python-scipy python-dev python-pip
sudo apt-get -y install python-nose g++ libopenblas-dev git
# Install Theano:
sudo pip install Theano
# Add GPU requirements
sudo apt-get install nvidia-current
sudo apt-get install nvidia-cuda-toolkit
sudo apt-get install cuda
Then I created a .theanorc
file in that contains in my home folder (namely /home/f/.theanorc
):
[cuda]
root = /usr/lib/nvidia-cuda-toolkit
and I rebooted.
Did I miss something?
I tried the following commands but get the same error:
# Tried specifying the GPU:
THEANO_FLAGS=mode=FAST_RUN,device=gpu0,floatX=float32 python gpu_test.py
THEANO_FLAGS=mode=FAST_RUN,device=gpu1,floatX=float32 python gpu_test.py
# Tried pointing to CUDA:
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32,cuda.root=/usr/lib/nvidia-cuda-toolkit python gpu_test.py
THEANO_FLAGS=mode=FAST_RUN,device=gpu0,floatX=float32,cuda.root=/usr/lib/nvidia-cuda-toolkit python gpu_test.py
THEANO_FLAGS=mode=FAST_RUN,device=gpu1,floatX=float32,cuda.root=/usr/lib/nvidia-cuda-toolkit python gpu_test.py