Multiple versions of CUDA on nvcc machine -V confusion

I used to have cuda-7.0 installed on my computer, and then cuda-7.0 was not installed and cuda-8.0 was installed. When I go to my / usr / local folder, I see the following folders:

/bin/ /cuda/ /cuda-7.0/ /cuda-8.0/ /etc/ /games/ /include/ /lib/ /lua/ /man/ /MATLAB/ /sbin/ /share/ /src/ 

I think I'm confused since the /cuda/version.txt file says that it is on cuda-8.0, but when I type:

 $ nvcc -V 

he reports that I am using version 7.0:

 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 

What puzzles me is that even if I:

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

after entering $ nvcc -V , it still displays version 7.0.

Changes:

 $ which nvcc /usr/local/cuda-7.0/bin/nvcc $ echo $PATH /home/arturo/torch/install/bin:/home/arturo/torch/install/bin:/home/arturo/torch/install/bin:/home/arturo/torch/install/bin:/home/arturo/torch/install/bin:/home/arturo/torch/install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/cuda-7.0/bin 
+5
source share
1 answer

The solution suggested in the comments:

 export PATH=/usr/local/cuda-8.0/bin:$PATH 

The problem was ordering $PATH , that my previous command had =$PATH:/usr/local... instead of =/usr/local....:$PATH

+11
source

Source: https://habr.com/ru/post/1259527/


All Articles