Are local arrays supported in OpenACC? If I change ‘flux_x_temp’ to an allocatable it works, but it feels rather weird to allocate it on the host only to completely forget about it and let OpenACC use it on the device instead. What’s the best practice on locals?
Tested on: Suse Linux, OSX, same results.
The entire code:
module test
implicit none
contains
subroutine wrapper()
implicit none
call kernel ()
end subroutine
subroutine kernel()
implicit none
real(8) :: flux_x_temp(5,5,1)
integer(4) :: i, j
!$acc kernels create(flux_x_temp)
!$acc loop independent
do j=1,5
!$acc loop independent
do i = 1,5
flux_x_temp(i,j,0) = 2.0d0
end do
end do
!$acc end kernels
end subroutine
end module
program asuca
use test, only: wrapper
implicit none
call wrapper()
stop
end program
Result:
pgf90 -Minfo=accel,inline -Mneginfo -ta=nvidia test_openacc.f90
PGF90-S-0155-Accelerator region ignored; see -Minfo messages (test_openacc.f90: 16)
kernel:
16, Accelerator region ignored
18, Accelerator restriction: loop contains unsupported statement type
19, Accelerator restriction: unsupported statement type
0 inform, 0 warnings, 1 severes, 0 fatal for kernel
pgf90 -v
Export PGI=/usr/apps.sp3/isv/pgi/14.7
pgf90-Warning-No files to process