I am trying to run a simulation program on my laptop (Linux 3.8.0-25-generic x86_64, with Ubuntu 13.04).
It compiles okay, but when getting to allocation of some array sizes I get:
forrtl: severe (179): Cannot allocate array - overflow on array size calculation.\
Some googling about this message led me to conclude that this is generated because my program is out of memory.
To check this assumption I tried to allocate the same array a smaller dimension, but still got the same problem.
What I tried next was to increase my stack memory, but still got the same problem.
This is the code:
program memoria
implicit none
integer :: n,num
complex, dimension(:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:), allocatable :: ddptrj
n=4
num=21
allocate(ddptrj(n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,num))
deallocate(ddptrj)
endprogram memoria
How can I solve this problem?