Skip to content
Snippets Groups Projects
Commit 0f6769e6 authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

Import: adapt model start detection for inserts

parent 8798fb06
No related branches found
No related tags found
No related merge requests found
......@@ -94,14 +94,15 @@ do
# 4. to handle external scripts, replace working dir with tmp dir
# 5. to handle external scripts, replace ./ calls appropriately
# 6. to handle external scripts, replace build and model dirs appropriately
# 7. use original model base for executable
# 7. ignore function make_and_change_to_experiment_dir
# 8. use original model base for executable
if $IGNORE_ERRORS
then
REMOVE_ERROR_FLAG_SH='
s:^(\s*)(set\s+-e\s*$|(set\s+-\w+)e):\1\3:
s@^(\s*)check_error@\1: check_error@
s:^(\s*)\$\{START\}:\1exit # ${START}:
s:^(\s*)(\$\{START\}|srun):\1exit # \2:
'
REMOVE_ERROR_FLAG_PL='\s+-e\s*$|(\s+-\w+)e|'
fi
......@@ -127,7 +128,7 @@ done\
s@^(\s*)(cat\s+\$thisscript)@\1: \2@
2 i\
cd '$WORK_DIR'
/^\s*(\$\{START\}|srun)/ i'"$SHOW_HERE_DOCS"'
/^\s*#.*start\s+experiment/i i'"$SHOW_HERE_DOCS"'
s:^(\s*)(set\s+\+x\s*$|(set\s+\+\w+)x):\1\3:
'"${REMOVE_ERROR_FLAG_SH-}"'
s:^(\s*)SCRIPT_DIR=.*$:\1SCRIPT_DIR='$WORK_DIR':
......@@ -139,6 +140,7 @@ cd '$WORK_DIR'
'${SUBST_BUILD_DIR-}'
'${SUBST_MODEL_DIR-}'
'${SUBST_basedir-}'
s/^\s*make_and_change_to_experiment_dir/: &/
' "$RUN_SCRIPT" > $RUN_FILE
# Get script shell without possible +x/-e settings
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment