diff --git a/prolog.d/10-GPU_allocate.sh b/prolog.d/10-GPU_allocate.sh index 8e7f42c..b618735 100755 --- a/prolog.d/10-GPU_allocate.sh +++ b/prolog.d/10-GPU_allocate.sh @@ -35,7 +35,7 @@ function clean_up() { ### get requested number of GPU's # use hard resource list first -NGPUS=$(qstat -j ${JOB_ID} | sed -n "s/hard resource_list:.*gpu=\([[:digit:]]\+\).*/\1/p") +NGPUS=$(qstat -j ${JOB_ID} 2>/dev/null | sed -n "s/hard resource_list:.*gpu=\([[:digit:]]\+\).*/\1/p") # set NGPUS to zero if empty if [ -z "${NGPUS}" ] ; then NGPUS=0 @@ -68,4 +68,4 @@ else fi # clean exit -exit 0 \ No newline at end of file +exit 0