I’m trying to allocate an array in the main program using a subroutine. But pgf90 compiler gave me that “PGF90-S-0084-Illegal use of symbol arr - must be an allocatable array (mainprogram.f90: 19)”
Help!
My code (very simple):
program main
implicit none
interface
subroutine allocatearray(arr,leng)
real(8),allocatable :: arr(:)
integer:: leng
end subroutine allocatearray
end interface
real(8), allocatable:: a(:)
call allocatearray(a,10)
print*, a
end program main