Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5038 Discussions

Dynamic (allocatable) vs static arrays in Fortran.


Dear community, this is a very simple question that can have a great impact on the performance on parallel computation. My question is threefold.


1. - Where does allocatable arrays and static reside? (cache, register, RAM). I've read that static arrays deliver faster run time because they access a different part of the memory layout. 


2.- If static arrays are faster, then for the performance we should avoid allocatable arrays. How can we pass arguments to Fortran at a compiled time using bash scripting or a makefile in order to enforce static arrays?


3.- in MPI we usually use domain decomposition, thus the only way I have found to accommodate a different number of nodes in each rank is by using allocatable arrays. Any suggestion to enforce static arrays?


Thank you very much dear community!!



0 Kudos
0 Replies