Ubuntu 8.10 and CUDA-GDB debugger failed

Hi, I am now working on a project using Cuda ver2.1 under Ubuntu 8.10 OS.

The kernel gave unwanted results once the loop grew massive for some applications. It was sometimes very ridiculous, and so I am now trying to run cuda-gdb to trace the problem.

Yet, after installing cuda-gdb, when I tried to run “cuda-gdb exefilename”, it gave out the following error message:

“cuda-gdb: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory”

Notice I installed the GDB into the default location yet I did not export “/usr/local/cuda/lib” and “/usr/local/cuda/bin” as I have done that before when configuring the SDK.

Also, one solution from the internet as

“apt-get install libncurses5-dev
ln -s libtermcap.so libtermcap.so.2”

does not work in my case (same error message).

So, just wondering whether anyone has successfully implemented the cuda-GDB debugger on Ubuntu 8.10 yet, or anyone will have any idea about how to fix the problem.

Thx a lot!

Joe

Well, as far as I know the debugger is only out for 32bit rhel5, so if your distro matches that one in terms of gcc and glibc you might be able to get it working. But I have not heard of it yet.

Perhaps, try

ldconfig -p | grep termcap

if nothing show, try again

ldconfig -p | grep term

ldconfig -p | grep cap

if nothing shows, try

sudo ldconfig

and try again the ldconfig -p.

Thx a lot.

It seems I can launch the debugger now.

Yet there are two issues:

Firstly if I used “nvcc -g -G” instead of simply “nvcc” to compile the program, the kernel failed to launch while it launched properly previous (notice I have not used the debugger yet). When I use the “pxtas option” flags to check the card resources, I found the usage of local memory increased significantly while the usage of registers decreased.

So could the lack of local memory be the reason of launch failure? (The CudaGetError gave me sth like unknown launch error)

lmem=448+444bytes, block size is 192 and I am using a 9500GT

Secondly, then I tried to use the debugger to step through the codes to find the error. Yet once I arrived at the cuda kernel, I could not step further as “step” or “next” would hang the X-terminal.

I suppose this could be because my “display” is on this graphic card?

I am using a dell computer in a complete intel platform with 9500GT. There is an onboard grapic card and I want to connect display to that and hence idle 9500GT for cuda only. Yet it seems the bios wouldn’t allow me to use the integrated graphic card when a dedicated one is connected.

Will anyone know how I can get/hack around this?

The CUDA debugger effectively freezes the GPU to step through code. As you’ve discovered, you cannot use the GPU for anything other than CUDA debugging.

The BIOS of your system apparently doesn’t allow you to use the onboard graphics if a discreet card is present. You should contact Dell to see if there are any workarounds.

Without seeing a test app that reproduces the first problem, I couldn’t speculate on why you’re seeing the behavior you’ve described. Note that this needs to be reproducible on RHEL5-i686, as Ubuntu-8.10 is not supported with CUDA at this time.