Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0dbb6f6
point to Jun fv3atm personal fork
junwang-noaa Oct 21, 2019
30d4ea2
Merge branch 'develop' of https://github.com/ufs-community/ufs-weathe…
junwang-noaa Oct 24, 2019
f1ba56c
Merge remote-tracking branch 'upstream/develop' into develop
junwang-noaa Jan 28, 2020
927077b
update to the top of upstream develop branch
junwang-noaa Jan 25, 2021
734fd49
Merge branch 'develop' of https://github.com/aerorahul/ufs-weather-mo…
aerorahul Apr 13, 2021
678ab1c
Merge remote-tracking branch 'upstream/develop' into develop
aerorahul Apr 13, 2021
5e03cbd
Merge remote-tracking branch 'upstream/develop' into develop
aerorahul Apr 15, 2021
30f8488
Merge remote-tracking branch 'upstream/develop' into develop
aerorahul Apr 16, 2021
2d9e48f
Merge remote-tracking branch 'upstream/develop' into develop
aerorahul Apr 29, 2021
4bd1275
Merge branch 'ufs-community:develop' into develop
aerorahul Jun 1, 2021
302d428
build full CDEPS library and link against it instead of data components
aerorahul Jun 1, 2021
e9210f8
remove erroneous PRIVATE compiler definition
aerorahul Jun 1, 2021
28a53f4
cleanup rt.conf and pass directly as CMAKE_FLAGS to compile.sh
aerorahul Jun 1, 2021
54fc471
Merge remote-tracking branch 'upstream/develop' into develop
aerorahul Jun 2, 2021
dfd0348
Merge branch 'develop' into feature/link_full_cdeps
aerorahul Jun 2, 2021
cb8e948
Merge branch 'feature/link_full_cdeps' into feature/cmake_flags_cleanup
aerorahul Jun 2, 2021
0905841
fix rt.sh following reviewer comments
aerorahul Jun 2, 2021
9c35a0a
revert CDEPS changes to develop
aerorahul Jun 2, 2021
4a7fb66
Merge branch 'develop' into feature/cmake_flags_cleanup
aerorahul Jun 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export ESMFMKFILE=${ESMFMKFILE:?"Please set ESMFMKFILE environment variable"}
BUILD_DIR=${BUILD_DIR:-${UFS_MODEL_DIR}/build}
mkdir -p ${BUILD_DIR}

[[ -n "${CCPP_SUITES:-""}" ]] && CMAKE_FLAGS+=" -DCCPP_SUITES=${CCPP_SUITES}"

cd ${BUILD_DIR}
cmake ${UFS_MODEL_DIR} ${CMAKE_FLAGS}
make -j ${BUILD_JOBS:-4} VERBOSE=${BUILD_VERBOSE:-}
76 changes: 20 additions & 56 deletions tests/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ else
# Load fv3 module
module use $PATHTR/modulefiles
modulefile="ufs_${MACHINE_ID}"
if [[ "${MAKE_OPT}" == *"DEBUG=Y"* ]]; then
if [[ "${MAKE_OPT}" == *"-DDEBUG=ON"* ]]; then
[[ -f $PATHTR/modulefiles/ufs_${MACHINE_ID}_debug ]] && modulefile="ufs_${MACHINE_ID}_debug"
fi
module load $modulefile
Expand All @@ -80,27 +80,7 @@ echo "Compiling ${MAKE_OPT} into $BUILD_NAME.exe on $MACHINE_ID"

# set CMAKE_FLAGS based on $MAKE_OPT

CMAKE_FLAGS=''

if [[ "${MAKE_OPT}" == *"DEBUG=Y"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DDEBUG=ON -DCMAKE_BUILD_TYPE=Debug"
elif [[ "${MAKE_OPT}" == *"REPRO=Y"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DREPRO=ON"
fi

if [[ "${MAKE_OPT}" == *"32BIT=Y"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -D32BIT=ON"
fi

if [[ "${MAKE_OPT}" == *"OPENMP=N"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DOPENMP=OFF"
fi

if [[ "${MAKE_OPT}" == *"MULTI_GASES=Y"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DMULTI_GASES=ON"
else
CMAKE_FLAGS="${CMAKE_FLAGS} -DMULTI_GASES=OFF"
fi
CMAKE_FLAGS=$MAKE_OPT

# FIXME - create CCPP include directory before building FMS to avoid
# gfortran warnings of non-existent include directory (adding
Expand All @@ -109,55 +89,40 @@ fi
# this line can be removed once FMS becomes a pre-installed library
mkdir -p $PATHTR/FV3/ccpp/include

CMAKE_FLAGS="${CMAKE_FLAGS} -DMPI=ON"
CMAKE_FLAGS+=" -DMPI=ON"

if [[ "${MAKE_OPT}" == *"DEBUG=Y"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DCMAKE_BUILD_TYPE=Debug"
elif [[ "${MAKE_OPT}" == *"REPRO=Y"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DCMAKE_BUILD_TYPE=Bitforbit"
if [[ "${MAKE_OPT}" == *"-DDEBUG=ON"* ]]; then
CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=Debug"
elif [[ "${MAKE_OPT}" == *"-DREPRO=ON"* ]]; then
CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=Bitforbit"
else
CMAKE_FLAGS="${CMAKE_FLAGS} -DCMAKE_BUILD_TYPE=Release"
CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=Release"
if [[ "${MACHINE_ID}" == "jet.intel" ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DSIMDMULTIARCH=ON"
CMAKE_FLAGS+=" -DSIMDMULTIARCH=ON"
fi
fi

# Check if suites argument is provided or not
set +ex
TEST=$( echo $MAKE_OPT | grep -e "SUITES=" )
TEST=$( echo $MAKE_OPT | grep -e "-DCCPP_SUITES=" )
if [[ $? -eq 0 ]]; then
CCPP_SUITES=$( echo $MAKE_OPT | sed 's/.*SUITES=//' | sed 's/ .*//' )
echo "Compiling suites ${CCPP_SUITES}"
SUITES=$( echo $MAKE_OPT | sed 's/.*-DCCPP_SUITES=//' | sed 's/ .*//' )
echo "Compiling suites ${SUITES}"
fi
set -ex

# Valid applications
if [[ "${MAKE_OPT}" == *"APP=ATM"* ]]; then
echo "MAKE_OPT = ${MAKE_OPT}"
CMAKE_FLAGS="${CMAKE_FLAGS} -DAPP=ATM"
fi

if [[ "${MAKE_OPT}" == *"APP=ATMW"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DAPP=ATMW"
fi

if [[ "${MAKE_OPT}" == *"APP=S2S"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DAPP=S2S -DMOM6SOLO=ON"
fi

if [[ "${MAKE_OPT}" == *"APP=S2SW"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DAPP=S2SW -DMOM6SOLO=ON"
fi

if [[ "${MAKE_OPT}" == *"APP=NG-GODAS"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DAPP=NG-GODAS"
if [[ "${MAKE_OPT}" == *"-DAPP=S2S"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DMOM6SOLO=ON"
fi

if [[ "${MAKE_OPT}" == *"APP=NG-GODAS-NEMSDATM"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DAPP=NG-GODAS-NEMSDATM"
if [[ "${MAKE_OPT}" == *"-DAPP=NG-GODAS"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DMOM6SOLO=ON"
fi

CMAKE_FLAGS=$(trim "${CMAKE_FLAGS}")
echo "CMAKE_FLAGS = ${CMAKE_FLAGS}"

if [ $clean_before = YES ] ; then
rm -rf ${BUILD_DIR}
Expand All @@ -166,13 +131,12 @@ fi
export BUILD_VERBOSE=1
export BUILD_DIR
export BUILD_JOBS
export CCPP_SUITES
export CMAKE_FLAGS

bash -x ${PATHTR}/build.sh

mv ${BUILD_DIR}/ufs_model ${PATHTR}/tests/${BUILD_NAME}.exe
if [[ "${MAKE_OPT}" == *"DEBUG=Y"* ]]; then
if [[ "${MAKE_OPT}" == "-DDEBUG=ON" ]]; then
cp ${PATHTR}/modulefiles/ufs_${MACHINE_ID}_debug ${PATHTR}/tests/modules.${BUILD_NAME}
else
cp ${PATHTR}/modulefiles/ufs_${MACHINE_ID} ${PATHTR}/tests/modules.${BUILD_NAME}
Expand All @@ -183,5 +147,5 @@ if [ $clean_after = YES ] ; then
fi

elapsed=$SECONDS
echo "Elapsed time $elapsed seconds. Compiling ${MAKE_OPT} finished"
echo "Compile ${COMPILE_NR/#_} elapsed time $elapsed seconds. ${MAKE_OPT}" > compile${COMPILE_NR}_time.log
echo "Elapsed time $elapsed seconds. Compiling ${CMAKE_FLAGS} finished"
echo "Compile ${COMPILE_NR/#_} elapsed time $elapsed seconds. ${CMAKE_FLAGS}" > compile${COMPILE_NR}_time.log
Loading