Error using mex No supported compiler was found.
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
Hello
My matlab version is R2019b. I have visual studio 2017 with intel oneAPI 2021 installed. However, when I type the following, I get error:
Any guidance, especially from MatLab staff is highly appreciated as otherwise I have to code the program on my own in MatLab.
mex -setup FORTRAN
Error using mex
No supported compiler was found. For options, visit https://www.mathworks.com/support/compilers.
採用された回答
Bruno Luong
2021 年 10 月 28 日
10 件のコメント
Pooneh Shah Malekpoor
2021 年 10 月 28 日
Hi. I read both of these threads before posting my query. I need a more exact response as my problem still exist.
Bruno Luong
2021 年 10 月 28 日
編集済み: Bruno Luong
2021 年 10 月 28 日
Of course, because the compiler is not supported in R2019b. You have to modify the xml file to make it works, and you won't get help from TMW since the compiler is not supported. I have done for C intel openAPI, it should be doable for fortran too.
BTW it seems R2021b supports intel fortran 18 to 21. I can't provide you the xml file, since it is copyright config file.
Pooneh Shah Malekpoor
2021 年 10 月 28 日
is there any Matlab version compatible to fortran compiler in oneAPI?
Pooneh Shah Malekpoor
2021 年 10 月 28 日
I mean which combination of matlab version+fortran compiler+ visual studio work?
Bruno Luong
2021 年 10 月 29 日
編集済み: Bruno Luong
2021 年 10 月 29 日
Both questons are answered here : Support compilers for R2019b
Anotherway is to see the list of xml ci=onfiguration files (here is for R2021b)
>> cd([matlabroot '\bin\win64\mexopts'])
>> ls
. intel_c_20_vs2017.xml intel_cpp_19_vs2019.xml intel_fortran_19_vs2017.xml msvc2015.xml
.. intel_c_20_vs2019.xml intel_cpp_20_vs2017.xml intel_fortran_19_vs2019.xml msvc2017.xml
compilerComponents intel_c_21_vs2017.xml intel_cpp_20_vs2019.xml intel_fortran_20_vs2017.xml msvc2019.xml
intel_c_18_vs2015.xml intel_c_21_vs2019.xml intel_cpp_21_vs2017.xml intel_fortran_20_vs2019.xml msvcpp2015.xml
intel_c_18_vs2017.xml intel_cpp_18_vs2015.xml intel_cpp_21_vs2019.xml intel_fortran_21_vs2017.xml msvcpp2017.xml
intel_c_18_vs2019.xml intel_cpp_18_vs2017.xml intel_fortran_18_vs2015.xml intel_fortran_21_vs2019.xml msvcpp2019.xml
intel_c_19_vs2015.xml intel_cpp_18_vs2019.xml intel_fortran_18_vs2017.xml mingw64.xml
intel_c_19_vs2017.xml intel_cpp_19_vs2015.xml intel_fortran_18_vs2019.xml mingw64_g++.xml
intel_c_19_vs2019.xml intel_cpp_19_vs2017.xml intel_fortran_19_vs2015.xml mingw64_g++_sdk10+.xml
Pooneh Shah Malekpoor
2021 年 10 月 29 日
編集済み: Pooneh Shah Malekpoor
2021 年 10 月 29 日
Thanks for your reply.
I saw that link before, thats why I downloaded VS2017 to be compatible to Matlab R2019b. So, the only issue is making the compiler support R2019b. However, I do not know how should I edit the xml file?
it is the list of compiler components in my R2019b, which shows intel fortran 17,18,19 are supported in R2019b. Could you please tell me how should I edit this? what is the guidance to edit xml file?
>> cd([matlabroot '\bin\win64\mexopts'])
>> ls
. intel_c_18_vs2019.xml intel_cpp_18_vs2017.xml intel_fortran_18_vs2015.xml mingw64_g++_sdk10+.xml
.. intel_c_19_vs2015.xml intel_cpp_18_vs2019.xml intel_fortran_18_vs2017.xml msvc2015.xml
compilerComponents intel_c_19_vs2017.xml intel_cpp_19_vs2015.xml intel_fortran_18_vs2019.xml msvc2017.xml
intel_c_17_vs2015.xml intel_c_19_vs2019.xml intel_cpp_19_vs2017.xml intel_fortran_19_vs2015.xml msvc2019.xml
intel_c_17_vs2017.xml intel_cpp_17_vs2015.xml intel_cpp_19_vs2019.xml intel_fortran_19_vs2017.xml msvcpp2015.xml
intel_c_17_vs2019.xml intel_cpp_17_vs2017.xml intel_fortran_17_vs2015.xml intel_fortran_19_vs2019.xml msvcpp2017.xml
intel_c_18_vs2015.xml intel_cpp_17_vs2019.xml intel_fortran_17_vs2017.xml mingw64.xml msvcpp2019.xml
intel_c_18_vs2017.xml intel_cpp_18_vs2015.xml intel_fortran_17_vs2019.xml mingw64_g++.xml
Bruno Luong
2021 年 10 月 29 日
But I already post the instructions from the links in my answer. In your case you need to change the
<FORTRANROOT>
...
<and>
<or>
<envVarExists name="IFORT_COMPILER21" />
</or>
<fileExists name="$$/Bin/intel64/ifort.exe" />
<dirExists name="$$/../.." />
</and>
...
<and>
<or>
<envVarExists name="ONEAPI_ROOT" />
</or>
<fileExists name="$$/compiler/2021.1.1/windows/Bin/intel64/ifort.exe" />
<dirExists name="$$/../.." />
</and>
instead of <CROOT>. More instructions in this link.
You doesn't seem to read the answer I gave you.
Pooneh Shah Malekpoor
2021 年 10 月 29 日
編集済み: Pooneh Shah Malekpoor
2021 年 10 月 29 日
Thanks. I editted the xml file according to your guidance and named it intel_one_classical_fortran_vs2017.xml . then Could you please tell me why am I getting this error?
<locationFinder>
<FORTRANROOT>
<and>
<or>
<envVarExists name="ONEAPI_ROOT" />
</or>
<fileExists name="$$/bin/intel64/ifort.exe" />
<dirExists name="$$/../.." />
</and>
cd(fullfile(matlabroot,'bin','win64','mexopts'));
>> setenv('ONEAPI_ROOT', 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.4.0\windows\bin\intel64\');
>> mex -setup:intel_one_classical_fortran_vs2017.xml -v
Verbose mode is on.
... Looking for compiler 'Intel oneAPI Fortran compiler with Microsoft Visual Studio 2017' ...
... Looking for environment variable 'ONEAPI_ROOT' ...Yes ('C:\Program Files (x86)\Intel\oneAPI\compiler\2021.4.0\windows\bin\intel64\').
... Looking for file 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.4.0\windows\bin\intel64\bin\intel64\ifort.exe' ...No.
Did not find installed compiler 'Intel oneAPI Fortran compiler with Microsoft Visual Studio 2017'.
Error using mex
MEX cannot use compiler 'Intel oneAPI Fortran compiler with Microsoft Visual Studio 2017' because that compiler is not found.
Bruno Luong
2021 年 10 月 29 日
"Looking for file 'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.4.0\windows\bin\intel64\bin\intel64\ifort.exe' ...No."
You have to check where is the intel fortran compiler is installed on your system and adapt accordingly.
I don't have access to your system or never work with intel fortran, you have to figure out on your own.
Pooneh Shah Malekpoor
2021 年 10 月 29 日
編集済み: Pooneh Shah Malekpoor
2021 年 10 月 29 日
I did!
Thank you!
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Fortran with MATLAB についてさらに検索
参考
2021 年 10 月 28 日
2021 年 10 月 29 日
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
