Skip to content

Commit 63c336c

Browse files
committed
Fix error handling for icon-art
1 parent 6c3b1eb commit 63c336c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cases/icon-art-global-test/icon_runjob.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,13 @@ EOF
389389
# run the model!
390390
# ----------------------------------------------------------------------
391391
handle_error(){{
392+
set +e
392393
# Check for invalid pointer error at the end of icon-art
393394
if grep -q "free(): invalid pointer" {cfg.logfile} && grep -q "clean-up finished" {cfg.logfile}; then
394395
exit 0
395396
else
396397
exit 1
397398
fi
399+
set -e
398400
}}
399401
srun ./{cfg.icon_execname} || handle_error

cases/icon-art-oem-test/icon_runjob.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,13 @@ EOF
369369
# run the model!
370370
# ----------------------------------------------------------------------
371371
handle_error(){{
372+
set +e
372373
# Check for invalid pointer error at the end of icon-art
373374
if grep -q "free(): invalid pointer" {cfg.logfile} && grep -q "clean-up finished" {cfg.logfile}; then
374375
exit 0
375376
else
376377
exit 1
377378
fi
379+
set -e
378380
}}
379381
srun ./{cfg.icon_execname} || handle_error

0 commit comments

Comments
 (0)