mirror + data copyin

Hi!

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?

PGI 13.10/linux

Alexey

Hi Alexey,

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.

Thanks for pointing this out.

  • Mat

Here is my Perl script which helps me to find some errors in my code. URL

It parses log file obtained with PGI_ACC_DEBUG environment variable.

PGI_ACC_DEBUG=1 ./wrf.exe 2>log.debug
./parse.pl < log.debug

it gave me some warnings like

[16795] >> Check for 'mudf' to device (0x10718120 -> 0x0). Origin name: mudf_pt
!! WARNING: copyin for mirror variable. lineno=763
!! WARNING: create for mirror variable. lineno=763
[16797] >> mapping found:  0x10718120 -> 0x6465a00 for mudf_pt
[16807] >>>>>>> Kernel advance_uv_766_gpu
[16813] >>>>>>> Kernel advance_uv_770_gpu
[16820] >> Check for 'mudf' to host (0x10718120 -> 0x6465a00). Origin name: mudf_pt
!! WARNING: copyin for mirror variable. lineno=774
!! WARNING: create for mirror variable. lineno=774
[16821] >> mapping found:  0x10718120 -> 0x6465a00 for mudf_pt