Hi,
When used in subroutine maxloc seems to be replaced by pghpf_maxloc_i8 without acc routine info. But direct usage in program unit is ok. Is there a workaround?
program pro
use mdl
implicit none
real(8) :: arr(100,100)
integer :: pos(100)
integer :: i
arr = reshape([(real(mod(i,100)),i=1,100*100)],shape(arr))
!$acc data copy(arr(:,:),pos(:))
!$acc parallel loop
do i=1,100,1
pos(i) = fun(arr(:,i))
end do
!$acc end data
write(*,*) sum(pos)/99
end program pro
module mdl
implicit none
contains
pure integer function fun(arr)
!$acc routine seq
real(8), intent(in), dimension(:) :: arr
fun = maxloc(arr**2,1)
end function fun
end module mdl
pgfortran -o pro -fast -ta=tesla:cc60 mdl.f90 pro.f90
mdl.f90:
PGF90-S-1000-Call in OpenACC region to procedure 'pghpf_maxloc_i8' which has no acc routine information (mdl.f90: 9)
0 inform, 0 warnings, 1 severes, 0 fatal for fun
pro.f90: