diff --git a/importexp b/importexp index b191b3cf89d4a961ad49bc447ab350070b3b2f90..7635582ef6c1c6f3bb595de7416568913107fbd7 100755 --- a/importexp +++ b/importexp @@ -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