0
votes

I have a cuda application which I am trying to debug using parallel Nsight debugger. I have a breakpoint in my kernel function. But when I am trying to debug the code the debugger is not stopping at the breakpoint and printing out the result straight away. I have searched about this and I also got a post like this one. But I have checked "Generate GPU Debug Information" in the property page of my project and it is already turned to "Yes (-G0)". I have also set breakpoints in one of the Nvidia sample program like matrixMulCUDA and I can easily debug their program and able to see the details. So I don't know exactly what I should do or what other settings I need to change so that I could debug my program. There are few more information I would like to provide : 1. I am using Microsoft visual studio 2010 2. My GPU card is NVidia 560ti. 3 I am using CUDA 5.0 and parallel NSight visual studio version 2.2.

Here are some screenshots of the the host code function from where I am calling the kernel and also a portion of the kernel function where I have set the breakpoint. Any help would be very much appreciated.

1
One possibility is that your kernel is not executing at all. Are you doing proper cuda error checking? I don't see any in the host code picture you provided. You might also try running your code with cuda-memcheck to see if any errors are reported. - Robert Crovella
No, you are right. I haven't done a proper cuda error checking. But there is one thing.The result I am getting from the printf after copying back the matrix to the cpu, I am getting a desired result. So I believe that the kernel is executing. But still I will do as you have suggested and I will let you know. But could there be any other viable reason behind this behaviour? - duttasankha
HI! I just tested my kernel using cudaGetLastError()(somewhat mentioned in this website: visualization.hpc.mil/wiki/Handling_CUDA_error_messages) and the kernel is executing without any error. So what else is to be done to perform the debugging? - duttasankha
Just wondering where did you set the brsakpount? Is that instruction executed by a thread? - pQB
HI! I have set the breakpoint where the thread id is getting evaluated as shown in the kernel image that I have uploaded. - duttasankha

1 Answers

2
votes

We've fixed many bugs such as these in NVIDIA Nsight 3.0 RC2. I recommend all users upgrade to to NVIDIA Nsight 3.0 as soon as possible. It is a free download available from the Nsight Registered Developers Program.