Skip to content

Commit

Permalink
Set default CPU count in checkout().
Browse files Browse the repository at this point in the history
Co-authored-by: Rahul Mahajan <[email protected]>
  • Loading branch information
DavidHuber-NOAA and aerorahul committed Oct 23, 2023
1 parent 3a3bddd commit ef3731e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions sorc/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function checkout() {
# logdir [default: $(pwd)]: where you want logfiles written
# CLEAN [default: NO]: whether to delete existing directories and create a fresh clone
#
# Usage: checkout <dir> <remote> <cpus> <version>
# Usage: checkout <dir> <remote> <version> <cpus> <reccursive>
#
# Arguments
# dir: Directory for the clone
Expand All @@ -48,7 +48,7 @@ function checkout() {
dir="$1"
remote="$2"
version="$3"
cpus="$4"
cpus="${4:-1}" # Default 1 thread
recursive=${5:-"YES"}

name=$(echo "${dir}" | cut -d '.' -f 1)
Expand Down Expand Up @@ -154,22 +154,22 @@ errs=0
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" &
checkout "verif-global.fd" "https://github.com/NOAA-EMC/EMC_verif-global.git" "c267780" "1" &
checkout "wxflow" "https://github.com/NOAA-EMC/wxflow" "528f5ab" &
checkout "gfs_utils.fd" "https://github.com/NOAA-EMC/gfs-utils" "a283262" &
checkout "ufs_utils.fd" "https://github.com/ufs-community/UFS_UTILS.git" "72a0471" &
checkout "verif-global.fd" "https://github.com/NOAA-EMC/EMC_verif-global.git" "c267780" &

if [[ ${checkout_gsi} == "YES" ]]; then
checkout "gsi_enkf.fd" "https://github.com/NOAA-EMC/GSI.git" "ca19008" "1" "NO" &
fi

if [[ ${checkout_gdas} == "YES" ]]; then
checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "d347d22" "1" &
checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "d347d22" &
fi

if [[ ${checkout_gsi} == "YES" || ${checkout_gdas} == "YES" ]]; then
checkout "gsi_utils.fd" "https://github.com/NOAA-EMC/GSI-Utils.git" "322cc7b" "1" &
checkout "gsi_monitor.fd" "https://github.com/NOAA-EMC/GSI-Monitor.git" "45783e3" "1" &
checkout "gsi_utils.fd" "https://github.com/NOAA-EMC/GSI-Utils.git" "322cc7b" &
checkout "gsi_monitor.fd" "https://github.com/NOAA-EMC/GSI-Monitor.git" "45783e3" &
fi

# Go through each PID and verify no errors were reported.
Expand Down

0 comments on commit ef3731e

Please sign in to comment.