Mercurial > hg > cc > cirrus_home
annotate bin/test.sh @ 158:f5e2211b50bd
do whole line
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Wed, 06 Jul 2022 18:00:53 +0100 |
parents | 11d973ecff4e |
children | 3213a8bb2ed1 |
rev | line source |
---|---|
25 | 1 #!/usr/bin/bash |
147
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
2 # Invoke this as e.g. sbatch --time=00:05:00 [--exclusive] -N 2 --ntasks-per-node 2 -c 2 masterJob.sh test |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
3 # run doTest.sh in parallel on 2 nodes, 2 tasks each, with input from test/n.t.txt |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
4 n=$SLURM_NTASKS |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
5 c=$SLURM_CPUS_PER_TASK |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
6 nodename=$SLURMD_NODENAME |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
7 task=$SLURM_LOCALID |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
8 node=$SLURM_NODEID |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
9 echo $(date) $nodename:$node:$task start |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
10 |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
11 #type parallel |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
12 #module load gnu-parallel |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
13 |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
14 export PYTHONPATH=$PYTHONPATH:$HOME/lib/python |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
15 parallel --will-cite -j $c dotest.sh $node $task '{}' < test.$node.$task.txt |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
16 |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
17 echo $(date) $nodename:$node:$task end |
11d973ecff4e
change test to use Master
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
26
diff
changeset
|
18 |