Mercurial > hg > cc > cirrus_home
annotate bin/masterMaster.sh @ 191:b5904d0bdfd4
orig, more or less
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Wed, 25 Sep 2024 09:49:12 +0100 |
| parents | e5d5958bf3fe |
| children |
| rev | line source |
|---|---|
| 21 | 1 #!/bin/bash |
| 85 | 2 # This runs on login machine to launch the real task (named by $1) on multiple machines |
| 82 | 3 # Any further args are passed to $task.sh |
|
84
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
82
diff
changeset
|
4 echo $(date) Launching master workers for "$@" from $(hostname) |
|
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 |
| 85 | 7 srun $HOME/bin/$task.sh "$@" |
| 8 echo $(date) $task "$@" workers done | |
| 9 | |
|
84
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
82
diff
changeset
|
10 #nodes=($(scontrol show hostname "$SLURM_JOB_NODELIST")) |
|
2fc33145242b
prepare for real parallel distribution
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
82
diff
changeset
|
11 #seq 1 -1 0 | $HOME/gentoo/usr/bin/parallel --will-cite --joblog master_$task.log -S "ssh -o StrictHostKeyChecking=accept-new ${nodes[1]}" -S "ssh -o StrictHostKeyChecking=accept-new ${nodes[0]}" -N 1 --workdir /dev/shm --transferfile ${task}_'{}'.txt $* $HOME/bin/$task.sh '{}' "$@" |
