Hi, I am trying to compile this simple test in fortran 77:
subroutine mult( a, b,c,i)
!$ACC ROUTINE
real*4 :: b(*), a(*), c(*)
integer :: i
c(i) = a(i)*b(i)
end
subroutine testit
real*4 :: a0(100), b0(100), c0(100)
integer :: i,n
n=10
!$ACC PARALLEL LOOP
do i = 1, N
a0(i) = real(i)
b0(i) = real(i) + 1
enddo
!$ACC END PARALLEL
!$ACC PARALLEL LOOP
do i = 1, N
call mult( a0, b0, c0,i )
enddo
!$ACC END PARALLEL
do i = 1, N
print *, a0(i), b0(i) ,c0(i)
enddo
end
program main()
use openacc
call testit()
end
But the compiler gives me a error:
pgfortran -acc -Minfo=all t4.f
mult:
1, Generating acc routine seq
Generating Tesla code
PGF90-S-0155-Procedures called in a compute region must have acc routine information: mult (t4.f: 23)
PGF90-S-0155-Accelerator region ignored; see -Minfo messages (t4.f: 21)
testit:
14, Accelerator kernel generated
Generating Tesla code
15, !$acc loop gang, vector(128) ! blockidx%x threadidx%x
14, Generating copyout(b0(:10),a0(:10))
21, Accelerator region ignored
23, Accelerator restriction: call to ‘mult’ with no acc routine information
0 inform, 0 warnings, 2 severes, 0 fatal for testit
I am using: pgfortran 15.7-0 64-bit target on x86-64 Linux -tp haswell
This does not happen when you are using >= fortran 90.
Correction. It does not happen in F90 only if you are using an implicitly defined interface in a module since the compiler has access to the routine’s definition. You still need this when there isn’t an interface but also in interface block.