MATLAB Answers

0

RTX 2080 GPU coder, what to do?

Asked by Erik Nyström on 14 Dec 2018
Latest activity Edited by sotiraw sotiroglou on 6 May 2019
Complete noob here so bear with me. Bought my first desktop PC to learn how to do GPU computing (among other development stuff).
Using Ubuntu 18.04 and should have installed the right packages but if you look at the code below, can you point me in the right direction where i should start looking? Why is allt the tests failing? Have installed cuDNN and Cuda toolkit. As I said in the beginning, currently have no idea what I'm doing.
coder.checkGpuInstall('full')
Host CUDA Environment : FAILED (Unable to execute the nvcc command. Check your CUDA SDK installation.)
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
------------------------------------------------------------------------
gpuSimpleTest_mex.sh: 13: ./setEnv.sh: /usr/include/c++/7: Permission denied
gpuSimpleTest_mex.sh: 13: ./setEnv.sh: /usr/include/c++/7/x86_64-linux-gnu: not found
gpuSimpleTest_mex.sh: 13: ./setEnv.sh: /usr/include/c++/7/backward: Permission denied
gpuSimpleTest_mex.sh: 13: ./setEnv.sh: %INCLUDE%: not found
gpuSimpleTest_mex.sh: 13: ./setEnv.sh: /usr/include/c++/7: Permission denied
gpuSimpleTest_mex.sh: 13: ./setEnv.sh: /usr/include/c++/7/x86_64-linux-gnu: not found
gpuSimpleTest_mex.sh: 13: ./setEnv.sh: /usr/include/c++/7/backward: Permission denied
gpuSimpleTest_mex.sh: 13: ./setEnv.sh: %INCLUDE%: not found
nvcc -c -rdc=true -Xcompiler -fPIC,-ansi,-fexceptions,-fno-omit-frame-pointer,-pthread -Xcudafe "--diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Wno-deprecated-declarations -arch sm_35 -I "/usr/local/MATLAB/R2018b/simulink/include" -I "/usr/local/MATLAB/R2018b/toolbox/shared/simtargets" -I "/tmp/tp7e404e0b_dc4c_48ae_ac59_ffac639b6e56/codegen/mex/gpuSimpleTest" -I "/tmp/tp7e404e0b_dc4c_48ae_ac59_ffac639b6e56" -I "./interface" -I "/usr/local/MATLAB/R2018b/extern/include" -I "." "gpuSimpleTest_data.cu"
/bin/sh: 1: nvcc: not found
gmake: *** [gpuSimpleTest_data.o] Error 127
------------------------------------------------------------------------
??? Build error: C++ compiler produced errors. See the Build Log for further details.
Code generation failed: View Error Report
Code Generation : FAILED (Test GPU code generation failed with the following error 'emlc:compilationError'.)
Warning: The CUDA driver must recompile the GPU libraries because your device is more recent than the libraries. Recompiling can take several minutes. Learn more.
> In parallel.internal.gpu.selectDevice
In parallel.gpu.GPUDevice.select (line 58)
In gpuDevice (line 21)
In gpucoder.internal.system.checkGpuInstallPrivate
In gpucoder.internal.system.checkGpuInstallPrivate
In coder.checkGpuInstall (line 71)
Compatible GPU : PASSED
cuDNN Environment : FAILED (Unable to find the 'NVIDIA_CUDNN' environment variable. Set 'NVIDIA_CUDNN' to point to the root directory of a NVIDIA cuDNN installation.)
TensorRT Environment : FAILED (Unable to find the 'NVIDIA_TENSORRT' environment variable. Set 'NVIDIA_TENSORRT' to point to the root directory of a TensorRT installation.)
Jetson TK1 Environment : FAILED (Unable to find the 'NVIDIA_CUDA_TK1' environment variable. This environment variable must be set for cross-compilation.)
Jetson TX1 Environment : FAILED (Unable to find the 'NVIDIA_CUDA_TX1' environment variable. This environment variable must be set for cross-compilation.)
Jetson TX2 Environment : FAILED (Unable to find the 'NVIDIA_CUDA_TX2' environment variable. This environment variable must be set for cross-compilation.)
Profiling : FAILED (Unable to find NVTX library 'nvToolsExt.so'. Ensure that the NVTX SDK installation contains the specified library file.)
ans =
struct with fields:
host: 0
tk1: 0
tx1: 0
tx2: 0
gpu: 1
codegen: 0
codeexec: 0
cudnn: 0
tensorrt: 0
profiling: 0

  0 Comments

Sign in to comment.

2 Answers

Answer by Akshay Khadse on 27 Dec 2018

You could try the following steps to diagnose the cause for this error:
1) Check if you can execute the following command in the terminal to determine if this issue is due to installation error of some GPU utlity
nvcc --version
2) Check if the Enviornment variables are configured as mentioned in the following documentation page:https://www.mathworks.com/help/gpucoder/gs/setting-up-the-toolchain.html
3) Reinstall GPU drivers, CUDA and CuDNN.
I was able to find this information from the following MATLAB Answers page:https://www.mathworks.com/matlabcentral/answers/394142

  0 Comments

Sign in to comment.


Answer by sotiraw sotiroglou on 6 May 2019
Edited by sotiraw sotiroglou on 6 May 2019

hello friend
i think your problem is here, or at least you have to fix this
cuDNN Environment : FAILED (Unable to find the 'NVIDIA_CUDNN' environment variable. Set 'NVIDIA_CUDNN' to point to the root directory of a NVIDIA cuDNN installation.)
how?? well i have been trying for 2 days and a fairy helped me to find the solution
export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export NVIDIA_CUDNN=/home/kapoios/Downloads/cuda${NVIDIA_CUDNN:+:${NVIDIA_CUDNN}}
the third line is what you need, but you must do all 3 i think . ( this is code for ubuntu linux just run each line seperatedly on a terminal. If you are a windows user just add them the variables to the path , check here also https://uk.mathworks.com/help/gpucoder/gs/setting-up-the-toolchain.html )
NOTE:
if you dont want to run this code everytime, you will need to add it to .bashrc i think

  0 Comments

Sign in to comment.