Skip to content

Commit 75599de

Browse files
authored
Merge pull request #1138 from GEOS-ESM/feature/v11-gcc15-support
v11: Support for GCC 15
2 parents f4cdac6 + 2939658 commit 75599de

File tree

1 file changed

+10
-1
lines changed
  • GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp

1 file changed

+10
-1
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@ if (CMAKE_Fortran_COMPILER_ID MATCHES Intel AND CMAKE_BUILD_TYPE MATCHES Aggress
2222
endif ()
2323

2424
if (CMAKE_Fortran_COMPILER_ID MATCHES GNU AND CMAKE_BUILD_TYPE MATCHES Release)
25-
string (REPLACE "${FOPT3}" "${FOPT2}" CMAKE_Fortran_FLAGS_RELEASE ${CMAKE_Fortran_FLAGS_RELEASE})
25+
string (REPLACE "${FOPT3}" "${FOPT2}" CMAKE_Fortran_FLAGS_RELEASE ${CMAKE_Fortran_FLAGS_RELEASE})
26+
# There is some odd interaction between GCC 15 and the GF code. FPEs
27+
# that do not occur with GCC 14 or earlier. For now, we compile GF
28+
# codes with -O1 which seems to avoid the bad instruction. Tests show
29+
# not much of a speed difference with GCC 14
30+
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 15)
31+
message (STATUS "[GCC15+] Setting GF Code to use -O1 for GCC 15")
32+
set_source_files_properties(ConvPar_GF2020.F90 PROPERTIES COMPILE_OPTIONS ${FOPT1})
33+
set_source_files_properties(ConvPar_GF_GEOS5.F90 PROPERTIES COMPILE_OPTIONS ${FOPT1})
34+
endif()
2635
endif ()
2736

2837
# Note For unknown reasons, BACM_1M_Interface takes 20 minutes to compile at O3

0 commit comments

Comments
 (0)