Debuging problems

I hope the following text will not sound silly or to stupid for all of you who have much more experience than I in programming. I am new to CUDA and have written some code which, now successfully compiles, but I have some issues with debugging. I use visual studio 2005 and i started my project by using the template provided by nVidia. Well, now when I set the brake points right before the kernel function call and press step into when the executions reaches my break point, I get a message saying that “there is no source code available for the current location” and I can chose between pressing “ok” or “show disassembly”. If I just press ok and want to continue debugging the same message appears again. It’s the same both in EmuDebug and Debug.
I thought it only because I have written a bad code, and I tried to debug some of the examples provided by nVidia, but the same thing happens.
I would appreciate any kind of help.

thanx in advance.

To debug kernels in emulation mode, you must set a breakpoint inside the kernel.

To debug kernels on hardware, wait until NVIDIA releases their debugger which has been promised for a while.

I did that and the problem persists. I can’t see the results of simple operations like a=5. My deadline is approaching soon and I can’t see what’s going on in my project and why it’s not doing what it’s supposed to.

If anyone had the same problem, please help me.

Try using another SDK sample. (Always the first thing to try… find something that works.)

Make sure:

Project > Properties > C/C++ > General > Debug Information Format

should be “Program Database”

This should all be done in EmuDebug.

If nothing works, consult a VS forum.

thanx

When I call the kernel with a pointer to a matrix allocated by cudaMalloc and initialize the matrix with 0’s. Everything is ok, but when I calculate some int value and say that matrix[i]=intValue; and after the for loop finishs I check if matrix element i got the desired intValue I jsut get a 0. It seems that the matrix just stays like I initializes it. Can anybody tell me why?

Can you paste a code snippet? I have a feeling you’ve got confused about what resides on the host and what’s on the device but I’m guessing.