Put automatic arrays on stack when using gfortran (for multipole performance)

This commit is contained in:
Paul Romano 2018-01-15 16:44:18 -06:00
parent 21585e937c
commit 0cf1f918f5

View file

@ -116,9 +116,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
endif()
# GCC compiler options
list(APPEND f90flags -cpp -std=f2008ts -fbacktrace -O2)
list(APPEND f90flags -cpp -std=f2008ts -fbacktrace -O2 -fstack-arrays)
if(debug)
list(REMOVE_ITEM f90flags -O2)
list(REMOVE_ITEM f90flags -O2 -fstack-arrays)
list(APPEND f90flags -g -Wall -Wno-unused-dummy-argument -pedantic
-fbounds-check -ffpe-trap=invalid,overflow,underflow)
list(APPEND ldflags -g)