Could not find allocated-variable index for symbol

Hello,

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.

Thanks,
KVM

Hi KVM,

We’ll need a reproducing example to understand the problem. Can you please send PGI Customer Service (trs@pgroup.com) an example and ask them to send it to me?

Note that I’ll be traveling tomorrow so wont be till Friday before I can take a look.

Thanks,
Mat