4

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.

8

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.

  • 1
    You can even try nvcc --version – pradyot Jun 15 '16 at 7:46
3

Unlike @Chis_Parry, I already had the [cuda] flag setup, I managed to solve the problem by refreshing the shared libs cache using:

sudo ldconfig /usr/local/cuda-7.0/lib64

I hope this helps someone in a similar situation I was in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.