annotate bin/masterMaster.sh @ 82:6304d5c46229

trying to move to slurm
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Wed, 03 Mar 2021 19:33:56 +0000
parents e34cda3e7483
children 2fc33145242b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21
a598469733d3 more job scripts
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 #!/bin/bash
82
6304d5c46229 trying to move to slurm
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 34
diff changeset
2 # This runs on login machine to launch the real task (named by $1) on two machines
6304d5c46229 trying to move to slurm
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 34
diff changeset
3 # Any further args are passed to $task.sh
21
a598469733d3 more job scripts
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
4 echo $(date) Launching master workers for "$@"
34
e34cda3e7483 pass through extract args
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 33
diff changeset
5 task=$1
e34cda3e7483 pass through extract args
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 33
diff changeset
6 shift
82
6304d5c46229 trying to move to slurm
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 34
diff changeset
7 nodes=($(scontrol show hostname "$SLURM_JOB_NODELIST"))
6304d5c46229 trying to move to slurm
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 34
diff changeset
8 seq 1 -1 0 | parallel --will-cite --joblog master_$task.log -S ${nodes[1]} -S ${nodes[0]} -N 1 --workdir /dev/shm --transferfile ${task}_'{}'.txt $* $HOME/bin/$task.sh '{}' "$@"
34
e34cda3e7483 pass through extract args
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 33
diff changeset
9 echo $(date) $task "$@" workers done