Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Can I use a heap array as common?

Jihoe_K_
Beginner
227 Views

  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 (http://software.intel.com/en-us/search/site/taxonomy_forums/36218/taxonomy_forums/36934?query=Heap), 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? 

 

 

0 Kudos
1 Reply
Steven_L_Intel1
Employee
227 Views

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.

0 Kudos
Reply