Skip to content

Commit

Permalink
Better optimize build jobs (more ufs jobs).
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Jan 22, 2024
1 parent ccc6e2d commit e304bbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions sorc/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ build_jobs["ufs"]=8
big_jobs=$((big_jobs+1))
build_opts["ufs"]="${_verbose_opt} ${_build_ufs_opt}"

build_jobs["upp"]=6 # The UPP is hardcoded to use 6 cores
build_jobs["upp"]=2
build_opts["upp"]=""

build_jobs["ufs_utils"]=3
build_jobs["ufs_utils"]=2
build_opts["ufs_utils"]="${_verbose_opt}"

build_jobs["gfs_utils"]=1
build_opts["gfs_utils"]="${_verbose_opt}"

build_jobs["ww3prepost"]=3
build_jobs["ww3prepost"]=2
build_opts["ww3prepost"]="${_verbose_opt} ${_build_ufs_opt}"

# Optional DA builds
Expand All @@ -142,7 +142,7 @@ if [[ "${_build_gsi}" == "YES" ]]; then
build_opts["gsi_enkf"]="${_verbose_opt}"
fi
if [[ "${_build_gsi}" == "YES" || "${_build_ufsda}" == "YES" ]] ; then
build_jobs["gsi_utils"]=2
build_jobs["gsi_utils"]=1
build_opts["gsi_utils"]="${_verbose_opt}"
if [[ "${MACHINE_ID}" == "hercules" ]]; then
echo "NOTE: The GSI Monitor is not supported on Hercules. Disabling build."
Expand Down
5 changes: 3 additions & 2 deletions sorc/build_upp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ cd "${script_dir}" || exit 1

OPTIND=1
_opts=""
while getopts ":dv" option; do
while getopts ":dvj:" option; do
case "${option}" in
d) _opts+="-d ";;
v) _opts+="-v ";;
j) export BUILD_JOBS="${OPTARG}"; echo success ;;
:)
echo "[${BASH_SOURCE[0]}]: ${option} requires an argument"
;;
Expand All @@ -27,4 +28,4 @@ fi

cd ufs_model.fd/FV3/upp/tests
# shellcheck disable=SC2086
./compile_upp.sh ${_opts}
BUILD_JOBS=${BUILD_JOBS:-8} ./compile_upp.sh ${_opts}

0 comments on commit e304bbe

Please sign in to comment.