Skip to content

Commit f47629d

Browse files
committed
Merge branch 'jgfouca/deopt_mpassi_icepack_file' (PR #6668)
Adds NOOPT_FILES concept to mpas cmake system And uses this system to deoptimize icepack_shortwave_data.F90, a file that takes a very long time to compile and is just setting up consts. [BFB] * origin/jgfouca/deopt_mpassi_icepack_file: Adds NOOPT_FILES concept to mpas cmake system
2 parents 22a8515 + f5b8ad7 commit f47629d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

components/mpas-framework/src/build_core.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ function(build_core CORE)
6262
endforeach()
6363
endif()
6464

65+
# Disable optimizations on some files that would take too long to compile, expect these to all be fortran files
66+
foreach (SOURCE_FILE IN LISTS NOOPT_FILES)
67+
get_filename_component(SOURCE_EXT ${SOURCE_FILE} EXT)
68+
string(REPLACE "${SOURCE_EXT}" ".f90" SOURCE_F90 ${SOURCE_FILE})
69+
e3sm_deoptimize_file(${CMAKE_BINARY_DIR}/${SOURCE_F90})
70+
endforeach()
71+
6572
genf90_targets("${RAW_SOURCES}" "${INCLUDES}" "${CPPDEFS}" "${NO_PREPROCESS}" "${INC_DIR}")
6673
target_sources(${COMPONENT} PRIVATE ${SOURCES})
6774

components/mpas-seaice/src/seaice.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ set(SEAICE_MODEL_FORWARD
144144
)
145145
list(APPEND RAW_SOURCES ${SEAICE_MODEL_FORWARD})
146146
list(APPEND DISABLE_QSMP ${SEAICE_MODEL_FORWARD})
147+
list(APPEND NOOPT_FILES "core_seaice/icepack/columnphysics/icepack_shortwave_data.F90")
147148

148149
# Generate core input
149150
handle_st_nl_gen("namelist.seaice" "streams.seaice stream_list.seaice. listed" ${CORE_INPUT_DIR} ${CORE_BLDDIR})

0 commit comments

Comments
 (0)