Thank you very much Dr. Fortran @sblionel and @shahmoradi !
I see Dr. Fortran @sblionel . Yeah, indeed I notice that it seems gfortran perhaps does not need to manually specify -heap-arrays
as it automatically does so. Because the same code in a particular file of mine, for Intel Fortran I have to specify -heap-arrays
otherwise it stack overflow, however for gfortran I do not really need a flag for that.
Thank you @shahmoradi , now I am more clear about the usage of ulimit -s unlimited
. I just wish the code does not stack overflow, LOL. Thank you for the -fmax-stack-var-size=10
trick (which basically act like Intel’s -heap-arrays
) and the explanation of -frecursive
.
Yeah, -heap-arrays
may have some impact in performance. Usually the performance is small enough. However, for the FLINT ODE solver,
I do notice that if I apply -heap-arrays
to all of its files, it decrease its performance by at least a factor of 10. So for the files in FLINT solver I definitely do not add any flags like -heap-arrays
. So, since then, I apply -heap-arrays
only to the files which contain function/subroutine/array which really need heap arrays.
PS. More info about gfortran flags might be found here,