I am trying to allocate an array finn_var(459,299,27,24,25). The test program is
program test
implicit none
integer :: nx, ny, nez, nt, nspec
integer :: allocation_status
real , allocatable :: finn_var(:,:,:,:,:)
nx = 459
ny = 299
nez = 27
nt = 24
nspec = 25
allocate( finn_var(nx, ny, nez, nt, nspec), stat = allocation_status )
if (allocation_status > 0) then
print*, “Allocation error for finn_var”
stop
end if
finn_var = 0.
end
I compiled by pgf90 test.f90. It had “segmentation fault” error message. The finn_var is not allocated right. But if I compiled by gfortran, there is no problem. what went wrong with pgf90? thanks!