Mercurial > hg > cc > cirrus_home
comparison bin/test.sh @ 167:3213a8bb2ed1
new style batch jobs, see cirrus_work repo for _xxx.sh
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Mon, 18 Jul 2022 19:16:20 +0100 |
parents | 11d973ecff4e |
children |
comparison
equal
deleted
inserted
replaced
166:afd7879181c9 | 167:3213a8bb2ed1 |
---|---|
1 #!/usr/bin/bash | 1 #!/usr/bin/bash |
2 # Invoke this as e.g. sbatch --time=00:05:00 [--exclusive] -N 2 --ntasks-per-node 2 -c 2 masterJob.sh test | 2 # Invoke this as e.g. sbatch --time=00:05:00 [--exclusive] --ntasks=6 -c 13 ~/bin/test.sh |
3 # run doTest.sh in parallel on 2 nodes, 2 tasks each, with input from test/n.t.txt | 3 # run _test.sh in parallel on 3 nodes, 2 tasks each |
4 n=$SLURM_NTASKS | |
5 c=$SLURM_CPUS_PER_TASK | |
6 nodename=$SLURMD_NODENAME | |
7 task=$SLURM_LOCALID | |
8 node=$SLURM_NODEID | |
9 echo $(date) $nodename:$node:$task start | |
10 | 4 |
11 #type parallel | 5 #SBATCH --time=00:01:00 |
12 #module load gnu-parallel | 6 #SBATCH --partition=standard |
7 #SBATCH --qos=standard | |
8 #SBATCH --account=ec184-guest | |
9 #SBATCH --job-name test | |
13 | 10 |
14 export PYTHONPATH=$PYTHONPATH:$HOME/lib/python | 11 export W=/work/dc007/dc007 |
15 parallel --will-cite -j $c dotest.sh $node $task '{}' < test.$node.$task.txt | |
16 | 12 |
17 echo $(date) $nodename:$node:$task end | 13 echo $(date) Launching $SLURM_JOB_NUM_NODES nodes for test "$@" from $(hostname) to do $SLURM_NTASKS tasks, $SLURM_CPUS_PER_TASK cpus each |
18 | 14 |
15 srun -c $SLURM_CPUS_PER_TASK $W/shared/bin/sing $W/hst/bin/_test.sh "$@" | |
16 | |
17 |