Is it possible to use printf (or something else) in OpenACC using the PGI compiler?

I have some problems debugging OpenACC code compiled by the PGI compiler. (pgcc 15.7)

I want to show or reset variables and array values ​​that are in the OpenACC scope. (the variable and the array are on the GPU memory)

But I can not use printf in the core area of ​​OpenACC.

I tried using cuda-gdb and Nsight (from NVIDIA). But it does not work when PGI libraries are found.

Is there any solution for displaying variable values ​​in the OpenACC kernel area?

Or some OpenACC debugging methods?

+4
source share
1 answer

Posting the answer from the above comments for completeness.

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

+3
source

All Articles