I managed to get cuda on Ubuntu 9.04 (pre-release) working. Most of the sdk-tools work, but I’ve trouble with allocating memory e.g.
./MersenneTwister Initializing data for 24000000 samples... cudaSafeCall() Runtime API error in file <MersenneTwister.cu>, line 134 : out of memory.
Here are the steps:
Use the nvidia driver (180.37) proposed by ubuntu
downgrade gcc and g++ to 4.2 (I simply changed the symlinks in /usr/bin)
Download Cuda-toolkit 2.1 and SDK 2.1 for linux-32 Ubuntu 8.04
install Cuda-toolkit to default device (/usr/local/cuda) using sudo. add to PATH:
echo "# CUDA stuff PATH=\$PATH:/usr/local/cuda/bin LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/cuda/lib export PATH export LD_LIBRARY_PATH" >> ~/.bashrc
(from: Life of a Programmer Geek)
install Cuda-SDK to default device (~/NVI…)
I type make in the SDK directory I got the error that -lGL isn’t found. I found that I’ve to add the symlink libGL.so to /usr/lib. It seems that the nvidia driver deletes this symlink.
sudo ln -s /usr/lib/libGL.so.180.37 /usr/lib/libGL.so
but be careful with deleting any symlinks or creating them.
After these steps I can type make and it compiles, but there are some warnings and error messages.
I hope this guide will work on other systems and will be working on the real release of 9.04