Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
embltilities
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Renato Alves
embltilities
Commits
04c9bba9
Verified
Commit
04c9bba9
authored
7 years ago
by
Renato Alves
Browse files
Options
Downloads
Patches
Plain Diff
ENH Add QoS/Preemption options for SLURM
parent
db8f485a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/submitjob
+9
-1
9 additions, 1 deletion
bin/submitjob
with
9 additions
and
1 deletion
bin/submitjob
+
9
−
1
View file @
04c9bba9
...
...
@@ -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
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment