CUDA And Debian Lenny
NVIDIA® CUDA™ is a general purpose parallel computing architecture that leverages the parallel compute engine in NVIDIA graphics processing units (GPUs) to solve many complex computational problems in a fraction of the time required on a CPU. I don't know why but there is still no CUDA Driver/Toolkit/SDK Package for Debian.
Go to http://www.nvidia.com/object/cuda_get.html and download the Linux Packages for Ubuntu 9.04. Before we can install the CUDA Driver Package we must know which Kernel we are using and with which gcc it was built.
Linux version 2.6.26-2-amd64 (Debian 2.6.26-19) (firstname.lastname@example.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Wed Aug 19 22:33:18 UTC 2009
Now me must install the right Kernel Sources and we must install the gcc version which our running Kernel was built with. In my case it was Kernel-2.6.26-2 and gcc-4.1.3.
aptitude install linux-source-2.6.26
aptitude install gcc-4.1
Next we unpack the downloaded Kernel Source in /usr/src.
tar xjvf linux-source-2.6.26.tar.bz2
ln -s linux-source-2.6.26 linux
Before we can start the CUDA Driver Installation we must set our environment to use the right gcc version, so in my case:
Now we are ready for the CUDA Driver.
The installer will then build the Kernel Module and at the end it can update the xorg.conf (X restart is needed). After that we can install the CUDA Toolkit.
And as the last step we install the CUDA SDK.
If you want to build the CUDA SDK examples you need the following libraries:
aptitude install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxmu-dev libglut-dev
Don't forget to update your PATH and LD environment. See how I added the bin and lib of CUDA to my system:
cat /etc/profile | grep PATH
After that your system should be ready to build nice CUDA projects. Enjoy parallel computation.