Michael Puglia
Michael Puglia

Reputation: 145

Kernel Conditional Breakpoints in Nsight Eclipse

I'm running CUDA 5.5 on an SUSE Linux machine with 2 M2050 cards installed, neither of which are used for running X11. I am trying to step through a kernel that is specifically only using device 0 using the Nsight Eclipse debugger. If I set an (unconditional) breakpoint inside a kernel, the debugger breaks on block 0/thread 0 first, and then if I continue execution it will break again at the same point 5 or 6 times on seemingly random threads in different blocks, before exiting the kernel and continuing to the next kernel. The program execution in the kernel is happening correctly and displayed correctly. The host code debugs without problems.

If I make the same breakpoint conditional, as outlined in this post:

using nsight to debug

I am seeing no difference in the behavior of the debugger. The condition on the breakpoint seems to be ignored and the debugger breaks on 5 or 6 random threads before exiting the kernel. Neither of these behaviors seem to make much sense to me. I would think the unconditional breakpoint should break on thread 0 or all threads. And I would think that the conditional breakpoint should break on only the thread it's conditioned on. I've looked all over the NVIDIA documentation, stackoverflow etc and seem to have exhausted my options at this point. I was wondering if anyone else has seen similar behavior or might have some pointers.

Upvotes: 0

Views: 545

Answers (1)

Eugene
Eugene

Reputation: 9474

  1. Unconditional breakpoint breaks for every new "batch" of threads arriving to the device. This is needed so you can explore all your threads.
  2. Because of some technical issues, conditional breakpoints should be set after you break in kernel at least once. This will be fixed in CUDA Toolkit 6.0.

Upvotes: 1

Related Questions