diff --git a/bin/submitjob b/bin/submitjob index 2d7749779fb539a85c1fda6ee9dd4b0922260295..ef7f45e8ba33992f1bf6cdd702a52349d93d6a4b 100755 --- a/bin/submitjob +++ b/bin/submitjob @@ -16,6 +16,7 @@ MEM="4" # 4 GB by default MEMALL="$MEM" ACTIVE="100" QUEUE="" +PREEMPT="normal" TARGET="" FEATURES="" EMAIL="" @@ -66,6 +67,7 @@ usage() { echo >&2 " for less than 1G/job use fractionals such as 0.1 (100M/job)" echo >&2 " -a --active = limit number of simultaneously active jobs. Defaults to ${ACTIVE}" echo >&2 " -q --queue = which queue to use. Uses cluster's default if unspecified" + echo >&2 " * -p --preempt = specify preemption level (aka QoS) (SLURM). Defaults to ${PREEMPT}" echo >&2 " * -t --target = restricts to running on the given host(s) [comma separated] (SGE)" echo >&2 " * -F --features = request specific resources to constrain your jobs (SLURM)" echo >&2 " -l --logfile = filename to use as stdout/stderr of each job. Defaults to ${LOGFILE}" @@ -236,6 +238,7 @@ cat << EOF | ${LOCALCMD} #SBATCH --mem-per-cpu=${MEM}M #SBATCH --output=${LOGFILE} #SBATCH --job-name=${NAME} +#SBATCH --qos=${PREEMPT} ${BANG_BEGIN} ${BANG_QUEUE} ${BANG_EMAIL} @@ -312,7 +315,7 @@ EOF } -ARG_PARSE="getopt -o s:n:c:N:m:a:q:t:F:l:e:E:w:b:d:fh -l system:,name:,cores:,nodes:,mem:,active:,queue:,target:,features:,logfile:,email:,emailwhen:,waitfor:,begin:,debug:,fatal,help -n $0 --" +ARG_PARSE="getopt -o s:n:c:N:m:a:q:p:t:F:l:e:E:w:b:d:fh -l system:,name:,cores:,nodes:,mem:,active:,queue:,preempt:,target:,features:,logfile:,email:,emailwhen:,waitfor:,begin:,debug:,fatal,help -n $0 --" # We process arguments twice to handle any argument parsing error: ARG_ERROR=$($ARG_PARSE "$@" 2>&1 1>/dev/null) @@ -369,6 +372,11 @@ while true; do QUEUE="$1" shift ;; + -p|--preempt) + shift + PREEMPT="$1" + shift + ;; -t|--target) shift TARGET="$1"