Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #4

Merged
merged 14 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .cicd/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ pipeline {
// choice(name: 'SRW_PLATFORM_FILTER', choices: ['all', 'cheyenne', 'gaea', 'hera', 'jet', 'orion', 'pclusternoaav2use1', 'azclusternoaav2eus1', 'gclusternoaav2usc1'], description: 'Specify the platform(s) to use')
// Use the line below to enable the PW AWS cluster
// choice(name: 'SRW_PLATFORM_FILTER', choices: ['all', 'cheyenne', 'gaea', 'hera', 'jet', 'orion', 'pclusternoaav2use1'], description: 'Specify the platform(s) to use')
choice(name: 'SRW_PLATFORM_FILTER', choices: ['all', 'cheyenne', 'gaea', 'hera', 'jet', 'orion'], description: 'Specify the platform(s) to use')
// Use the line below to enable hera
// choice(name: 'SRW_PLATFORM_FILTER', choices: ['all', 'cheyenne', 'gaea', 'hera', 'jet', 'orion'], description: 'Specify the platform(s) to use')
choice(name: 'SRW_PLATFORM_FILTER', choices: ['cheyenne', 'gaea', 'jet', 'orion'], description: 'Specify the platform(s) to use')
// Allow job runner to filter based on compiler
choice(name: 'SRW_COMPILER_FILTER', choices: ['all', 'gnu', 'intel'], description: 'Specify the compiler(s) to use to build')
// Uncomment the following line to re-enable comprehensive tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ fix/
include/
lib/
share/
modulefiles/extrn_comp_build/
sorc/*/
tests/WE2E/WE2E_test_info.csv
tests/WE2E/*.txt
Expand Down
20 changes: 19 additions & 1 deletion 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 = develop
hash = 84b28ec
hash = e051e0e
local_path = sorc/ufs-weather-model
required = True

Expand Down Expand Up @@ -44,5 +44,23 @@ hash = 8d21f25
local_path = sorc/rrfs_utl
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 = 3842818
local_path = sorc/arl_nexus
required = True

[aqm-utils]
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 = 81a99ca
local_path = sorc/AQM-utils
required = True

[externals_description]
schema_version = 1.0.0
79 changes: 66 additions & 13 deletions devbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ OPTIONS
compiler to use; default depends on platform
(e.g. intel | gnu | cray | gccgfortran)
-a, --app=APPLICATION
weather model application to build
(e.g. ATM | ATMW | S2S | S2SW)
weather model application to build; for example, ATMAQ for Online-CMAQ
(e.g. ATM | ATMAQ | ATMW | S2S | S2SW)
--ccpp="CCPP_SUITE1,CCPP_SUITE2..."
CCPP suites (CCPP_SUITES) to include in build; delimited with ','
--enable-options="OPTION1,OPTION2,..."
Expand Down Expand Up @@ -56,8 +56,7 @@ TARGETS
all = builds all apps
Or any combinations of (ufs, ufs_utils, upp, gsi, rrfs_utils)

NOTE: This script is for internal developer use only;
See User's Guide for detailed build instructions
NOTE: See User's Guide for detailed build instructions

EOF_USAGE
}
Expand Down Expand Up @@ -87,6 +86,8 @@ Settings:
BUILD_UPP=${BUILD_UPP}
BUILD_GSI=${BUILD_GSI}
BUILD_RRFS_UTILS=${BUILD_RRFS_UTILS}
BUILD_NEXUS=${BUILD_NEXUS}
BUILD_AQM_UTILS=${BUILD_AQM_UTILS}

EOF_SETTINGS
}
Expand Down Expand Up @@ -123,6 +124,8 @@ BUILD_UFS_UTILS="off"
BUILD_UPP="off"
BUILD_GSI="off"
BUILD_RRFS_UTILS="off"
BUILD_NEXUS="off"
BUILD_AQM_UTILS="off"

# Make options
CLEAN=false
Expand Down Expand Up @@ -182,36 +185,52 @@ while :; do
upp) DEFAULT_BUILD=false; BUILD_UPP="on" ;;
gsi) DEFAULT_BUILD=false; BUILD_GSI="on" ;;
rrfs_utils) DEFAULT_BUILD=false; BUILD_RRFS_UTILS="on" ;;
nexus) DEFAULT_BUILD=false; BUILD_NEXUS="on" ;;
aqm_utils) DEFAULT_BUILD=false; BUILD_AQM_UTILS="on" ;;
# unknown
-?*|?*) usage_error "Unknown option $1" ;;
*) break
esac
shift
done

# choose default apps to build
if [ "${DEFAULT_BUILD}" = true ]; then
BUILD_UFS="on"
BUILD_UFS_UTILS="on"
BUILD_UPP="on"
fi

# Ensure uppercase / lowercase ============================================
APPLICATION="${APPLICATION^^}"
PLATFORM="${PLATFORM,,}"
COMPILER="${COMPILER,,}"
EXTERNALS="${EXTERNALS^^}"

# check if PLATFORM is set
if [ -z $PLATFORM ] ; then
printf "\nERROR: Please set PLATFORM.\n\n"
usage
exit 0
fi

# set PLATFORM (MACHINE)
MACHINE="${PLATFORM}"
printf "PLATFORM(MACHINE)=${PLATFORM}\n" >&2

# choose default apps to build
if [ "${DEFAULT_BUILD}" = true ]; then
BUILD_UFS="on"
BUILD_UFS_UTILS="on"
BUILD_UPP="on"
fi

# Choose components to build for Online-CMAQ
if [ "${APPLICATION}" = "ATMAQ" ]; then
if [ "${DEFAULT_BUILD}" = true ]; then
BUILD_NEXUS="on"
BUILD_AQM_UTILS="on"
BUILD_UPP="off"
fi
if [ "${PLATFORM}" = "wcoss2" ]; then
BUILD_POST_STAT="on"
else
BUILD_POST_STAT="off"
fi
fi

set -eu

# automatically determine compiler
Expand Down Expand Up @@ -304,7 +323,8 @@ CMAKE_SETTINGS="\
-DBUILD_UFS_UTILS=${BUILD_UFS_UTILS}\
-DBUILD_UPP=${BUILD_UPP}\
-DBUILD_GSI=${BUILD_GSI}\
-DBUILD_RRFS_UTILS=${BUILD_RRFS_UTILS}"
-DBUILD_NEXUS=${BUILD_NEXUS}\
-DBUILD_AQM_UTILS=${BUILD_AQM_UTILS}"

if [ ! -z "${APPLICATION}" ]; then
CMAKE_SETTINGS="${CMAKE_SETTINGS} -DAPP=${APPLICATION}"
Expand All @@ -318,6 +338,29 @@ fi
if [ ! -z "${DISABLE_OPTIONS}" ]; then
CMAKE_SETTINGS="${CMAKE_SETTINGS} -DDISABLE_OPTIONS=${DISABLE_OPTIONS}"
fi
if [ "${APPLICATION}" = "ATMAQ" ]; then
CMAKE_SETTINGS="${CMAKE_SETTINGS} -DCPL_AQM=ON -DBUILD_POST_STAT=${BUILD_POST_STAT}"

# Copy module files to designated directory
EXTRN_BUILD_MOD_DIR="${SRW_DIR}/modulefiles/extrn_comp_build"
mkdir -p ${EXTRN_BUILD_MOD_DIR}
if [ "${BUILD_UFS}" = "on" ]; then
cp "${SRW_DIR}/sorc/ufs-weather-model/modulefiles/ufs_${PLATFORM}.${COMPILER}.lua" "${EXTRN_BUILD_MOD_DIR}/mod_ufs-weather-model.lua"
cp "${SRW_DIR}/sorc/ufs-weather-model/modulefiles/ufs_common.lua" ${EXTRN_BUILD_MOD_DIR}
fi
if [ "${BUILD_UFS_UTILS}" = "on" ]; then
cp "${SRW_DIR}/sorc/UFS_UTILS/modulefiles/build.${PLATFORM}.${COMPILER}.lua" "${EXTRN_BUILD_MOD_DIR}/mod_ufs-utils.lua"
fi
if [ "${BUILD_UPP}" = "on" ]; then
cp "${SRW_DIR}/sorc/UPP/modulefiles/${PLATFORM}.lua" "${EXTRN_BUILD_MOD_DIR}/mod_upp.lua"
fi
if [ "${BUILD_NEXUS}" = "on" ]; then
cp "${SRW_DIR}/sorc/AQM-utils/parm/nexus_modulefiles/${PLATFORM}.${COMPILER}.lua" "${EXTRN_BUILD_MOD_DIR}/mod_nexus.lua"
fi
if [ "${BUILD_AQM_UTILS}" = "on" ]; then
cp "${SRW_DIR}/sorc/AQM-utils/modulefiles/build_${PLATFORM}.${COMPILER}.lua" "${EXTRN_BUILD_MOD_DIR}/mod_aqm-utils.lua"
fi
fi

# make settings
MAKE_SETTINGS="-j ${BUILD_JOBS}"
Expand Down Expand Up @@ -393,6 +436,16 @@ if [ $USE_SUB_MODULES = true ]; then
printf "... Loading RRFS_UTILS modules ...\n"
load_module ""
fi
if [ $BUILD_NEXUS = "on" ]; then
printf "... Loading NEXUS modules ...\n"
module use ${SRW_DIR}/sorc/arl_nexus/modulefiles
load_module ""
fi
if [ $BUILD_AQM_UTILS = "on" ]; then
printf "... Loading AQM-utils modules ...\n"
module use ${SRW_DIR}/sorc/AQM-utils/modulefiles
load_module ""
fi
else
module use ${SRW_DIR}/modulefiles
module load ${MODULE_FILE}
Expand Down
Loading