Mercurial > hg > cc > cirrus_home
changeset 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 | c8e41c543c0b |
children | f0bee28995f1 |
files | bin/dotest.sh bin/test.sh |
diffstat | 2 files changed, 21 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/dotest.sh Mon Oct 25 15:05:25 2021 +0000 @@ -0,0 +1,4 @@ +#!/usr/bin/bash +# Usage: dotest node task procArg + +echo $(date) executing with arg = $3 on cpu $1:$2:$PMI_FD
--- a/bin/test.sh Fri Oct 22 12:36:15 2021 +0000 +++ b/bin/test.sh Mon Oct 25 15:05:25 2021 +0000 @@ -1,5 +1,18 @@ #!/usr/bin/bash -# test master -echo $(date) $(hostname) \< "$1" -echo testing... $(pwd && ls && cat test_$1.txt) -echo $(date) $(hostname) $? \> +# Invoke this as e.g. sbatch --time=00:05:00 [--exclusive] -N 2 --ntasks-per-node 2 -c 2 masterJob.sh test +# run doTest.sh in parallel on 2 nodes, 2 tasks each, with input from test/n.t.txt +n=$SLURM_NTASKS +c=$SLURM_CPUS_PER_TASK +nodename=$SLURMD_NODENAME +task=$SLURM_LOCALID +node=$SLURM_NODEID +echo $(date) $nodename:$node:$task start + +#type parallel +#module load gnu-parallel + +export PYTHONPATH=$PYTHONPATH:$HOME/lib/python +parallel --will-cite -j $c dotest.sh $node $task '{}' < test.$node.$task.txt + +echo $(date) $nodename:$node:$task end +