Nvcc -v fails but CUDA 7.0 installed and nvcc present

Chris Parry

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.

Chris Parry

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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

NVCC ignoring CUDA code?

From Dev

nvcc --version command says nvcc is not installed

From Dev

CUDA: nvcc without CUDA toolkit

From Dev

CUDA: nvcc without CUDA toolkit

From Dev

NVCC ptas=-v output

From Dev

CUDA nvcc building chain of libraries

From Dev

CUDA - nvcc -G - if not working properly

From Dev

NVCC CUDA cross compiling cannot find "-lcudart"

From Java

Different CUDA versions shown by nvcc and NVIDIA-smi

From Dev

Using CMakes CHECK_CXX_COMPILER_FLAG with nvcc/cuda

From Dev

How to Get CUDA Toolkit Version at Compile Time Without nvcc?

From Dev

How to set CMake CUDA_NVCC_FLAGS per .cu file

From Dev

NVCC compile to ptx using CMAKE's cuda_compile_ptx

From Dev

How to set CMake CUDA_NVCC_FLAGS per .cu file

From Dev

Using CMakes CHECK_CXX_COMPILER_FLAG with nvcc/cuda

From Dev

nvcc error, "no command" verifying installation of CUDA 10 on Debian 9 Stretch

From Dev

cuda - How does nvcc compile __host__ code?

From Dev

nvcc compiler not optimizing

From Dev

Using GHC with NVCC

From Dev

check if nvcc is available in makefile

From Dev

nvcc for Android, arm

From Dev

Theano installation, nvcc not in the path

From Dev

nvcc compiler not optimizing

From Dev

check if nvcc is available in makefile

From Dev

NVCC, strange interaction with -Xcompiler

From Dev

Theano installation, nvcc not in the path

From Dev

Compiling with nvcc and g++

From Dev

What should I do when (CUDA 7.5's) nvcc/cudafe++ crashes with a segfault?

From Dev

Can't get rid of "warning: command line option ‘-std=c++11’" using nvcc/CUDA/cmake