debugging a pgfortran openacc code

Hello!

I have a double precision pgfortran code which is accelerated (mainly) by openacc directives. In order to check performance for single precision (SP) I changed in the code
the definition for kind (1.e0) and added to the following flags to the compilation command:
-pc 32 -r4 -Mfprelaxed
Is it correct?

Now, when I run the SP version I get NaN’s, but I don’t know how to do debugging for the GPU
computation.
Thank

I’d have to see the code. If your declarations are just “real”, for instance, yes, you can use -r4 and -r8 to toggle between the two real kinds. You do not need the other options.

There can be other problems moving between the two sizes of reals, depending on your code. Do you call external functions? Do you use intrinsics? Equivalence statements?

Debugging GPU code can be difficult. There are debuggers (cuda-gdb and Allinea, for instance) and we do support list-directed I/o from the GPU, so you can do “print *, value”, for example, in your OpenACC compute regions.