Mercurial > hg > cc > cirrus_home
diff bin/runme_c.sh @ 185:acae526510e2
too many overdue updates to break down
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Wed, 06 Dec 2023 13:38:58 +0000 |
parents | 53a8ffe06460 |
children |
line wrap: on
line diff
--- a/bin/runme_c.sh Fri Sep 08 21:44:48 2023 +0100 +++ b/bin/runme_c.sh Wed Dec 06 13:38:58 2023 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/bash -# Invoke this as e.g. sbatch --ntasks=10 -c 20 runme.sh [-m first last] [args for work/bin/_runme.sh] +# Invoke this as e.g. sbatch --ntasks=10 -c 20 runme.sh [-m ( '{...}' | first last)] [args for work/bin/_runme.sh] # It will run on the login node -# -m i j will launch _runme.sh multiple times with a -a in {first..last} +# -m i j will launch _runme.sh multiple times with a -a in {...} or {first..last} #SBATCH --time=01:00:00 #SBATCH --partition=standard @@ -13,8 +13,15 @@ if [ "$1" = "-m" ] then - ss={$2..$3} - shift; shift; shift; + shift + if [[ "$1" == {*} ]] + then + ss="$1" + shift + else + ss={$1..$2} + shift; shift + fi echo $(date) Launching $SLURM_JOB_NUM_NODES nodes in $(pwd) for runme_c -a $ss "$@" from $(hostname) to do $SLURM_NTASKS tasks, $SLURM_CPUS_PER_TASK cpus each 1>&2 for i in $(eval echo $ss) do