4

I have some trouble to OpenACC code debugging which compiled PGI compiler. (pgcc 15.7)

I want to show or dump variables and array values which are in OpenACC region. (the variable and array is on GPU's memory space)

But I can't use printf in OpenACC kernel region.

I tried using cuda-gdb and Nsight(from NVIDIA). But It doesn't work when meet the PGI libraries.

Is there some solution to show variable values in OpenACC kernel region?

Or some debugging OpenACC methods?

soongk
  • 259
  • 3
  • 17
  • 1
    Can you please post more information about the problem you're seeing with cuda-gdb? I just tried using it on an OpenACC code with PGI 15.7 and was able to inspect the values of several variables in the region. If it's not finding the PGI libraries, please make sure `/linux86-64/lib` is in your `LD_LIBRARY_PATH`. – jefflarkin Aug 11 '15 at 16:17
  • 1
    Hi jefflarkin. I retried after setup LD_LIBRARY_PATH and put compile option -g. NOW I can show variables in CUDA kernels. Thank you very much :) – soongk Aug 13 '15 at 01:35
  • Great! I'm glad I could help. – jefflarkin Aug 13 '15 at 18:03

1 Answers1

3

Posting the answer from the above comments for completeness.

Building with -g and setting LD_LIBRARY_PATH to point to the toolkit directory <install path>/linux86-64/lib resolved this issue.

jefflarkin
  • 1,279
  • 6
  • 14