Sunday, May 21, 2017

14.04 - Nvcc -v fails but CUDA 7.0 installed and nvcc present




I have installed CUDA 7.0 and run deviceQuery from the samples - it passes. If I go to usr/local/CUDA-7.0/bin I can see nvcc is present.



To set the paths, I have run these from the terminal:



export PATH=/usr/local/cuda-7.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH


I have also tried adding these to the bashrc file. However, when I run a Theano test, I get the following error:




ERROR (theano.sandbox.cuda): nvcc compiler not found on $PATH. Check your nvcc installation and try again.


Furthermore, when I run:



nvcc -v 


I get the error:




The program 'nvcc' is currently not installed. You can install it by typing: sudo apt-get install nvidia-cuda-toolkit


What am I doing wrong? Thank you.



After I added the following to the theanorc file:



[cuda] 
root = /usr/local/cuda-7.0



CUDA started working as expected. CUDA samples run correctly and Theano tests also run as expected, using the GPU.



nvcc -V also works and produces the following:



Nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Mon_Feb_16_22:59:02_CST_2015
Cuda compilation tools, release 7.0, V7.0.27



This stumped me for a while. Note that the V must be uppercase. I was using nvcc -v, which produces an error.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...