ubuntu 8.04 x86_64 cuda 2.1 samples not working

I have Ubuntu 8.04 64 bit version installed on Dell XPS 730.

I used the files:

Driver => NVIDIA-Linux-x86_64-180.06-pkg2.run
Toolkit => cuda-linux64-rel-nightly-2.1.1635-3065709.run
SDK => cuda-sdk-linux-2.10.1126.1520-3141441.run

Trying to compile the compilation failed until I did the installations

sudo apt-get install libxi6 libxi-dev
sudo apt-get install libxmu6 libxmu-dev
sudo apt-get install libc6-dev-i386

my gcc version is 4.2.4

Now the compilation is completing successfully however when I try to run any sample I get the following:

sbarakat@chaos:~/NVIDIA_CUDA_SDK$ sudo ./bin/linux/release/template
./bin/linux/release/template: error while loading shared libraries: libcudart.so.2: cannot open shared object file: No such file or directory

if I try without “sudo” I get the following:

sbarakat@chaos:~/NVIDIA_CUDA_SDK$ ./bin/linux/release/template
NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).
cudaSafeCall() Runtime API error in file <template.cu>, line 100 : initialization error.

My environment variables are:

LD_LIBRARY_PATH=:/usr/local/cuda/lib
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/cuda/bin

and the path /usr/local/cuda/lib contains the file libcudart.so.2

My intuition is that the SDK uses 32 bit libraries and hence to not link to the 64 bit libcudart.so.2 shared object.
Installing the 32 bit version of the SDK didn’t help however.

the user “sbarakat” is in the group “admin” and “video” and the installation directories are owned by sbarakat too.

Soon help is appreciated.

Thanks

I was having the same problem earlier today.

I’m running Ubuntu 8.10 32-bit version on a Dell XPS 630

I installed the CUDA 2.1 Beta (as it looks like you have) about a month ago, same gcc version, etc.

I’ve got an NVIDIA 9800GT (running my X server, dual monitors) and an NVIDIA 9800 GX2 I plan to run CUDA code on.

If you’ve gotten to the point of compiling, and you get that error while trying to run an example, you’ve probably got the same problem I was having. First, in addition to making sure your user is in the right groups, make sure all of your nvidia devices have the right permissions.

ls -l /dev/nvidia*

sudo chmod 0666 /dev/nvidia*

Then try running the deviceQuery example from your NVIDIA_CUDA_SDK directory.

./bin/linux/release/deviceQuery

If the permissions thing doesn’t solve the problem (which I don’t think it will), you should get output similar to

NVIDIA: could not open the device file /dev/nvidia1 (Input/output error).

There is no device supporting CUDA.

Device 0: "Device Emulation (CPU)"

...

This means, CUDA isn’t recognizing your GPU’s upon startup, for whatever reason. Digging around the forums gave me the following result (ex 1, ex 2)

Go to the Ubuntu equivalent of your grub.conf file, located at /boot/grub/menu.lst. Create a new boot entry using the most recent entry, and adding the options vmalloc, pci, and uppermem where indicated below.

title		Ubuntu 8.10, kernel 2.6.27-9-generic (CUDA Enabled)

uppermem	   524288

uuid				ec7846eb-b8ee-4f58-8658-8747ec6a789a

kernel		/boot/vmlinuz-2.6.27-9-generic root=UUID=ec7846eb-b8ee-4f58-8658-8747ec6a789a ro quiet splash vmalloc=256MB pci=nommconf

initrd		/boot/initrd.img-2.6.27-9-generic

reboot, and choose the new boot option!

Then try running deviceQuery again and see if you have CUDA enabled devices listed.