Skip to content

Commit

Permalink
Fix error handling for icon-art
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaehn committed Feb 22, 2024
1 parent 6c3b1eb commit 63c336c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cases/icon-art-global-test/icon_runjob.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,13 @@ EOF
# run the model!
# ----------------------------------------------------------------------
handle_error(){{
set +e
# Check for invalid pointer error at the end of icon-art
if grep -q "free(): invalid pointer" {cfg.logfile} && grep -q "clean-up finished" {cfg.logfile}; then
exit 0
else
exit 1
fi
set -e
}}
srun ./{cfg.icon_execname} || handle_error
2 changes: 2 additions & 0 deletions cases/icon-art-oem-test/icon_runjob.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,13 @@ EOF
# run the model!
# ----------------------------------------------------------------------
handle_error(){{
set +e
# Check for invalid pointer error at the end of icon-art
if grep -q "free(): invalid pointer" {cfg.logfile} && grep -q "clean-up finished" {cfg.logfile}; then
exit 0
else
exit 1
fi
set -e
}}
srun ./{cfg.icon_execname} || handle_error

0 comments on commit 63c336c

Please sign in to comment.