! big_mem.f90 find largest array program big_mem implicit none integer i, j integer, parameter :: n=16000 ! multiple of 100 double precision, dimension(n,n) :: A print *, 'big_mem.f90 running, n=',n do i=1,n/100 do j=1,n/100 A(100*i,100*j) = 0.0d0 end do end do print *, 'allocated and used ',8*n*n, ' bytes' end program big_mem ! ! results printed when run: ! " ! big_mem.f90 running, n= 16000 ! allocated and used 2048000000 bytes ! " ! about 2GB maximum, integer overflow at n=17000