For one of my projects, which I'll explain in more detail later, I am planning to write some CUDA code to simulate chemical reactions. I'm currently running Ubuntu 7.10 with a NVIDIA 8800GT video card. I'm a little bit worried about getting this set up correctly - I've had some issues getting my video card working. In fact, I have to reinstall my video card drivers every time I reboot my computer. Ah, the joys of Linux.
I originally intended to write this a half-assed attempt at a live-blog while getting the CUDA examples to compile and run. However, I had so many problems, it just got too long. Here's the abridged list of problems I had, plus their solutions. I like to think of myself as moderately competent (although not a Linux genius), but this process was still pretty painful. Hopefully this list will make things easier for somebody out there:
- Problem: Permission errors building the SDK. Solution: Don't install the SDK as root; it just goes under your home folder, anyway.
- Problem: "GL/glu.h: No such file or directory." Solution: `apt-get install libglu1-mesa-dev`
- Problem: "gcc: installation problem, cannot exec `cc1plus.'" Solution: make sure that your gcc and g++ compilers are the same version. (WTF?!)
- Problem: "cannot find -lglut". Solution: `apt-get install libglut3-dev`
- Problem: "error while loading shared libraries: libcudart.so". Solution: Add /usr/local/cuda/lib to /etc/ld.so.conf and run ldconfig
Good luck with CUDA. If you run across different problems or different solutions, post them in the comments!
PS - Wouldn't it be nice if NVIDIA had just released this as a apt-gettable package so I wouldn't have to guess which prerequisite packages I needed?
5 comments:
Thanks for the tip about libcudart, I used it to get CUDA working with eclipse after lots of frustration.
If you're interested, the post is here:
http://lifeofaprogrammergeek.blogspot.com/2008/07/using-eclipse-for-cuda-development.html
Thanks!
Extremely useful compilation of fixes. #2 does not work for my Red Hat Enterprise Linux 5.4, however. It owuld be helpful to add in the fix list systems for which they work..
cheers-
Giedrius
For x64 you might need to add
/usr/local/cuda/lib64
to /etc/ld.so.conf
dont blame linux for that reboot thing. Blame UBUNTU... I have used zillions of flavors, openSUSE and Fedora being my best buddies.
Ubuntu is the esiest Linux out there and an exceptional pain in the a$$. Ubuntu ain't Linux, its Windows which behaves like Linux (and even looks like one).
Try your luck with openSUSE or fedora. I had cuda drivers installed without any problems and all test suites ran fine. No experience of my own with cuda dev, but it won't let you down!
@The Trojan : Why dude you blame ubuntu, i think you never use and know ubuntu much, ubuntu is universal, it make easier for beginner user, so i think that's good if ubuntu easy to operate it. If you dont like so easy operating system, just try compile it self from kernel, so named with yourname, so make better one first than ubuntu, then you can talk ubuntu is bad, if not please not try use openSUSE or fedora, just use BSD machine if you dare.
Post a Comment