I installed cuda 8.0 in my ubuntu 16.04 machine and checked the cuda version using the command "nvcc --version". it shows version as 7.5!!!.How Can I be sure that it is accurate? Are there other commands that I can also use to verify my result?
4 Answers
[edited 2022]
For CUDA 11:
$ cat /usr/local/cuda/version.json For cuda-8.0 on Ubuntu16.04, you should be able to read
$ cat /usr/local/cuda/version.txt CUDA Version 8.0.44 I agree with Robert Crovella, you might need to check your PATH
2 Comments
Starting from CUDA 8.0, it's possible to have multiple CUDA versions installed. You can then activate different values for $PATH environment variable that will present you with different CUDA version.
Command to immediately obtain the CUDA version:
$ nvcc --version | grep "release" | awk '{print $6}' | cut -c2- You can confirm the result by checking the install status of CUDA libraries:
$ dpkg -l | grep cuda For installing multiple versions of CUDA, you can refer to this article.
Comments
Thank you all... Previously I tried to install cuda8.0 using run file from https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda_8.0.44_linux-run. After that I tried to check "nvcc --version", but it shows the following error "The program 'nvcc' is currently not installed. You can install it by typing: sudo apt-get install nvidia-cuda-toolkit". So I tried the above command. It gave the cuda7.5 version.
Later I tried to install cuda using debian package which by default contained nvcc. Now I am getting correct version.
1 Comment
PATH environment variable. If you don't do that, you will get the message about nvcc not being installed.
cudapreviously installed?cuda?which nvcc?