Skip to content

Commit

Permalink
Merge branch 'jgfouca/deopt_mpassi_icepack_file' into next (PR #6668)
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
jgfouca committed Oct 9, 2024
2 parents 842a837 + f5b8ad7 commit 0b1696a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/mpas-framework/src/build_core.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ function(build_core CORE)
endforeach()
endif()

# Disable optimizations on some files that would take too long to compile, expect these to all be fortran files
foreach (SOURCE_FILE IN LISTS NOOPT_FILES)
get_filename_component(SOURCE_EXT ${SOURCE_FILE} EXT)
string(REPLACE "${SOURCE_EXT}" ".f90" SOURCE_F90 ${SOURCE_FILE})
e3sm_deoptimize_file(${CMAKE_BINARY_DIR}/${SOURCE_F90})
endforeach()

genf90_targets("${RAW_SOURCES}" "${INCLUDES}" "${CPPDEFS}" "${NO_PREPROCESS}" "${INC_DIR}")
target_sources(${COMPONENT} PRIVATE ${SOURCES})

Expand Down
1 change: 1 addition & 0 deletions components/mpas-seaice/src/seaice.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ set(SEAICE_MODEL_FORWARD
)
list(APPEND RAW_SOURCES ${SEAICE_MODEL_FORWARD})
list(APPEND DISABLE_QSMP ${SEAICE_MODEL_FORWARD})
list(APPEND NOOPT_FILES "core_seaice/icepack/columnphysics/icepack_shortwave_data.F90")

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

0 comments on commit 0b1696a

Please sign in to comment.