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=''