Skip to content

Commit

Permalink
patch missing #ifdef TIMING#
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-seaice committed Dec 8, 2024
1 parent 283bef8 commit 4fec080
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
6 changes: 2 additions & 4 deletions share/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

add_compile_definitions(
TIMING
)
## share library
add_fortran_library(OM3_share mod/share STATIC)
add_library(AccessOM3::share ALIAS OM3_share)
Expand Down Expand Up @@ -37,7 +34,6 @@ target_sources(OM3_share PRIVATE
CESM_share/src/shr_orb_mod.F90
CESM_share/src/shr_pio_mod.F90
CESM_share/src/shr_precip_mod.F90
CESM_share/src/shr_reprosum_mod.F90
CESM_share/src/shr_reprosumx86.c
CESM_share/src/shr_strconvert_mod.F90
CESM_share/src/shr_string_mod.F90
Expand All @@ -50,6 +46,8 @@ target_sources(OM3_share PRIVATE
stubs/mct_mod.F90
)
add_patched_source(OM3_share CESM_share/src/shr_const_mod.F90)
add_patched_source(OM3_share CESM_share/src/shr_reprosum_mod.F90)

if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
# CESM reduces the precision and increases speed for the following file
set_source_files_properties(CESM_share/src/shr_wv_sat_mod.F90 PROPERTIES COMPILE_FLAGS "-fimf-precision=low -fp-model fast")
Expand Down
15 changes: 15 additions & 0 deletions share/patches/shr_reprosum_mod.F90.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/src/shr_reprosum_mod.F90 b/src/shr_reprosum_mod.F90
index fb61f42..9996c51 100644
--- a/src/shr_reprosum_mod.F90
+++ b/src/shr_reprosum_mod.F90
@@ -450,8 +450,9 @@ module shr_reprosum_mod
else
mpi_comm = MPI_COMM_WORLD
endif
+#ifdef TIMING
call t_barrierf('sync_repro_sum',mpi_comm)
-
+#endif
! check whether should abort if input contains NaNs or INFs
abort_inf_nan = .not. repro_sum_allow_infnan
if ( present(allow_infnan) ) then

0 comments on commit 4fec080

Please sign in to comment.