I have a 4D complex allocatable array in a user-defined datatype.
In file1, I create a pointer to it and copy it to the device
wavefield_ptr=>imaging_arrays%wavefield !$acc data copy (wavefield_ptr)
In a subroutine in file2 which is called from file1, I am trying to work on this array using a kernels compute region
!$acc update device(wavefield_ptr(nx,ny,nw,n_wave)) !$acc kernels present(wavefield_ptr) !$acc loop independent private(.....)
I get a compilation error “PGF90-S-0155-Compiler failed to translate accelerator region (see -Minfo messages): Could not find allocated-variable index for symbol (m_wide_angle_iso_o2c2.f90: 295)”
where line 295 is “!$acc kernels present(wavefield)”
Note that amongst the messages shown by -Minfo, I see
“295, Generating present(wavefield(:,:,:,:))”
Any idea what is going wrong? I am using PGI 14.6.