On this page

  1. CUDA And Debian Lenny

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.

cat /proc/version
Linux version 2.6.26-2-amd64 (Debian 2.6.26-19) ([email protected]) (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:

export CC="gcc-4.1"

Now we are ready for the CUDA Driver.

sh cudadriver_2.3_linux_64_190.18.run

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.

sh cudatoolkit_2.3_linux_64_ubuntu9.04.run

And as the last step we install the CUDA SDK.

sh cudasdk_2.3_linux.run

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/ld.so.conf.d/cuda.conf
/usr/local/cuda/lib64
cat /etc/profile | grep PATH
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/cuda/bin"
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/cuda/bin"

After that your system should be ready to build nice CUDA projects. Enjoy parallel computation.

Share this page:

2 Comment(s)