We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There are several places in the env/* files and possibly elsewhere that have half-logical statements. For example,
env/*
global-workflow/env/HERA.env
Line 277 in 3d6c13e
If the logical returns False, then this will cause a failure if set -e is enabled as it return a non-zero status.
False
set -e
These logical checks should be replaced with if blocks or have || true appended to them.
if
All or N/A
3d6c13e
Run a gempak job on Hera.
Reported by @AntonMFernando-NOAA.
For the case above, this line should be either
[[ ${NTHREADS_GEMPAK} -gt ${max_threads_per_task} ]] && export NTHREADS_GEMPAK=${max_threads_per_task} || true
expanded to
if [[ ${NTHREADS_GEMPAK} -gt ${max_threads_per_task} ]]; then export NTHREADS_GEMPAK=${max_threads_per_task} fi
All such examples should be addressed in the code.
The text was updated successfully, but these errors were encountered:
Personally, I'd prefer removing all the short-circuits and only use if/else, even though it is more verbose. See also https://mywiki.wooledge.org/BashPitfalls#cmd1_.26.26_cmd2_.7C.7C_cmd3
Sorry, something went wrong.
Updated the description and title to reflect that.
DavidHuber-NOAA
Successfully merging a pull request may close this issue.
What is wrong?
There are several places in the
env/*
files and possibly elsewhere that have half-logical statements. For example,global-workflow/env/HERA.env
Line 277 in 3d6c13e
If the logical returns
False
, then this will cause a failure ifset -e
is enabled as it return a non-zero status.What should have happened?
These logical checks should be replaced with
if
blocksor have || true appended to them.What machines are impacted?
All or N/A
What global-workflow hash are you using?
3d6c13e
Steps to reproduce
Run a gempak job on Hera.
Additional information
Reported by @AntonMFernando-NOAA.
Do you have a proposed solution?
For the case above, this line should be
either[[ ${NTHREADS_GEMPAK} -gt ${max_threads_per_task} ]] && export NTHREADS_GEMPAK=${max_threads_per_task} || trueexpanded to
All such examples should be addressed in the code.
The text was updated successfully, but these errors were encountered: