Thursday, October 14, 2010

INSTALLING CUDA ON UBUNTU 10.04

For a while now, I have been interested in parallel computing.  With graphics card becoming programmable, the sheer computing power at user disposable is just amazing.  I assembled a PC a few days ago and decided to install Ubuntu 10.04 as I didn’t want to spend money on OS.  I am a newbie to linux and CUDA and I decided to share my experiences with everyone and simplify the learning curve for most of us.

As my Laptop did not have hardware support for CUDA, I assembled a PC with Nvidia graphics card.  The details are as follows.

Case:             ThermalTake V9 Black
MotherBoard:   EVGA P55 SLI
RAM:              Corsair 4gb DDR 3
Hdd:               Western Digital Cavier Blue 500GB
Graphics card:  EVGA GTX460
         
After assembling the PC and installing Ubuntu, the next task was installing CUDA.  Though NVIDIA has a Linux getting started guide, it is generic in nature with OS specific details missing.  After reading a couple of blogs, technical resources, and websites, the set of instructions needed to successfully install CUDA on a PC running ubuntu should be as follows.

1.)     This process assumes that ubuntu has been freshly installed on the computer.
2.)     Download the graphics card driver, CUDA toolkit and SDK samples and save it on the computer.

We first remove any Nvidia drivers installed on the system with the following command.
sudo apt-get purge nvidia-*

3) For each of installation and avoiding conflicts, we make a file in following location - "/etc/modprobe.d/nvidia-graphics-drivers.conf" and insert the following lines 

blacklist vga16fb
blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-173
blacklist nvidia-96
blacklist nvidia-current
blacklist nvidiafb



4) After this step, follow the procedure as documented in the Linux getting started guide available from Nvidia


5) After using the Make command in SDK, I noticed that libraries like XLi and XMu were missing.  Install the -dev version of these libraries and issue Make command again.  That will solve the issue. 

No comments:

Post a Comment