Skip to content

Commit

Permalink
add queue selection option
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorKMDay committed Aug 10, 2017
1 parent 8c0820c commit 1d73e4c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ usage() {
random name.
-O Save output/error files to qsub-[out|err] directories.
-P Append <date>_<time> to the jobid.
-Q * Choose which queue. If left unspecified, queue will be chosen
by qsub.
-S * Run qsub on these subjects only; if not set, run on all.
-T * Set the target for make.
Expand Down Expand Up @@ -83,6 +85,7 @@ quit=
MAKETARGET=''
testmake=n
setdate=n
queue=

while getopts ":abde:hijklmno:pqstvwz:CDHMN:OPS:T:" opt
do
Expand Down Expand Up @@ -123,6 +126,7 @@ do
O) oedirs=y ;;
P) setdate=y
date=$(date +%y%m%d-%H-%I) ;;
Q) queue="-q $OPTARG" ;;
S) subjects="$OPTARG"
# Sanity check argument to subjects.
subjnum=$(echo $subjects | wc -w)
Expand Down Expand Up @@ -182,7 +186,7 @@ do
then
mkdir -p qout-${user} qerr-${user}

qsub $quit -S /bin/bash <<-EOF
qsub $quit $queue -S /bin/bash <<-EOF
#SGE submission options
#$ -cwd
#$ -V
Expand All @@ -193,7 +197,7 @@ do
make ${subj} TARGET="${MAKETARGET}" ${makeparam}
EOF
else
qsub $quit -S /bin/bash <<-EOF
qsub $quit $queue -S /bin/bash <<-EOF
#SGE submission options
#$ -cwd
#$ -V
Expand Down

0 comments on commit 1d73e4c

Please sign in to comment.