changeset 21:a598469733d3

more job scripts
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Wed, 18 Mar 2020 10:57:21 +0000
parents 5371599c0cfa
children ce4c2ec0d5b3
files bin/dummy.sh bin/master.sh bin/masterMaster.sh extractJob.sh masterJob.sh
diffstat 5 files changed, 58 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/dummy.sh	Wed Mar 18 10:57:21 2020 +0000
@@ -0,0 +1,5 @@
+#!/bin/bash
+pwd
+parallel --will-cite --nonall -S r1i5n0 -S r1i5n1 'echo $$ $(hostname); n=$(echo $(hostname)|cut -c 6); nohup sleep $((n*5)); echo done $n'
+echo pdone
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/master.sh	Wed Mar 18 10:57:21 2020 +0000
@@ -0,0 +1,10 @@
+#!/usr/bin/bash
+echo $(date) $(hostname)
+h=$(hostname)
+hn=${h##*n}
+if [ $hn -eq 0 ]
+then seq --format="%03.0f" $1 $2
+else seq --format="%03.0f" $3 $4
+fi |\
+parallel --will-cite -j 48 -N 1 bin/doHdr.sh ${hn} '{#}' '{}'
+echo $(date) $(hostname) $?
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/masterMaster.sh	Wed Mar 18 10:57:21 2020 +0000
@@ -0,0 +1,5 @@
+#!/bin/bash
+# This runs on 1 machine to launch the real job (named by $1) on two machines
+echo $(date) Launching master workers for "$@"
+parallel --will-cite --nonall -S r1i5n0 -S r1i5n1 --workdir /dev/shm/'{#}' --transferfile "${1}_"'{#}'.txt $HOME/bin/$1.sh '{#}'
+echo $(date) "$@" workers done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extractJob.sh	Wed Mar 18 10:57:21 2020 +0000
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Usage: qsub -v t1=1stTar,tn=numTars plinksJob.sh
+#PBS -l select=2:ncpus=36
+#PBS -l place=exclhost
+#PBS -l walltime=08:00:00
+#PBS -V
+#PBS -A dc007
+#PBS -N hdr
+
+#module load mpt
+
+cd ${PBS_O_WORKDIR}
+((n1=tn/2))
+((s1=t1))
+((s2=t1+n1))
+((e1=s2-1))
+((e2=s1+tn-1))
+echo $(seq --format="%03.0f" $s1 $e1),$(seq --format="%03.0f" $s2 $e2)
+
+bin/hdrMaster.sh $s1 $e1 $s2 $e2
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/masterJob.sh	Wed Mar 18 10:57:21 2020 +0000
@@ -0,0 +1,17 @@
+#!/bin/bash
+# Attempt at a master Master job
+# Usage: qsub -v t=taskName masterJob.sh
+# Implies that ~/taskName_{0,1}.txt contain the necessary parameterisation
+#PBS -l select=2:ncpus=2
+#PBS -l place=exclhost
+#PBS -l walltime=08:00:00
+#PBS -V
+#PBS -A dc007
+#PBS -N master
+
+#module load mpt
+
+cd ${PBS_O_WORKDIR}
+
+bin/masterMaster.sh "$t"
+