Having error: 'emlc:compilationError' when using command('c​oder.check​GpuInstall​('gpu','co​degen','cu​dnn','quie​t');')

13 ビュー (過去 30 日間)
Bohao Wu
Bohao Wu 2019 年 5 月 21 日
コメント済み: Doga Deniz Ates 2022 年 10 月 28 日
Hi there, I was trapped in this error within the whole day. I'm using yolo to dectect objects, while I'm just using it but not trying to compile it. So when I used single or multiple CPUs to run the vehicle_Dataset, I found the training process was unable to be accomplished as matlab was out of memory.
So I turned to try to deploy the taining using my GPU, which is Geforce GTX 1060. I installed the new divers for this Graphic card(ver 430.64), CUDA toolkit 10.1, cuDNN v7.5.1 (April 22, 2019) for CUDA 10.1. Then I created
Variable name: CUDA_PATH
Variable value: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
in the system variables. Also, I added
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\CUPTI\lib64
in the Path.
All the add-on on this page was also installed:
including "GPU Coder Interface for Deep Learning Libraries support package", Microsoft Visual Studio 2017, "MATLAB Support for MinGW-w64 C/C++ Compiler".
Then, I ran the following code in matlab, which worked very good.
mex -setup:'C:\Program Files\MATLAB\R2018b\bin\win64\mexopts\msvc2017.xml' C -v
mex -setup:'C:\Program Files\MATLAB\R2019a\bin\win64\mexopts\msvc2017.xml' C -v
Then I ran
coder.checkGpuInstall('gpu','codegen','cudnn','quiet');
Matlab inform me as
Error using coder.checkGpuInstall (line 32)
One or more of the system checks did not pass, with the following errors ...
Basic Code Generation: (Test GPU code generation failed with the error 'emlc:compilationError'. View report for further information: View report)
So I click the View report, and it says:
Build error: C++ compiler produced errors. See the Build Log for further details.
While the build logs has 1659 lines... I have attached the ecported reports in tha attachment. So I detected the current setup with coder.checkGpuInstall();
Compatible GPU : PASSED
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
cuDNN Environment : PASSED
Basic Code Generation : FAILED (Test GPU code generation failed with the error 'emlc:compilationError'. View report for further information: View report)
So could anyone help me out of this problem? Thanks a lot in advance!
  3 件のコメント
Ali Al-Saegh
Ali Al-Saegh 2021 年 1 月 13 日
I have exactly the same problem. Anyone has solved it can help me, please.
Ajnas Muhammed
Ajnas Muhammed 2021 年 2 月 3 日
I also have the same problem. Help us

サインインしてコメントする。

回答 (2 件)

Majid Farzaneh
Majid Farzaneh 2021 年 4 月 16 日
I just solved the problem.
You need to first install visual studio 2015 or later (including C++).
Then type this in the command window:
mex -setup C++
you may have something like this:
MEX configured to use 'Microsoft Visual C++ 2015' for C++ language compilation.
To choose a different C++ compiler, select one from the following:
MinGW64 Compiler (C++) mex -setup:'C:\Program Files\Polyspace\R2021a\bin\win64\mexopts\mingw64_g++.xml' C++
Microsoft Visual C++ 2015 mex -setup:C:\Users\Majid\AppData\Roaming\MathWorks\MATLAB\R2021a\mex_C++_win64.xml C++
Just click on "Microsoft Visual C++ 2015" link.
then check the coder again:
coder.checkGpuInstall
  2 件のコメント
Ahmad Wahba
Ahmad Wahba 2022 年 2 月 17 日
I had the same problem and your solution @Majid Farzaneh solved the issue. Appreciate it!
Doga Deniz Ates
Doga Deniz Ates 2022 年 10 月 28 日
I had the same issue and I use 'Microsoft Visual C++ 2017' for C++ language compilation, but when I ran the
coder.checkGpuInstall
still I have this error
Basic Code Generation : FAILED (Test GPU code generation failed with the error 'emlc:compilationError'. View report for further information: View report)
could you give me any advice for this problem?

サインインしてコメントする。


xuan zhang
xuan zhang 2020 年 5 月 6 日
Same problem here- not been able to find out what the problem is.
  4 件のコメント
Ali Al-Saegh
Ali Al-Saegh 2021 年 1 月 13 日
Hi Jiaqi Wang,
I have the same problem. Could you please explain to me how did you add the path of cl.exe?
Muhammad Rashid
Muhammad Rashid 2021 年 3 月 14 日
you can have cl.exe by installing ms visual studio 15 or above, then run vl_compilenn

サインインしてコメントする。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by