Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26734 Discussions

allocatable arrays in modules an static memory

Chris_H_3
Beginner
96 Views

This was stated in Steve's article on memory for 32 and 64 bit builds:

 

 In Fortran, COMMON and module variables are always static

 

Is this true for allocatable arrays in modules as well?

0 Kudos
2 Replies
Arjen_Markus
Valued Contributor III
96 Views

No, it cannot be - allocatable arrays usually have variable sizes (the main reason for making them allocatable) and even if they have the same size throughout the execution of the program, they still have to be allocated before you can use them.

Hence, static and allocatable are not unifiable.

Steven_L_Intel1
Employee
96 Views

I updated the article to make it clear that for POINTER and ALLOCATABLE module variables, it's the "descriptor" that is static.

Reply