Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
27 Views

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