Skip to content

Commit

Permalink
Update to match gfs-util machine changes
Browse files Browse the repository at this point in the history
A recent update changed the name of the script that determines the
machine to `detect_machine.sh`, so scripts that call that script
had to be updated. The variable name holding the machine name has
also changed (from `$target` to `$MACHINE_ID`) and it may now
include a compiler at the end, so changes were necessary to account
for that.

The WW3 build is changed completely to use the UFS modules instead
of maintaining separate modules in workflow that may use different
module versions.

Refs NOAA-EMC#1086
  • Loading branch information
WalterKolczynski-NOAA committed Oct 23, 2022
1 parent 9118ab3 commit d3cd70a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 102 deletions.
23 changes: 0 additions & 23 deletions modulefiles/modulefile.ww3.hera.lua

This file was deleted.

25 changes: 0 additions & 25 deletions modulefiles/modulefile.ww3.orion.lua

This file was deleted.

21 changes: 0 additions & 21 deletions modulefiles/modulefile.ww3.s4.lua

This file was deleted.

22 changes: 0 additions & 22 deletions modulefiles/modulefile.ww3.wcoss2.lua

This file was deleted.

8 changes: 4 additions & 4 deletions sorc/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ fi
#------------------------------------
# GET MACHINE
#------------------------------------
target=""
export COMPILER="intel"
# shellcheck disable=SC1091
source gfs_utils.fd/ush/machine-setup.sh > /dev/null 2>&1
source gfs_utils.fd/ush/detect_machine.sh
# shellcheck disable=
if [[ -z "${target}" ]]; then
if [[ -z "${MACHINE_ID}" ]]; then
echo "FATAL: Unable to determine target machine"
exit 1
fi
Expand All @@ -88,7 +88,7 @@ fi
# shellcheck source-path=sorc
source ./partial_build.sh $_verbose_opt $_partial_opt

if [[ ${target} == "jet" ]]; then
if [[ ${MACHINE_ID} =~ "jet.*" ]]; then
Build_gldas="false"
Build_ww3_prepost="false"
fi
Expand Down
10 changes: 6 additions & 4 deletions sorc/build_gdas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ script_dir=$(dirname "${BASH_SOURCE[0]}")
cd "${script_dir}" || exit 1

# shellcheck disable=SC1091
source gfs_utils.fd/ush/machine-setup.sh > /dev/null 2>&1
source gfs_utils.fd/ush/detect_machine.sh
# shellcheck disable=

export BUILD_TARGET="${target}"
# detect_machine now includes the compiler on some machines
# but the GDAS build script does not want it
MACHINE_ID=$(echo ${MACHINE_ID} | cut -d "." -f 1)

# use more build jobs if on NOAA HPC
build_jobs=4
case "${target}" in
case "${MACHINE_ID}" in
hera|orion)
build_jobs=10
;;
Expand All @@ -24,7 +26,7 @@ if [ ! -d "../exec" ]; then
fi

cd gdas.cd
BUILD_JOBS="${build_jobs}" ./build.sh -t "${BUILD_TARGET}"
BUILD_JOBS="${build_jobs}" ./build.sh -t "${MACHINE_ID}"

exit

7 changes: 4 additions & 3 deletions sorc/build_ww3prepost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ set -x
script_dir=$(dirname "${BASH_SOURCE[0]}")
cd "${script_dir}" || exit 1

export RT_COMPILER="intel"
# shellcheck disable=SC1091
source gfs_utils.fd/ush/machine-setup.sh > /dev/null 2>&1
source ${script_dir}/ufs_model.fd/tests/detect_machine.sh
# shellcheck disable=

# Default settings
Expand Down Expand Up @@ -44,8 +45,8 @@ finalexecdir=$( pwd -P )/../exec

#Determine machine and load modules
set +x
module use ../modulefiles
module load modulefile.ww3.${target}
module use ${script_dir}/ufs_model.fd/modulefiles
module load ufs_${MACHINE_ID}
set -x

#Set WW3 directory, switch, prep and post exes
Expand Down

0 comments on commit d3cd70a

Please sign in to comment.