Commit d92b0f8c authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

start-vnc: allow constraint(s) to be specified

parent 18f2462c
......@@ -87,6 +87,9 @@ SVNC_NODES="half"
# Quality of service
SVNC_QOS="normal"
# Constraint for feature selection (GPU and/or memory)
SVNC_CONSTRAINT=""
# Uncomment this if you use TurboVNC as vncviewer.
#
# TurboVNC will work without this option but then it will use its own
......@@ -146,6 +149,7 @@ Usage: $(basename "$0") [OPTION]
Available values for OPTION include:
-A acctcode acctcode of job
-C list constraint for feature selection
-g geometry initial geometry of vnc window
-n nodes number of nodes
-q qos job qos
......@@ -168,10 +172,12 @@ ssh_frontend () {
parse_options () {
local option
while getopts 'A:g:n:q:t:u:v:x:' option; do
while getopts 'A:C:g:n:q:t:u:v:x:' option; do
case ${option} in
A) SVNC_ACCTCODE="$OPTARG"
;;
C) SVNC_CONSTRAINT="$OPTARG"
;;
g) SVNC_GEOMETRY="$OPTARG"
;;
n) SVNC_NODES="$OPTARG"
......@@ -193,6 +199,7 @@ parse_options () {
done
readonly SVNC_ACCTCODE
readonly SVNC_CONSTRAINT
readonly SVNC_GEOMETRY
readonly SVNC_QOS
readonly SVNC_RUNTIME
......@@ -229,6 +236,7 @@ submit_vnc_job () {
ssh_frontend "cd .startvnc && sbatch" <<EOF
#!/bin/bash -l
#SBATCH --partition=gpu
#SBATCH --constraint=${SVNC_CONSTRAINT}
${sbatch_resources}
#SBATCH --qos=${SVNC_QOS}
#SBATCH --time=${SVNC_RUNTIME}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment