diff --git a/start-vnc b/start-vnc index 4e6e55e22cd6f62c4bbcf1c73c7454a0ea5e688f..21752a66239a850b57c1551f92adddeac9efe637 100755 --- a/start-vnc +++ b/start-vnc @@ -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}