I am using ubuntu 14.04. I want to install CUDA. But I don't know which version is good for my laptop. I trace my driver that is:
$cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 304.125 Mon Dec 1 19:58:28 PST 2014
GCC version: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
I tried to install CUDA cuda-linux64-rel-7.0.28-19326674
but when I test by command:
./deviceQuery
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL
Could you help me resolve that problem? I reinstalled my Ubuntu many times.
The driver version is only half of the compatibility equation. The other half is the Compute Capability. A GPU will support a specific compute version, and if your CUDA version minimum compute capability is higher than that supported by your GPU, your code will not compile or run. For instance, my laptop has an nVidia CUDA 2.1 GPU, which means I can't install a CUDA toolkit more recent than CUDA 8.0 GA2. This in turn means that I need to install an nVidia driver that is compatible with my CUDA version.
The third thing you may need to consider is compiler compatibility. For instance, a minimum version of the
gcc
compiler is needed for compatibility with specific CUDA versions.304.xx is a driver that will support CUDA 5 and previous (does not support newer CUDA versions.)
If you want to reinstall ubuntu to create a clean setup, the linux getting started guide has all the instructions needed to set up CUDA if that is your intent.
I believe you are picking up a 304.xx driver via a specific (ie. separate) driver install. This is not necessary if you want to use CUDA 7, you can just use the runfile installer method which has all the necessary components including an appropriate driver (346.46). Note that CUDA 7 will not be usable with older CUDA GPUs of compute capability 1.x. For those GPUs, CUDA 6.5 should work. Starting with CUDA 9.x, older CUDA GPUs of compute capability 2.x are also not supported. Older CUDA toolkits are available for download here. Note that any given CUDA toolkit has specific Linux distros (including version number) that are supported. Not all distros are supported on every CUDA toolkit version. The general support matrix is contained in the linux install guide for the specific CUDA version of interest.
For reference, on linux, the previous CUDA toolkits required the following minimum driver versions:
A portion of this table is maintained as Table 1 here in the release notes.