How to debug device code

I failed to debug Cuda kernel function. I tried to add ¨-G¨ option to nvcc but failed. Some errors exist when linking fortran object code to cuda object code. For example, undefined reference to $gpu_registers. How to debug device kernel code? Thanks a lot.

Hi,

as far as I know, all it should take to debug device code is to add the flag “-deviceemu” to the nvcc command line;

however, I did not succeed so far; see my thread at [url=“http://forums.nvidia.com/index.php?showtopic=75943&pid=438171&mode=threaded&show=&st=&#entry438171”]http://forums.nvidia.com/index.php?showtop...t=&#entry438171[/url]

Hope you have more luck,
and let me know when you succeed!

p.s.: which environement (Win+VS, Linux…?) are you using?