The maximum size of a Fortran array is primarily determined by the operating system. The method by which the array is allocated can also affect how large an array can be.
On IA-32-based systems running 32-bit versions of the Windows*, Mac* OS, or Linux* operating systems, the maximum array size is 2GB for all allocation methods. This is a theoretical maximum - in practice the limit is somewhat less.On Intel® 64 or IA-64-based systems running a 64-bit operating system, the maximum array size is limited by the size of the physical memory on the system plus any additional paging or swap space. The size of the physical memory plus swap space is an upper limit. In practice the limit is somewhat less.
Important Note: For the Intel® 64 Linux* compiler versions, please read the description of the -mcmodel Linux compiler option in the Compiler Documentation, Compiler Options, for additional information on data size limitations. See also the article at /en-us/articles/avoiding-relocation-errors-when-building-applications-with-large-global-or-static-data-on
Intel® Fortran Compiler for Windows* - Limits on array sizes
For more complete information about compiler optimizations, see our Optimization Notice.