Skip to content

Commit

Permalink
Clean the ww3prepost build dir; address shellcheck warnings NOAA-EMC#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Oct 31, 2023
1 parent 50e3769 commit 7f3f3ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sorc/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,21 +194,21 @@ declare -A build_ids
builds_started=0
# Now start looping through all of the jobs until everything is done
while [[ ${builds_started} -lt ${#build_jobs[@]} ]]; do
for build in ${!build_jobs[@]}; do
for build in "${!build_jobs[@]}"; do
# Has the job started?
if [[ -n "${build_jobs[${build}]+0}" && -z "${build_ids[${build}]+0}" ]]; then
# Do we have enough processors to run it?
if [[ ${_build_job_max} -ge $(( build_jobs[build] + procs_in_use )) ]]; then
if [[ "${build}" != "upp" ]]; then
./build_${build}.sh -j "${build_jobs[${build}]}" "${build_opts[${build}]}" > \
"./build_${build}.sh" -j "${build_jobs[${build}]}" "${build_opts[${build}]}" > \
"${logs_dir}/build_${build}.log" 2>&1 &
else
./build_${build}.sh "${build_opts[${build}]}" > \
"./build_${build}.sh" "${build_opts[${build}]}" > \
"${logs_dir}/build_${build}.log" 2>&1 &
fi
build_ids["${build}"]=$!
echo "Starting build_${build}.sh"
procs_in_use=$(( procs_in_use + build_jobs['${build}'] ))
procs_in_use=$(( procs_in_use + build_jobs[${build}] ))
fi
fi
done
Expand Down
1 change: 1 addition & 0 deletions sorc/build_ww3prepost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ post_exes="ww3_outp ww3_outf ww3_outp ww3_gint ww3_ounf ww3_ounp ww3_grib"

#create build directory:
path_build="${WW3_DIR}/build_SHRD"
[[ -d "${path_build}" ]] && rm -rf "${path_build}"
mkdir -p "${path_build}" || exit 1
cd "${path_build}" || exit 1
echo "Forcing a SHRD build"
Expand Down

0 comments on commit 7f3f3ee

Please sign in to comment.