diff 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
line wrap: on
line diff
--- a/bin/masterMaster.sh	Sat May 09 16:16:28 2020 +0100
+++ b/bin/masterMaster.sh	Wed Mar 03 19:33:56 2021 +0000
@@ -1,8 +1,9 @@
 #!/bin/bash
-# This runs on login machine to launch the real job (named by $1) on two machines
-# Any further args are passed to parallel
+# 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 "$@"
 task=$1
 shift
-seq 1 -1 0 | parallel --will-cite --joblog master_$task.log -S r1i5n1 -S r1i5n0 -N 1 --workdir /dev/shm --transferfile ${task}_'{}'.txt $* $HOME/bin/$task.sh '{}'
+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 '{}' "$@"
 echo $(date) $task "$@" workers done