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
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook