Can I use a heap array as common?

Can I use a heap array as common?

  Currently in my code, I am using several arrays as common variables.

  I want make those arrays as heap for large scale simulation.

  When I builded in linux environment using compile option like "$(F77) -O2 -mcmodel large -shared-intel -heap-arrays", I could do it without any problem.

  But in Windows Environment (64bit), from the forum article (, it seems that a large array should be declared as allocatable, And those variables don't seem to be declared as allocatable, because they are common variables.

 How can I solve this problem? 



2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The reason it worked on Linux is that with -mcmodel large you can have more than 2GB of static code and data. Windows doesn't have a mode like that.

No, /heap-arrays does not apply to COMMON blocks. My first recommendation would be to convert those arrays to module ALLOCATABLE variables and allocate them to the desired size. But if that's not possible, look at the /Qdyncom compiler option which may help you. I'd discourage you from using this, but it's there if you have no other choice.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today