working with a huge project I faced with the following stuff: I marked one array to be mirrored on GPU (!$acc mirror) and after that I used "acc data present " and “acc update host/device” in my code. Launching the application I got wrong result. Reason - co-developer used the same array in “acc data copyin” section (right before the data section array was modified on the host). PGI didn’t create a copy of the array. It checked that array have been mirrored on GPU and mapped host and device arrays without moving data on device (copyin).
Could you explain the difference of p_copyin and copyin in this case? Why doesn’t PGI inform that I use data section inside another data section for the same variable?
Since OpenACC only allows one copy of a variable on the device, the run time should be aborting with an error instead of using the device copy. I’ve added TPR#19657 and sent it on to engineering.