Mercurial > hg > cc > cirrus_home
comparison bin/runme_c.sh @ 184:53a8ffe06460
use csing, and _runme_c.sh to get it initialised
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Fri, 08 Sep 2023 21:44:48 +0100 |
parents | |
children | acae526510e2 |
comparison
equal
deleted
inserted
replaced
183:efaa10c1e9ea | 184:53a8ffe06460 |
---|---|
1 #!/usr/bin/bash | |
2 # Invoke this as e.g. sbatch --ntasks=10 -c 20 runme.sh [-m first last] [args for work/bin/_runme.sh] | |
3 # It will run on the login node | |
4 # -m i j will launch _runme.sh multiple times with a -a in {first..last} | |
5 | |
6 #SBATCH --time=01:00:00 | |
7 #SBATCH --partition=standard | |
8 #SBATCH --qos=standard | |
9 #SBATCH --account=ec184-hst | |
10 #SBATCH --job-name runme | |
11 | |
12 export W=/work/dc007/dc007 | |
13 | |
14 if [ "$1" = "-m" ] | |
15 then | |
16 ss={$2..$3} | |
17 shift; shift; shift; | |
18 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 | |
19 for i in $(eval echo $ss) | |
20 do | |
21 srun --unbuffered -c $SLURM_CPUS_PER_TASK $W/shared/bin/csing $W/hst/bin/_runme_c.sh -a $i "$@" | |
22 echo $(date) Finished $i | |
23 done | |
24 else | |
25 echo $(date) Launching $SLURM_JOB_NUM_NODES nodes in $(pwd) for runme_c "$@" from $(hostname) to do $SLURM_NTASKS tasks, $SLURM_CPUS_PER_TASK cpus each 1>&2 | |
26 | |
27 srun --unbuffered -c $SLURM_CPUS_PER_TASK $W/shared/bin/csing $W/hst/bin/_runme_c.sh "$@" | |
28 echo $(date) Finished | |
29 fi |