CUDA is a parallel programming toolkit that utilizes GPU (Graphics Programming Unit). Searching a high performance computing platform for material computational research, I stumbled upon CUDA accelerated Molecular Modelling application, and have been longing to have a taste.

Hardware

To use cuda, we need a decent computer with 64 bit CPU (AMD Athlon, or Intel Xeon), and a CUDA supported GPU (must be NVIDIA). The CPU was pretty common, but I had to spend for about 2 weeks looking for the right GPU. I was a happy guy with a humble generic video card, but now, I learnt that there are three classes of NVIDIA GPU:

It integrates many applications I really want to use, including Sun Grid Engine (used by our counter part at Osaka University Japan).

There are CUDA rool, provided by thir party.

The current version is Rock 5.1, which is based on CentOS 5.2. At the download page, there are several choices. Not wanting any problem, I downloaded the jumbo DVD version (more than 2 GB !) and burned it to the DVD. I followed the third party link there to download CUDA rools from Clustercorp.

OS Installation

Here we go … let’s the fun begin

Installation of Rock Linux was pretty straight forward. Just insert the DVD, boot the computer, and everything was friendly guided. The most difficult part was deciding the harddisk partitions. I went with:

sda1 : 1GB swap

sda2 : 20 GB /

sda5 : 500 MB /tmp

sda6 : 4GB /var

sda7 : 200 GB /export

After about 1 hour of installation, Rocks 5.1 was up and running. I created a new login account for my self then started enjoying my first date with Rocks / CentOS (FYI, I’m a seasoned Slacker).

Graphics Configuration

I was not surprised to found out that the new system was using vesa driver for GUI. Slackware does that, always

So the first hunting is go to the NVIDIA download driver site. I got the NVIDIA-Linux-x86_64-180.22-pkg2.run file.To install it:

Go to the text console (press Alt-F1)

Login as root

Kill x-windows: init 2

Move to the folder that contains the downloaded driver : cd download/nvidia

Change mode to executable: chmod +x *.run

Run it : ./NVIDIA-Linux-x86_64-180.22-pkg2.run

Alas, the installer said that the current kernel was configured to use Zen virtual machine, which is not compatible with NVIDIA driver. So … we need a plain kernel. Where is it ? At Slackware, compiling a new kernel is pretty easy (for me). How to do that in CentOS ?

Turned out, I found it at /export/rocks/install/rolls/os/5.1/x86_64/RedHat/RPMS/ . Just install it from the command line:

rpm -i kernel-2.6.18-92.1.13.el5.x86_64.rpm

rpm -i kernel-devel-2.6.18-92.1.13.el5.x86_64.rpm

After rebooting, the NVIDIA installation was resumed. This time everything went well.

To use the nvidia driver, I simply edited the /etc/X11/xorg.conf (I’m a Slacker after all), changed just one line:

However, calling startx was failed. The error message indicated that no device was found. Oh my. I exactly knew what was happening. GTS 250 was a new chip, and the diver could not support it yet.

Once again, google came to the rescue. It found a post in the nvidia forum, announcing the new release that supports GTS-250: NVIDIA-Linux-x86_64-180.51-pkg2.run. So I downloaded it, run it, then … I got the accelerated graphics. Just to check it, I run glxgears: