Error in SimpleGL Many examples run, but not SimpleGL

When I run SimpleGL I get the following error:

cudaSafeCall() Runtime API error in file <simpleGL.cpp>, line 347 : unknown error.

When I run some of the other examples like deviceQuery or matrixMul, they run with no problem.

Here is some output that may help spot something wrong in my configuration. I am running Ubuntu 8.04 on a Xeon 64 bit processor.

First, output from deviceQuery:

There are 2 devices supporting CUDA

Device 0: “Tesla C1060”
Major revision number: 1
Minor revision number: 3
Total amount of global memory: 4294705152 bytes
Number of multiprocessors: 30
Number of cores: 240
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 16384 bytes
Total number of registers available per block: 16384
Warp size: 32
Maximum number of threads per block: 512
Maximum sizes of each dimension of a block: 512 x 512 x 64
Maximum sizes of each dimension of a grid: 65535 x 65535 x 1
Maximum memory pitch: 262144 bytes
Texture alignment: 256 bytes
Clock rate: 1.30 GHz
Concurrent copy and execution: Yes

Device 1: “Quadro FX 570”
Major revision number: 1
Minor revision number: 1
Total amount of global memory: 267714560 bytes
Number of multiprocessors: 2
Number of cores: 16
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 16384 bytes
Total number of registers available per block: 8192
Warp size: 32
Maximum number of threads per block: 512
Maximum sizes of each dimension of a block: 512 x 512 x 64
Maximum sizes of each dimension of a grid: 65535 x 65535 x 1
Maximum memory pitch: 262144 bytes
Texture alignment: 256 bytes
Clock rate: 0.92 GHz
Concurrent copy and execution: Yes

Test PASSED

I am not planning to do run any Cuda on the FX 570.

Then some more hopefully useful output:

al@mit:~/Cuda/bin/linux/release$ lspci | grep VGA
03:00.0 VGA compatible controller: nVidia Corporation Quadro FX 570 (rev a1)
al@mit:~/Cuda/bin/linux/release$ glxinfo | grep rendering
direct rendering: Yes
al@mit:~/Cuda/bin/linux/release$ glxinfo | grep NVIDIA
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation
OpenGL version string: 2.1.2 NVIDIA 180.06
al@mit:~/Cuda/bin/linux/release$ ldconfig -p | grep cuda
libicudata.so.38 (libc6,x86-64) => /usr/lib/libicudata.so.38
libcudart.so.2 (libc6,x86-64) => /usr/lib/libcudart.so.2
libcuda.so.1 (libc6,x86-64) => /usr/lib/libcuda.so.1
libcuda.so.1 (libc6) => /usr/lib32/libcuda.so.1
libcuda.so (libc6,x86-64) => /usr/lib/libcuda.so
libcuda.so (libc6) => /usr/lib32/libcuda.so

I wondering if maybe there is some library that it can’t find. Perhaps I did something wrong in installing. I couldn’t get LD_LIBRARY_PATH to work, for example, and put a soft link to libcudart.so.2 in /usr/lib. But then maybe this was not such a good idea because perhaps there are other libraries that I don’t know about that it can’t find. I thought I was home free when the make worked, but obviously not.

Also, I am using the Ubuntu generic driver with the FX 570. When I select the Ubuntu system driver option it tells me that the NVIDIA driver is not enabled, and I have left it that way.

Another weird clue is if I comment out the entire function which contains line 347 in SimpleGL and then make and run it, it runs and shows a group of red dots along the x and y axis.

Any help greatly appreciated.

-Al

If the NVIDIA driver is not enabled, then you can expect such errors. You need to be running the NVIDIA driver.

When I enable the Nvidia driver provided by Ubuntu I get a scrambled low res mode when I restart such that I can’t even get started again. I tried this and ended up having to reinstall Ubuntu. Should I go to the Nvidia site and download and install the FX 570 driver from there instead of the Nvidia driver provided by Ubuntu? Or can I enable the Nvidia driver provided by Ubuntu and somehow fix something so that it doesn’t restart in low res? Actually, I think it is starting in safe mode which happens to be low res.

-Al

You should basically never use the video drivers provided by your distro’s repository; always stick with the latest versions we offer.

Installing the proper Nvidia driver did in fact fix everything. And it was amazingly simple. I just went to the Nvidia driver site, selected my driver and OS and got the driver manually. Downloaded it, followed the instructions in the readme, and simpleGL worked perfectly.

What I found puzzling was that the install program told me that it was going to delete 180.06 and replace it with 180.22. I gulped hard and said yes, thinking my hard work in installing my Tesla driver would disappear. But no, deviceQuery says the Tesla driver is still there.

So just for better understanding and maybe to help others who might have a similar problem, should I have installed 180.22 at the beginning rather than 180.06? That is, if you have an Nvidia graphics card and a Tesla card like me, should the install begin with the graphics card? Or is it that the latest Nvidia driver package is clever enough to install both?

By the way, I had no problem with restarting in low res mode. That is, I didn’t lose my high resolution.

I think I will post a note on the ubuntu forum about this. It looks to me like what all ubuntu users should do is ignore totally the ubuntu Nvidia driver enabled option. Maybe ubuntu should even remove it as an option because it sure caused me a lot of confusion.

Use Nvidia provided drivers on Nvidia hardware, what could be simpler. Strangly enough, to a newbie like me it wasn’t obvious because it never occurred to me that ubuntu would provide an incorrect driver.

-Al