Mercurial > hg > cc > cirrus_home
changeset 12:29263ba42361
add args for start tar and number of tars
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Tue, 25 Feb 2020 22:14:07 +0000 |
parents | b0d9fe66ce8a |
children | 8e3719800479 |
files | bin/plinks.sh bin/plinksMaster.sh plinksJob.sh |
diffstat | 3 files changed, 16 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/plinks.sh Tue Feb 25 18:33:22 2020 +0000 +++ b/bin/plinks.sh Tue Feb 25 22:14:07 2020 +0000 @@ -3,6 +3,9 @@ echo $(date) $(hostname) h=$(hostname) hn=${h##*n} -if [ $hn -eq 0 ]; then echo {013..014}; else echo {015..016}; fi |\ -tr ' ' '\012' |parallel --will-cite -j 30 -N 1 bin/doPlinks.sh ${hn} '{#}' '{}' +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/doPlinks.sh ${hn} '{#}' '{}' echo $(date) $(hostname) $?
--- a/bin/plinksMaster.sh Tue Feb 25 18:33:22 2020 +0000 +++ b/bin/plinksMaster.sh Tue Feb 25 22:14:07 2020 +0000 @@ -1,5 +1,5 @@ #!/bin/bash # This runs on 1 machine to launch the real job on two machines -echo $(date) Launching plinks workers -parallel --will-cite --nonall -S r1i5n0 -S r1i5n1 bin/plinks.sh +echo $(date) Launching plinks workers for "$@" +parallel --will-cite --nonall -S r1i5n0 -S r1i5n1 bin/plinks.sh "$@" echo $(date) Workers done
--- a/plinksJob.sh Tue Feb 25 18:33:22 2020 +0000 +++ b/plinksJob.sh Tue Feb 25 22:14:07 2020 +0000 @@ -1,4 +1,5 @@ #!/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 @@ -9,5 +10,12 @@ #module load mpt cd ${PBS_O_WORKDIR} -bin/plinksMaster.sh +((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/plinksMaster.sh $s1 $e1 $s2 $e2 +