Skip to content

Commit

Permalink
Add /heap-arrays:1000 to cmake intel builds
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-platt committed Oct 8, 2024
1 parent dde75b8 commit 31d281e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmake/OpenfastFortranOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ endmacro(set_fast_intel_fortran)
# arch
#
macro(set_fast_intel_fortran_posix)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fpic -fpp")
# Set size where temporary are stored on heap instead of stack
# 1000: size in kB (1 MB)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fpic -fpp -heap-arrays 1000")

# debug flags
if(CMAKE_BUILD_TYPE MATCHES Debug)
Expand Down Expand Up @@ -201,7 +203,9 @@ macro(set_fast_intel_fortran_windows)
# Turn off specific warnings
# - 5199: too many continuation lines
# - 5268: 132 column limit
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /Qdiag-disable:5199,5268 /fpp")
# Set size where temporary are stored on heap instead of stack
# 1000: size in kB (1 MB)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /Qdiag-disable:5199,5268 /fpp /heap-arrays:1000")

# If double precision, make constants double precision
if (DOUBLE_PRECISION)
Expand Down

0 comments on commit 31d281e

Please sign in to comment.