フィルターのクリア

How to include compiler diagnostic warnings in mex fortran files?

1 回表示 (過去 30 日間)
Dimitrios Patsatzis
Dimitrios Patsatzis 2023 年 5 月 10 日
コメント済み: dpb 2023 年 9 月 21 日

My problem is the following:
I use an old fortran code for numerical integration, which is called through a computational routine of a mex Function.
I have tested the fortran code externally, using a main fortran file, via Visual Studio. Because the code is old, the only way that I can compile and run it successfully is if I enable /warn:[no]interfaces option of the ifort compiler.
Now, I am trying to "attach" this fortran code to a mexFunction. The getaway function works fine and the standard mex compilation is successfull. But, when I run the mex64 output function, MATLAB craches unexpectedly. Thus, I think that I somehow need to incorporate the /warn:[no]interfaces flag in standard mex compilation. I tried using COMPFLAGS='$COMPFLAGS /warn:[no]interfaces' but there was no such option.
I would appreciate any suggestions. Thanks in advance

  6 件のコメント
dpb
dpb 2023 年 9 月 21 日
編集済み: dpb 2023 年 9 月 21 日
Add the `/warn:[no]interfaces` flag to the `CXXFLAGS` variable. The modified line should look something like this:
CXXFLAGS="$CXXFLAGS -warn:[no]interfaces"
No. The line should be
CXXFLAGS="$CXXFLAGS -warn:nointerfaces"
The [] simply indicate an optional state; they are not part of the switch value.
However, <the Intel doc says> that 'nointerfaces' is the default state anyways...
dpb
dpb 2023 年 9 月 21 日
OBTW, @James Tursa is the Fortran mex guru; post your Fortran code calling sequence including enough to tell what are all data types and your gateway routine; odds are good that he would take a look at it and find any problems there.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeFortran with MATLAB についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by