4-dim array inside !$acc routine

I was testing !$acc routine and found pgfortran-14.3 with the following error while the routine contains arrays with dim more than 3.

PGF90-S0155-Kernel region ignored; see -Minfo messages

Is this the limitation of !$acc routine?

The toy problem looks like this:

subroutine div_k2

integer :: i
integer :: n = 100
complex :: a(n,1,1,1)
complex :: b(n,1,1,1)

do i=1,n
a(i,1,1,1) = a(i,1,1,1)/b(i,1,1,1)
enddo

end subroutine div_k2

Thanks!

Hi Chenhan Yu,

I wouldn’t think the 4-D array would matter rather given it’s fixed size. The problem might be because the fact that the results “a” aren’t used, the compiler optimization could remove the “i” loop.

What schedule are you using for “routine”? “seq”, “vector”, “worker”, or “gang”?
Do you have a reproducing example?
What to the “-Minfo=accel” messages say about why the kernel region was ignored?

  • Mat