Hello,
I am using pgi 14.6. It seems that the “$acc routine” directive is not supported. Can someone please verify this?
Shown below is a toy program. I create an array of length 10 and call an adder subroutine to add a value to every element of it.
Compiling it with “pgfortran -acc -Minfo routine.f90” gives
PGF90-S-0155-Accelerator region ignored; see -Minfo messages (routine.f90: 37)
routine_test:
37, Accelerator region ignored
39, Accelerator restriction: function/procedure calls are not supported
40, Accelerator restriction: unsupported call to ‘add’
0 inform, 0 warnings, 1 severes, 0 fatal for routine_test
module m_adder
implicit none
interface
!$acc routine
subroutine adder(i,isum)
integer, intent(in) :: i
integer, intent(inout), dimension(:) :: isum
end subroutine
end interface
contains
subroutine add(i,isum)
implicit none
integer, intent(in) :: i
integer, intent(inout),dimension(:) :: isum
isum(i) = isum(i) + i
end subroutine add
end module m_adder
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
program routine_test
use m_adder
implicit none
integer,dimension(10) :: isum
integer :: i
do i=1,10
isum(i) = 0
end do
!$acc kernels copy(isum)
!$acc loop independent
do i=1,10
call add(i,isum)
!isum(i) = isum(i) + i
end do
!$acc end kernels
print *, isum
end program routine_test