Skip to content

Commit

Permalink
[production/AQM.v7] EE2 fixes for Debug build. (ufs-community#976)
Browse files Browse the repository at this point in the history
* get -ftrapuv and -check all into DEBUG builds using CMAKE_BUILD_TYPE

* Update externals with my personal update branches

* Update externals with updated ufs-weather-model hash/branch

* Sending build type to externals needs to use the right punctuation

* Bring externals up to date with new hash's for new DEBUG build flags
  • Loading branch information
BrianCurtis-NOAA authored Nov 21, 2023
1 parent bff5f1b commit 2491d10
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
10 changes: 6 additions & 4 deletions sorc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ if(BUILD_UFS_UTILS)
list(APPEND UFS_UTILS_ARGS
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
"-DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR}"
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
"-DBUILD_TESTING=OFF"
"-DFRENCTOOLS=OFF"
"-DICEBLEND=OFF"
Expand Down Expand Up @@ -265,6 +266,7 @@ if (BUILD_UPP)
"-DBUILD_WITH_IFI=OFF"
"-DBUILD_WITH_GTG=OFF"
"-DBUILD_WITH_WRFIO=ON"
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
)

ExternalProject_Add(UPP
Expand All @@ -286,7 +288,7 @@ if (BUILD_GSI)
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/GSI
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gsi
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} -DGSI_MODE=Regional -DENKF_MODE=FV3REG
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DGSI_MODE=Regional -DENKF_MODE=FV3REG
BUILD_ALWAYS TRUE
STEP_TARGETS build
)
Expand All @@ -300,7 +302,7 @@ if (BUILD_RRFS_UTILS)
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/rrfs_utl
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/rrfs_utl
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
BUILD_ALWAYS TRUE
STEP_TARGETS build
DEPENDS GSI
Expand All @@ -316,7 +318,7 @@ if (CPL_AQM)
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/arl_nexus
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/arl_nexus
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
BUILD_ALWAYS TRUE
)
endif()
Expand All @@ -329,7 +331,7 @@ if (CPL_AQM)
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/AQM-utils
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/AQM-utils
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} -DBUILD_POST_STAT=${BUILD_POST_STAT}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} -DBUILD_POST_STAT=${BUILD_POST_STAT} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
BUILD_ALWAYS TRUE
)
endif()
Expand Down
10 changes: 5 additions & 5 deletions sorc/Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protocol = git
repo_url = https://github.com/ufs-community/ufs-weather-model
# Specify either a branch name or a hash but not both.
#branch = production/AQM.v7
hash = 4cf17f7
hash = 80d0fe8
local_path = ufs-weather-model
required = True

Expand All @@ -21,16 +21,16 @@ protocol = git
repo_url = https://github.com/NOAA-EMC/UPP
# Specify either a branch name or a hash but not both.
#branch = develop
hash = 54cbb57
hash = 59a0175
local_path = UPP
required = True

[arl_nexus]
protocol = git
repo_url = https://github.com/noaa-oar-arl/NEXUS
# Specify either a branch name or a hash but not both.
#branch = develop
hash = 9bfc6f4
# Specify either a branch name or a hash but not both.
hash = 12f932f
local_path = arl_nexus
required = True

Expand All @@ -39,7 +39,7 @@ protocol = git
repo_url = https://github.com/NOAA-EMC/AQM-utils
# Specify either a branch name or a hash but not both.
#branch = develop
hash = 286fc69
hash = b4d37a8
local_path = AQM-utils
required = True

Expand Down
8 changes: 4 additions & 4 deletions sorc/app_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ OPTIONS
--bin-dir=BIN_DIR
installation binary directory name ("exec" by default; any name is available)
--build-type=BUILD_TYPE
build type; defaults to RELEASE
(e.g. DEBUG | RELEASE | RELWITHDEBINFO)
build type; defaults to Release
(e.g. Debug | Release | RelWithDebInfo)
--build-jobs=BUILD_JOBS
number of build jobs; defaults to 4
--use-sub-modules
Expand Down Expand Up @@ -114,7 +114,7 @@ APPLICATION=""
CCPP_SUITES=""
ENABLE_OPTIONS=""
DISABLE_OPTIONS=""
BUILD_TYPE="RELEASE"
BUILD_TYPE="Release"
BUILD_JOBS=4
EXTRN=false
REMOVE=false
Expand Down Expand Up @@ -407,7 +407,7 @@ if [ $USE_SUB_MODULES = true ]; then
set +e
#try most specialized modulefile first
MODF="$1${PLATFORM}.${COMPILER}"
if [ $BUILD_TYPE != "RELEASE" ]; then
if [ $BUILD_TYPE != "Release" ]; then
MODF="${MODF}.debug"
else
MODF="${MODF}.release"
Expand Down

0 comments on commit 2491d10

Please sign in to comment.