Tuesday, September 13, 2011

CUDA 4.0 on Scientific Linux 6.1

Edit: Further experimentation has indicated that you might run into trouble if you have multiple OSes on your machine. You need to boot with "rdblacklist=nouveau" appended to the line starting "kernel". That is done automatically if SL has control over Grub. If you use another OS that controls the boot manager, you will have to figure out how to make the change. I did battle with this on a machine where Mint, using Grub 2, controls booting.

I don't know much about Grub 2, so I solved the problem by reinstalling Grub from SL. For some reason, in that case, SL assigns a timeout value of 0 seconds, then chainloads the Grub 2 boot menu. It took me a while to figure out what was going on...


-- Original post follows --

I installed the nvidia driver as described in this post:

http://scientificlinuxforum.org/index.php?showtopic=15

using the command

yum --enablerepo=elrepo install kmod-nvidia
No problems after a reboot. I then installed the CUDA toolkit and SDK as described in the documentation. I got an error saying -lcuda could not be found when building the code samples. The solution was to make a symbolic link (as root) using

ln -s /usr/lib64/nvidia/libcuda.so /usr/lib64/libcuda.so

I then did "make" to build all the samples. I ran about half a dozen of them without any problems.

I've had my share of problems setting up CUDA. I'm happy it was so easy.

No comments: