From add7211f7619368dbe50a0c8f3138231e9086623 Mon Sep 17 00:00:00 2001 From: "Kasper D. Fischer" Date: Tue, 13 Aug 2024 14:32:19 +0200 Subject: [PATCH] updated prolog.d/10-GPU_allocate.sh --- prolog.d/10-GPU_allocate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prolog.d/10-GPU_allocate.sh b/prolog.d/10-GPU_allocate.sh index b618735..b4d0977 100755 --- a/prolog.d/10-GPU_allocate.sh +++ b/prolog.d/10-GPU_allocate.sh @@ -42,7 +42,7 @@ if [ -z "${NGPUS}" ] ; then fi # get list of installed GPU's (exit without error if nvidia-smi is not available (i. e. no GPU's installed)) -[ -f /usr/bin/nvidia-smi ] && GPU_LIST=$(/usr/bin/nvidia-smi -L | cut -f1 -d":" | cut -f2 -d" " | xargs shuf -e) || exit 0 +[ -f /usr/bin/nvidia-smi ] && GPU_LIST=$(/usr/bin/nvidia-smi -L | cut -f1 -d":" | cut -f2 -d" " | xargs shuf -e 2>/dev/null) || exit 0 ## loop over devices and try to allocate one until enough GPU's are allocated CUDA_VISIBLE_DEVICES=''