Mercurial > hg > cc > cirrus_home
comparison bin/masterMaster.sh @ 85:e5d5958bf3fe
minor
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Mon, 15 Mar 2021 14:20:00 +0000 |
parents | 2fc33145242b |
children |
comparison
equal
deleted
inserted
replaced
84:2fc33145242b | 85:e5d5958bf3fe |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 # This runs on login machine to launch the real task (named by $1) on two machines | 2 # This runs on login machine to launch the real task (named by $1) on multiple machines |
3 # Any further args are passed to $task.sh | 3 # Any further args are passed to $task.sh |
4 echo $(date) Launching master workers for "$@" from $(hostname) | 4 echo $(date) Launching master workers for "$@" from $(hostname) |
5 task=$1 | 5 task=$1 |
6 shift | 6 shift |
7 srun $HOME/bin/$task.sh "$@" | |
8 echo $(date) $task "$@" workers done | |
9 | |
7 #nodes=($(scontrol show hostname "$SLURM_JOB_NODELIST")) | 10 #nodes=($(scontrol show hostname "$SLURM_JOB_NODELIST")) |
8 #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 '{}' "$@" | 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 '{}' "$@" |
9 srun $HOME/bin/$task.sh "$@" | |
10 echo $(date) $task "$@" workers done |