Skip to content

Commit b3e0944

Browse files
authored
Merge branch 'NCAR:main' into nssl_restart_ccn
2 parents 5eeee8d + 3405ff1 commit b3e0944

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

CMakeLists.txt

+7-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ project(ccpp_physics
66

77
#------------------------------------------------------------------------------
88
set(PACKAGE "ccpp-physics")
9-
set(AUTHORS "Grant Firl" "Dom Heinzeller" "Man Zhang" "Laurie Carson")
9+
set(AUTHORS "Grant Firl" "Dom Heinzeller" "Man Zhang" "Mike Kavulich" "Chunxi Zhang")
1010

1111
#------------------------------------------------------------------------------
1212
# Set OpenMP flags for C/C++/Fortran
@@ -20,7 +20,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
2020
message(STATUS "Setting build type to 'Release' as none was specified.")
2121
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
2222
# Set the possible values of build type for cmake-gui
23-
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Bitforbit" "Release" "Coverage")
23+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "Coverage")
2424
endif()
2525

2626
#------------------------------------------------------------------------------
@@ -145,22 +145,21 @@ SET_PROPERTY(SOURCE ${SCHEMES} ${CAPS}
145145
APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_PHYSICS} ${OpenMP_Fortran_FLAGS}")
146146

147147
# Lower optimization for certain schemes when compiling with Intel in Release mode
148-
if((CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "Bitforbit") AND
149-
${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
148+
if(CMAKE_BUILD_TYPE STREQUAL "Release" AND ${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
150149
# Define a list of schemes that need lower optimization with Intel in Release mode
151150
set(SCHEME_NAMES_LOWER_OPTIMIZATION module_sf_mynn.F90)
152151
foreach(SCHEME_NAME IN LISTS SCHEME_NAMES_LOWER_OPTIMIZATION)
153152
set(SCHEMES_TMP ${SCHEMES})
154153
# Need to determine the name of the scheme with its path
155154
list(FILTER SCHEMES_TMP INCLUDE REGEX ".*${SCHEME_NAME}$")
156155
SET_SOURCE_FILES_PROPERTIES(${SCHEMES_TMP}
157-
APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_PHYSICS} ${OpenMP_Fortran_FLAGS} -O1")
156+
APPEND_STRING PROPERTY COMPILE_FLAGS
157+
" ${CMAKE_Fortran_FLAGS_PHYSICS} ${OpenMP_Fortran_FLAGS} -O1")
158158
endforeach()
159159
endif()
160160

161161
# No optimization for certain schemes when compiling with Intel in Release mode
162-
if((CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "Bitforbit") AND
163-
${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
162+
if(CMAKE_BUILD_TYPE STREQUAL "Release" AND ${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
164163
# Define a list of schemes that can't be optimized with Intel in Release mode
165164
set(SCHEME_NAMES_NO_OPTIMIZATION GFS_typedefs.F90)
166165
foreach(SCHEME_NAME IN LISTS SCHEME_NAMES_NO_OPTIMIZATION)
@@ -174,8 +173,7 @@ endif()
174173

175174
# Reduce optimization for mo_gas_optics_kernels.F90 (to avoid an apparent compiler bug with Intel 19+)
176175
if(${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90 IN_LIST SCHEMES_OPENMP_OFF AND
177-
(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "Bitforbit") AND
178-
${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
176+
CMAKE_BUILD_TYPE STREQUAL "Release" AND ${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
179177
SET_SOURCE_FILES_PROPERTIES(${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90
180178
APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_PHYSICS} -O1")
181179
endif()

physics/module_sf_mynn.F90

+1-1
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, &
921921
DO I=its,ite
922922
if( flag_iter(i) ) then
923923
! DH* 20200401 - note. A weird bug in Intel 18 on hera prevents using the
924-
! normal -O2 optimization in REPRO and PROD mode for this file. Not reproducible
924+
! normal -O2 optimization in Release mode for this file. Not reproducible
925925
! by every user, the bug manifests itself in the resulting wind speed WSPD(I)
926926
! being -99.0 despite the assignments in lines 932 and 933. *DH
927927
WSPD(I)=SQRT(U1D(I)*U1D(I)+V1D(I)*V1D(I))

0 commit comments

Comments
 (0)