Tuesday, October 14, 2008

NVidia CUDA

The other day I picked up NVidia's CUDA (Compute Unified Device Architecture, which I must say is a pretty bad acronym) to have something new to play with. (Some people tinker with car engines, I tinker with software packages... I know, I'm a little odd.) I've always had an interest in parallel programming, so CUDA seemed right up my alley.

Then I tried to install it. Maybe others have had an easier time of it, but my experience was less than top-notch. I run a dual-boot system at home, Windows XP Pro and KUbuntu 8.04.

Windows

I had no trouble at all installing CUDA on Windows, but the compiler that comes with it enforces a requirement for version 7.1 or 8.0 of Microsoft's compiler (Visual Studio 2003 or 2005, respectively). I don't have either of those, and it didn't seem worth hunting down a copy, so I gave up at that point.

Linux

Being created by and for software developers, I've found that the one thing you can always count on in Linux is the C compiler. It never seems to break.

Unfortunately, drivers are another issue. CUDA requires a new version of NVidia's device drivers, and the drivers require a new version of the Kernel module that supports them. I must have installed the drivers four or five times, always getting the same failure back from the device query program that comes with the CUDA SDK. It kept reporting that the driver was version 173.something, and the kernel module was version 167.someotherthing.

I fought with it for a day and a half, only to discover from a forum post that I needed to add "nv" to the list of disabled kernel modules in some /etc file that I'd never seen before. And suddenly it worked! I love that feeling of accomplishment when something suddenly works, even if I needed help. Sort of like when you finally kill the mosquito that bit you three times and has been buzzing in your ear for half an hour.

So expect some updates soon about how my CUDA programming is coming.

No comments: