Mercurial > hg > cc > cirrus_home
comparison bin/masterMaster.sh @ 84:2fc33145242b
prepare for real parallel distribution
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Sun, 14 Mar 2021 21:28:02 +0000 |
parents | 6304d5c46229 |
children | e5d5958bf3fe |
comparison
equal
deleted
inserted
replaced
83:8fb11e337e23 | 84:2fc33145242b |
---|---|
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 two 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 "$@" | 4 echo $(date) Launching master workers for "$@" from $(hostname) |
5 task=$1 | 5 task=$1 |
6 shift | 6 shift |
7 nodes=($(scontrol show hostname "$SLURM_JOB_NODELIST")) | 7 #nodes=($(scontrol show hostname "$SLURM_JOB_NODELIST")) |
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 '{}' "$@" | 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 '{}' "$@" |
9 srun $HOME/bin/$task.sh "$@" | |
9 echo $(date) $task "$@" workers done | 10 echo $(date) $task "$@" workers done |