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

Import: change restart file logic to option

parent f36fe1f4
No related branches found
No related tags found
No related merge requests found
......@@ -9,9 +9,10 @@ HELP=false
INTAKE_ONLY=false
SLURM_JOB_CPUS_PER_NODE=256
DEBUG=false
RESTART=
#% endhelp
while getopts b:B:d:D:e:Ehis:t:c:x OPTOPT
while getopts b:B:d:D:e:Ehis:t:c:r:x OPTOPT
do
case $OPTOPT in
#% help
......@@ -26,6 +27,7 @@ do
s) CUSTOM_SUBDIR=$OPTARG ;;
t) EXP_TYPE=$OPTARG ;;
c) SLURM_JOB_CPUS_PER_NODE=$OPTARG ;;
r) RESTART=$OPTARG ;;
x) DEBUG=true ;;
#% endhelp
*) exit 1;;
......@@ -150,12 +152,12 @@ cd '$WORK_DIR'
# SLURM_JOB_CPUS_PER_NODE is defined above
export SLURM_JOB_NUM_NODES SLURM_NODELIST SLURM_JOB_CPUS_PER_NODE
if [ "x$RESTART" != x ]
# Try to mimic restart logic
restart=.true.
case $RUN_SCRIPT in
*start*) restart=.false. ;;
esac
export restart
then
restart="$RESTART"
export restart
fi
echo "Running '$RUN_SCRIPT'" >&2
......
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