How to debug GPU version using cuda-gdb

When I compile the code using Makefile and not in debug mode, the code runs without problem. 

However, when I compile in the debug mode (change "USE_DEBUG=NO" to "YES" in Makefile), I found that the code actually does not go into GPU part. I don't know what was the problem.

For example, in terminal I enter:

cuda-gdb DualSPHysics5.0_linux64 filename

Then goes into the code in main.cpp when meeting with the following line:

#ifndef _WITHGPU



I would expect that the code will not go into cfg.Cpu=true, because #ifndef _WITHGPU should give a "false" value. However, I do see my code goes into that line.

Anyone has any idea what was the problem?



Sign In or Register to comment.