I’m porting a OpenMP code to OpenACC. In the OpenMP version I have a parallel section with DEFAULT(NONE), and the compiler will not compile the code until I specify for each and every variable whether it should be shared or private to each thread. This is more work on my side, but for the initial porting I actually prefer it since I have to think about the role of each variable.
So I have three questions:
Now, when porting to OpenACC I was hoping that !$acc parallel loop default(none) would just do the same as OpenMP, but I can compile without issues (pgi 18.7-0) even without specifying the role of any of the variables in the loop. Is that normal? Can I ask the compiler somehow to force me to specify the role of each variable?
What are the defaults for a directives parallel, loop and parallel loop? If I understand correctly: if I have a parallel directive and I specify private(v1), v1 will be private to each gang, so all threads created within will actually share it; if I have then a loop directive inside that parallel region, and I specify a private(v2), this v2 will be private to each thread. What happens when I combine both so that I have !$acc parallel loop private(v_a)? I think v_a will be private to each thread, but just making sure.
Is there a way to dump for each parallel region which variables are being shared, which are created, etc.?