Skip to content

Commit

Permalink
Update UFS hash and update compile signature (NOAA-EMC#1690)
Browse files Browse the repository at this point in the history
Updates the UFS hash to bf60924. This required a change in the compile signature due to changes in UFS to how the compiler is defined.
  • Loading branch information
aerorahul authored Jun 14, 2023
1 parent 1e7657c commit 7ede78d
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 60 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/hera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')"
LABELS=$(echo "$LABELS1" | tr '\n' ' ')
echo "labels=$LABELS" >> $GITHUB_OUTPUT
passed:
if: contains( needs.getlabels.outputs.labels, 'CI-Hera-Passed') && github.event.pull_request.merged
runs-on: ubuntu-latest
needs:
- getlabels

steps:
- name: Passed
uses: schneegans/[email protected]
Expand All @@ -39,16 +39,16 @@ jobs:
auth: ${{ secrets.CLI_DYNAMIC_BADGES }}
gistID: e35aa2904a54deae6bbb1fdc2d960c71
filename: hera.json
label: Hera
message: Passed
label: hera
message: passing
color: green

failed:
if: contains( needs.getlabels.outputs.labels, 'CI-Hera-Failed') && github.event.pull_request.merged
runs-on: ubuntu-latest
needs:
- getlabels

steps:
- name: Failed
uses: schneegans/[email protected]
Expand All @@ -57,8 +57,8 @@ jobs:
auth: ${{ secrets.CLI_DYNAMIC_BADGES }}
gistID: e35aa2904a54deae6bbb1fdc2d960c71
filename: hera.json
label: Hera
message: Failed
label: hera
message: failing
color: red


Expand All @@ -67,15 +67,15 @@ jobs:
runs-on: ubuntu-latest
needs:
- getlabels

steps:
- name: Pending
uses: schneegans/[email protected]
with:
forceUpdate: true
auth: ${{ secrets.CLI_DYNAMIC_BADGES }}
gistID: e35aa2904a54deae6bbb1fdc2d960c71
filename: oroin.json
label: Hera
message: Pending
color: gray
filename: hera.json
label: hera
message: pending
color: orange
28 changes: 14 additions & 14 deletions .github/workflows/orion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
outputs:
labels: ${{ steps.id.outputs.labels }}
steps:
- name: Get Lables Steps
- name: Get Label Steps
id: id
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -24,13 +24,13 @@ jobs:
LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')"
LABELS=$(echo "$LABELS1" | tr '\n' ' ')
echo "labels=$LABELS" >> $GITHUB_OUTPUT
passed:
if: contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') && github.event.pull_request.merged
runs-on: ubuntu-latest
needs:
- getlabels

steps:
- name: Passed
uses: schneegans/[email protected]
Expand All @@ -39,16 +39,16 @@ jobs:
auth: ${{ secrets.CLI_DYNAMIC_BADGES }}
gistID: e35aa2904a54deae6bbb1fdc2d960c71
filename: orion.json
label: Orion
message: Passed
label: orion
message: passing
color: green

failed:
if: contains( needs.getlabels.outputs.labels, 'CI-Orion-Failed') && github.event.pull_request.merged
runs-on: ubuntu-latest
needs:
- getlabels

steps:
- name: Failed
uses: schneegans/[email protected]
Expand All @@ -57,8 +57,8 @@ jobs:
auth: ${{ secrets.CLI_DYNAMIC_BADGES }}
gistID: e35aa2904a54deae6bbb1fdc2d960c71
filename: orion.json
label: Orion
message: Failed
label: orion
message: failing
color: red


Expand All @@ -67,15 +67,15 @@ jobs:
runs-on: ubuntu-latest
needs:
- getlabels

steps:
- name: Pending
uses: schneegans/[email protected]
with:
forceUpdate: true
auth: ${{ secrets.CLI_DYNAMIC_BADGES }}
gistID: e35aa2904a54deae6bbb1fdc2d960c71
filename: oroin.json
label: Orion
message: Pending
color: gray
filename: orion.json
label: orion
message: pending
color: orange
2 changes: 1 addition & 1 deletion Externals.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# External sub-modules of global-workflow

[UFS]
tag = 2247060
tag = bf60924
local_path = sorc/ufs_model.fd
repo_url = https://github.com/ufs-community/ufs-weather-model.git
protocol = git
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
[![pynorms](https://github.com/NOAA-EMC/global-workflow/actions/workflows/pynorms.yaml/badge.svg)](https://github.com/NOAA-EMC/global-workflow/actions/workflows/pynorms.yaml)
[![pytests](https://github.com/NOAA-EMC/global-workflow/actions/workflows/pytests.yaml/badge.svg)](https://github.com/NOAA-EMC/global-workflow/actions/workflows/pytests.yaml)

CI Workflow Status

![Custom badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/emcbot/e35aa2904a54deae6bbb1fdc2d960c71/raw/hera.json)
![Custom badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/emcbot/e35aa2904a54deae6bbb1fdc2d960c71/raw/orion.json)

Expand Down
12 changes: 6 additions & 6 deletions sorc/build_ufs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ cwd=$(pwd)

# Default settings
APP="S2SWA"
CCPP_SUITES="FV3_GFS_v16,FV3_GFS_v16_no_nsst,FV3_GFS_v16_ugwpv1,FV3_GFS_v17_p8,FV3_GFS_v16_coupled_nsstNoahmpUGWPv1,FV3_GFS_v17_coupled_p8"

export RT_COMPILER="intel"
source "${cwd}/ufs_model.fd/tests/detect_machine.sh"
source "${cwd}/ufs_model.fd/tests/module-setup.sh"
CCPP_SUITES="FV3_GFS_v16,FV3_GFS_v16_no_nsst,FV3_GFS_v16_ugwpv1,FV3_GFS_v17_p8,FV3_GFS_v16_coupled_nsstNoahmpUGWPv1,FV3_GFS_v17_coupled_p8" # TODO: does the g-w need to build with all these CCPP_SUITES?

while getopts ":da:v" option; do
case "${option}" in
Expand All @@ -27,15 +23,19 @@ done

cd "${cwd}/ufs_model.fd"

source "./tests/detect_machine.sh"
source "./tests/module-setup.sh"

MAKE_OPT="-DAPP=${APP} -D32BIT=ON -DCCPP_SUITES=${CCPP_SUITES}"
[[ ${BUILD_TYPE:-"Release"} = "DEBUG" ]] && MAKE_OPT+=" -DDEBUG=ON"
COMPILE_NR=0
CLEAN_BEFORE=YES
CLEAN_AFTER=NO

./tests/compile.sh "${MACHINE_ID}" "${MAKE_OPT}" "${COMPILE_NR}" "${CLEAN_BEFORE}" "${CLEAN_AFTER}"
./tests/compile.sh "${MACHINE_ID}" "${MAKE_OPT}" "${COMPILE_NR}" "intel" "${CLEAN_BEFORE}" "${CLEAN_AFTER}"
mv "./tests/fv3_${COMPILE_NR}.exe" ./tests/ufs_model.x
mv "./tests/modules.fv3_${COMPILE_NR}.lua" ./tests/modules.ufs_model.lua
cp "./modulefiles/ufs_common.lua" ./tests/ufs_common.lua
cp "./modulefiles/ufs_common_spack.lua" ./tests/ufs_common_spack.lua

exit 0
5 changes: 2 additions & 3 deletions sorc/build_upp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ cd "${script_dir}" || exit 1

OPTIND=1
_opts=""
while getopts ":dov" option; do
while getopts ":dv" option; do
case "${option}" in
d) export BUILD_TYPE="DEBUG";;
o) _opts+="-g ";;
d) _opts+="-d ";;
v) _opts+="-v ";;
:)
echo "[${BASH_SOURCE[0]}]: ${option} requires an argument"
Expand Down
38 changes: 18 additions & 20 deletions sorc/build_ww3prepost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ set -x
script_dir=$(dirname "${BASH_SOURCE[0]}")
cd "${script_dir}" || exit 1

export RT_COMPILER="intel"
source "${script_dir}/ufs_model.fd/tests/detect_machine.sh"
source "${script_dir}/ufs_model.fd/tests/module-setup.sh"

# Default settings
APP="S2SWA"

Expand All @@ -27,12 +23,12 @@ while getopts "a:v" option; do
done


# Determine which switch to use
if [[ "${APP}" == "ATMW" ]]; then
# Determine which switch to use
if [[ "${APP}" == "ATMW" ]]; then
ww3switch="model/esmf/switch"
else
else
ww3switch="model/bin/switch_meshcap"
fi
fi


# Check final exec folder exists
Expand All @@ -44,11 +40,13 @@ finalexecdir="$( pwd -P )/../exec"

#Determine machine and load modules
set +x
source "${script_dir}/ufs_model.fd/tests/detect_machine.sh"
source "${script_dir}/ufs_model.fd/tests/module-setup.sh"
module use "${script_dir}/ufs_model.fd/modulefiles"
module load "ufs_${MACHINE_ID}"
module load "ufs_${MACHINE_ID}.intel"
set -x

#Set WW3 directory, switch, prep and post exes
#Set WW3 directory, switch, prep and post exes
cd ufs_model.fd/WW3 || exit 1
WW3_DIR=$( pwd -P )
export WW3_DIR
Expand All @@ -58,11 +56,11 @@ export SWITCHFILE="${WW3_DIR}/${ww3switch}"
prep_exes="ww3_grid ww3_prep ww3_prnc ww3_grid"
post_exes="ww3_outp ww3_outf ww3_outp ww3_gint ww3_ounf ww3_ounp ww3_grib"

#create build directory:
#create build directory:
path_build="${WW3_DIR}/build_SHRD"
mkdir -p "${path_build}" || exit 1
cd "${path_build}" || exit 1
echo "Forcing a SHRD build"
echo "Forcing a SHRD build"

cat "${SWITCHFILE}" > "${path_build}/tempswitch"

Expand All @@ -77,26 +75,26 @@ sed -e "s/DIST/SHRD/g"\
"${path_build}/tempswitch" > "${path_build}/switch"
rm "${path_build}/tempswitch"

echo "Switch file is ${path_build}/switch with switches:"
echo "Switch file is ${path_build}/switch with switches:"
cat "${path_build}/switch"

#Build executables:
cmake "${WW3_DIR}" -DSWITCH="${path_build}/switch" -DCMAKE_INSTALL_PREFIX=install
#Build executables:
cmake "${WW3_DIR}" -DSWITCH="${path_build}/switch" -DCMAKE_INSTALL_PREFIX=install
rc=$?
if (( rc != 0 )); then
echo "Fatal error in cmake."
exit "${rc}"
fi
make -j 8
make -j 8
rc=$?
if (( rc != 0 )); then
echo "Fatal error in make."
exit "${rc}"
fi
make install
make install
if (( rc != 0 )); then
echo "Fatal error in make install."
exit "${rc}"
exit "${rc}"
fi

# Copy to top-level exe directory
Expand All @@ -110,8 +108,8 @@ for prog in ${prep_exes} ${post_exes}; do
done

#clean-up build directory:
echo "executables are in ${finalexecdir}"
echo "cleaning up ${path_build}"
echo "executables are in ${finalexecdir}"
echo "cleaning up ${path_build}"
rm -rf "${path_build}"

exit 0
2 changes: 1 addition & 1 deletion sorc/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ mkdir -p "${logdir}"
errs=0
checkout "gfs_utils.fd" "https://github.com/NOAA-EMC/gfs-utils" "8965258" ; errs=$((errs + $?))
checkout "ufs_utils.fd" "https://github.com/ufs-community/UFS_UTILS.git" "72a0471" ; errs=$((errs + $?))
checkout "ufs_model.fd" "https://github.com/ufs-community/ufs-weather-model" "${ufs_model_hash:-2247060}" ; errs=$((errs + $?))
checkout "ufs_model.fd" "https://github.com/ufs-community/ufs-weather-model" "${ufs_model_hash:-bf60924}" ; errs=$((errs + $?))
checkout "verif-global.fd" "https://github.com/NOAA-EMC/EMC_verif-global.git" "c267780" ; errs=$((errs + $?))

if [[ ${checkout_gsi} == "YES" ]]; then
Expand Down

0 comments on commit 7ede78d

Please sign in to comment.