Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Important Update: Community Platform Migration​. Learn more​>
29657 Discussions

Help with Dynamic Arrays and COMMON blocks

Ernie_P_1
Beginner
1,883 Views

Hello,

I am trying to increase the performance of one of my programs. This program has about 70 subroutines that share data usuallythrough the use ofCOMMON blocks. Many ofthe common blocksconsist of 3-dimensional arrays. I'd like to make these arrays dynamic as they currently are defined with the maximum size I could need. This wastes a lot of memory.

Can I use dynamic arrays in COMMON blocks? Any other ideas?

Thanks,

Aaron

0 Kudos
1 Reply
Steven_L_Intel1
Employee
1,883 Views
You can put a POINTER array in COMMON, but not ALLOCATABLE. Let me suggest the use of module variables (which can be ALLOCATABLE) as an alternative to COMMON.
0 Kudos
Reply