diff 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
line wrap: on
line diff
--- a/bin/masterMaster.sh	Sun Mar 14 21:25:01 2021 +0000
+++ b/bin/masterMaster.sh	Sun Mar 14 21:28:02 2021 +0000
@@ -1,9 +1,10 @@
 #!/bin/bash
 # This runs on login machine to launch the real task (named by $1) on two machines
 # Any further args are passed to $task.sh
-echo $(date) Launching master workers for "$@"
+echo $(date) Launching master workers for "$@" from $(hostname)
 task=$1
 shift
-nodes=($(scontrol show hostname "$SLURM_JOB_NODELIST"))
-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 '{}' "$@"
+#nodes=($(scontrol show hostname "$SLURM_JOB_NODELIST"))
+#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 '{}' "$@"
+srun $HOME/bin/$task.sh "$@"
 echo $(date) $task "$@" workers done