Merge pull request #268 from vBLFTePebWNi6c/master

Add more descriptive info about driver version detection failure #267
This commit is contained in:
Snawoot 2020-05-14 14:41:18 +03:00 committed by GitHub
commit 3ab61d04a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 4 deletions

View File

@ -111,8 +111,15 @@ patch_common () {
exit 1
fi
if ! driver_version=$("$NVIDIA_SMI" --query-gpu=driver_version --format=csv,noheader,nounits | head -n 1) ; then
echo 'Something went wrong. Check nvidia driver'
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
driver_versions_list=$($cmd)
ret_code=$?
driver_version=$(echo "$driver_versions_list" | head -n 1)
if [[ $ret_code -ne 0 ]] ; then
echo "Can not detect nvidia driver version."
echo "CMD: \"$cmd\""
echo "Result: \"$driver_versions_list\""
echo "nvidia-smi retcode: $ret_code"
exit 1
fi

View File

@ -183,8 +183,15 @@ patch_common () {
exit 1
fi
if ! driver_version=$("$NVIDIA_SMI" --query-gpu=driver_version --format=csv,noheader,nounits | head -n 1) ; then
echo 'Something went wrong. Check nvidia driver'
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
driver_versions_list=$($cmd)
ret_code=$?
driver_version=$(echo "$driver_versions_list" | head -n 1)
if [[ $ret_code -ne 0 ]] ; then
echo "Can not detect nvidia driver version."
echo "CMD: \"$cmd\""
echo "Result: \"$driver_versions_list\""
echo "nvidia-smi retcode: $ret_code"
exit 1
fi