Why do I receive Error Selected C++ MEX Compiler 'MinGW64 Compiler (C++)' is not supported for MEX acceleration. Use mex -setup C++ to select a supported MEX compiler?

22 ビュー (過去 30 日間)
Luke Wormald
Luke Wormald 2022 年 3 月 30 日
編集済み: Siraj 2023 年 12 月 7 日
Why do I receive Error Selected C++ MEX Compiler 'MinGW64 Compiler (C++)' is not supported for MEX acceleration. Use mex -setup C++ to select a supported MEX compiler?
I am attempting to use the dlquantizer tool (I have tried both the GUI and calling the function in my code) on a SeriesNetwork object. The error occurs specifically when I call the calibrate function after having creqted the quantized object or in the GUI when trying to advance after selecting the enviorment (CPU, GPU, MATLAB, etc.). I ran through the MEX setup tutorial here: https://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html and am able to build yprime and execute the function just fine. When running mex -setup C++, I am given the option of either MinGW64 Compiler (C++) or MinGW64 Compiler with Windows 10 SDK or later (C++).
As far as the network I am attempting to quantize, it is a slightly modified version of the this MathWorks tutorial: Speech Command Recognition Using Deep Learning. I am still running it as a live script.
My installation details are as follows:
  • OS Windows 11 Education 64-bit
  • MATLAB installed on a secondary drive (F:) from Windows (C:)
  • CPU: Ryzen 3800x, RAM: 32GB, GPU: RTX 3070
Any help would be greatly appreciated!
  3 件のコメント
Meruzhan Hovhannisyan
Meruzhan Hovhannisyan 2022 年 5 月 8 日
How do I choose a different compiler? The mex -setup C++ command outputs only MinGW64, although the microsoft visual C++ 2017 compiler is installed on the computer.
Walter Roberson
Walter Roberson 2022 年 5 月 9 日
mex -v -setup C++
will give you information about why it does not locate the compiler

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

回答 (1 件)

Siraj
Siraj 2023 年 12 月 7 日
編集済み: Siraj 2023 年 12 月 7 日
Hi!
It is my understanding that you are utilizing the “dlquantizer” function to reduce the network's memory requirements. However, when you call the “calibrate” function, you encounter the following error message:
“MinGW64 Compiler (C++)' is not supported for MEX acceleration.”
There are some specific prerequisites for calibration depending on your selected calibration environment. You can refer to the following link to learn about these prerequisites:
The error you encountered suggests that “MinGW64” is not supported for MEX acceleration. Therefore, you may need to change the default compiler used to build the mex files. You can refer to the following link to check for the supported and compatible compilers for Windows:
After checking the above link, you’ll find that the Microsoft Visual C++ 2017 product family is the compiler compatible with most of the MATLAB Product Family. You can refer to the following link to download Visual Studio 2017:
Once you have downloaded and installed Visual Studio 2017 or any other supported version, run the following command on the MATLAB command window to change the default compiler:
mex -setup cpp
MATLAB will display information about the default C++ compiler and provide links to other C++ compilers on your system. To change the default, select one of these links.
You can click on any compiler of your choice, and it would be selected as the default compiler.
To learn more about how to change default C++ compilers on Windows Systems, refer to the following link:
One quick suggestion, check if all the layers in your network are supported for int8 quantization or not. You can refer to the following link to verify this:
If none of the above is helpful, you can reach out to MathWorks for support through this link: https://www.mathworks.com/support/contact_us.html
Hope this helps.

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by