changeset 34:e34cda3e7483

pass through extract args
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Thu, 26 Mar 2020 12:23:33 +0000
parents 4c23b1766692
children ec99b2d1d2fc
files bin/masterMaster.sh masterJob.sh
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/bin/masterMaster.sh	Tue Mar 24 17:53:35 2020 +0000
+++ b/bin/masterMaster.sh	Thu Mar 26 12:23:33 2020 +0000
@@ -1,5 +1,8 @@
 #!/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
 echo $(date) Launching master workers for "$@"
-seq 1 -1 0 | parallel --will-cite --joblog master_$1.log -S r1i5n1 -S r1i5n0 -N 1 --workdir /dev/shm --transferfile $1_'{}'.txt --transferfile by11s.txt $HOME/bin/$1.sh '{}'
-echo $(date) "$@" workers done
+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 '{}'
+echo $(date) $task "$@" workers done
--- a/masterJob.sh	Tue Mar 24 17:53:35 2020 +0000
+++ b/masterJob.sh	Thu Mar 26 12:23:33 2020 +0000
@@ -1,6 +1,6 @@
 #!/bin/bash
 # Attempt at a master Master job
-# Usage: qsub -v t=taskName masterJob.sh
+# Usage: qsub -v t=taskName[, x=extras] masterJob.sh
 # Implies that ~/taskName_{0,1}.txt contain the necessary parameterisation
 #PBS -l select=2:ncpus=36
 #PBS -l place=exclhost
@@ -8,10 +8,10 @@
 #PBS -V
 #PBS -A dc007
 #PBS -N master
-
+#
 #module load mpt
 
 cd ${PBS_O_WORKDIR}
 
-bin/masterMaster.sh "$t"
+bin/masterMaster.sh "$t" $x