开发者

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 co开发者_高级运维des, 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. :)


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"?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜