General-purpose computing on a graphics processing unit, known as GPU programming, is use of a GPU with CPU to accelerate computation. Today application of GPU programming is image processing, Signal processing, medical imaging and so on. This article show you how to install Cuda platform on your system.
Verify You Have a Supported Version of Linux
First of all you have to determine which distribution and release number you’re running. Type the following at command line:
$ uname -m && cat /etc/*release
you should see output similar to the following, modified for your particular system:
Red Hat Enterprise Linux Workstation release 6.0
The x86_64 line indicates you are running on a 64-bit system.
Verify the System Has gcc Installed
To verify the version of gcc installed on your system, type the following on the command line:
$ gcc –version
Something like below should returned:
if an error message displays , you need to install the development tools from your Linux distribution or obtain a version of gcc and its accompanying toolchain from the web.
Verify the System Has the Correct Kernel Headers and Development Packages Installed
The kernel headers and development packages for the currently running kernel can be installed with:
$ sudo apt-get install kernel-headers-$(uname -r)
$ uname -r returns the version of the kernel your system is running.
Download the NVIDIA CUDA Toolkit
Download your desired installation file from here. After installation verify your file using this code:
$ md5sum <file address>
it takes a while and the result should be like below:
Before installation it’s better to uninstall every other CUDA toolkit using this code:
$ sudo /usr/local/cuda-X.Y/bin/uninstall_cuda_X.Y.pl
and uninstall CUDA driver using below:
$ sudo /usr/bin/nvidia-uninstall
( I did not do it but according to nvidia document you have to do it. Also I am not sure that I had cuda driver or toolkit before.)
Finally, install cuda with code:
$ sudo sh cuda_<version>_linux.run