-heap block overflow

I am running a fortran program on a linux system, which gradually allocates memory throughout the run. It uses quite a lot of memory (~2GB). I get the following error some way into the program:

115393462:heap block overflow; -heapz too large
run has crashed

I tried setting the heapz size higher by running it as

./program_name -heapz 128M

but this had no effect. I have no idea what a heap is at all. Does this mean I have used up all the memory? I am running on a single processor.

Would be vv grateful for any assistance!
cheers,

Rosie

Hi Rosie,

Are you running in 32 or 64-bits? Which OS? Which compiler version?

In 32-bits, you can only allocate a maximum of 2GB. Try lowering the amount of memory you use, recycling memory by deallocating object, or reuse arrays already allocated.

In 64-bits, you should be ok unless any single object is greater than 2GB. In this case, add “-Mlarge_arrays” to allow allocatable arrays greater than 2GB. For static arrays greater than 2GB, add “-mcmodel=medium”

  • Mat