Skip to content

Commit

Permalink
Add comments to clarify multithreading in checkout.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Oct 23, 2023
1 parent c8534c8 commit 3a3bddd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sorc/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ source "${topdir}/../workflow/gw_setup.sh"

# The checkout version should always be a speciifc commit (hash or tag), not a branch
errs=0
# Checkout UFS submodules in parallel
checkout "ufs_model.fd" "https://github.com/ufs-community/ufs-weather-model" "${ufs_model_hash:-4d05445}" "8" ; errs=$((errs + $?))

# Run all other checkouts simultaneously with just 1 core each to handle submodules.
checkout "wxflow" "https://github.com/NOAA-EMC/wxflow" "528f5ab" "1" &
checkout "gfs_utils.fd" "https://github.com/NOAA-EMC/gfs-utils" "a283262" "1" &
checkout "ufs_utils.fd" "https://github.com/ufs-community/UFS_UTILS.git" "72a0471" "1" &
Expand All @@ -170,6 +172,7 @@ if [[ ${checkout_gsi} == "YES" || ${checkout_gdas} == "YES" ]]; then
checkout "gsi_monitor.fd" "https://github.com/NOAA-EMC/GSI-Monitor.git" "45783e3" "1" &
fi

# Go through each PID and verify no errors were reported.
for checkout_pid in $(jobs -p); do
wait "${checkout_pid}" || errs=$((errs + $?))
done
Expand Down

0 comments on commit 3a3bddd

Please sign in to comment.