comparison bin/test.sh @ 147:11d973ecff4e

change test to use Master
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Mon, 25 Oct 2021 15:05:25 +0000
parents a9a9f6f1832e
children 3213a8bb2ed1
comparison
equal deleted inserted replaced
146:c8e41c543c0b 147:11d973ecff4e
1 #!/usr/bin/bash 1 #!/usr/bin/bash
2 # test master 2 # Invoke this as e.g. sbatch --time=00:05:00 [--exclusive] -N 2 --ntasks-per-node 2 -c 2 masterJob.sh test
3 echo $(date) $(hostname) \< "$1" 3 # run doTest.sh in parallel on 2 nodes, 2 tasks each, with input from test/n.t.txt
4 echo testing... $(pwd && ls && cat test_$1.txt) 4 n=$SLURM_NTASKS
5 echo $(date) $(hostname) $? \> 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
11 #type parallel
12 #module load gnu-parallel
13
14 export PYTHONPATH=$PYTHONPATH:$HOME/lib/python
15 parallel --will-cite -j $c dotest.sh $node $task '{}' < test.$node.$task.txt
16
17 echo $(date) $nodename:$node:$task end
18