Increase of array memory in gfortran compiler

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 5K views
Cleiton
Messages
1
Reaction score
0
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?

Thank's
 
Physics news on Phys.org
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