superscalar
superscalar

Reputation: 715

breakpoints in cuda do not work!

with a very simple code, hello world, the breakpoint is not working. I can't write the exact comment since it's not written in English, but it's like 'the symbols of this document are not loaded' or something.

there's not cuda codes, just only one line printf in main function.

The working environment is windows7 64bit, vc++2008 sp1, cuda toolkit 3.1 64bits. Please give me some explanation on this. :)

Upvotes: 0

Views: 704

Answers (3)

mLstudent33
mLstudent33

Reputation: 1175

Did you compile with -g -G options as noted in the documentation?

NVCC, the NVIDIA CUDA compiler driver, provides a mechanism for generating the debugging information necessary for CUDA-GDB to work properly. The -g -G option pair must be passed to NVCC when an application is compiled for ease of debugging with CUDA-GDB; for example,

nvcc -g -G foo.cu -o foo

here: https://docs.nvidia.com/cuda/cuda-gdb/index.html

Upvotes: 0

Ian Lee
Ian Lee

Reputation: 502

Are you trying to use a Visual Studio breakpoint to stop in your CUDA device code (.cu)? If that is the case, then I'm pretty sure that you can't do that. NVIDIA has released Parallel NSIGHT, which should allow you to do debugging of CUDA device code (.cu), though I don't have much experience with it myself.

Upvotes: 1

Tom
Tom

Reputation: 21108

So this is just a host application (i.e. nothing to do with CUDA) doing printf that you can't debug? Have you selected "Debug" as the configuration instead of "Release"?

Upvotes: 1

Related Questions