From deaa1effd93acee3a516b40afc5424f2ff285141 Mon Sep 17 00:00:00 2001 From: "Kasper D. Fischer" Date: Fri, 28 Jan 2022 16:29:11 +0100 Subject: [PATCH] removed warning if qstat is not found qstat can not be found on host with outdated debian versions. These hosts do not have GPU's installed. --- prolog.d/10-GPU_allocate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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