Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Increase of array memory in gfortran compiler

  1. Sep 24, 2010 #1
    Dear colleagues

    My code in Fortran passes all data in one large vector. I increased the size of this vector for the maximum that the compiler accepts but still need more positions allocable to it. Is there any way I can increase the memory allocation of the compiler?

  2. jcsd
  3. Sep 27, 2010 #2
    Hi, do not forget that the maximum size for an array is determined by the CPU architecture, i.e. 32bit or 64bit. Anyhow, you can use the word "kind" to allocate very large arrays, e.g

    real(kind=4) :: var
    You can also use kind=8 or even kind=16. One last thing, the parameter kind is used in Fortran 90/95 not 77
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Increase array memory Date
Java Representation of two-dimensional arrays in the memory Dec 27, 2017
Python Array Indexing Nov 8, 2017
C/++/# Allocating a huge boolean array fails Oct 14, 2017
Increasing the efficiency of a python code. Sep 8, 2014
What's the fastest way to increase file size? Mar 18, 2007