Azzera filtri
Azzera filtri

How to include compiler diagnostic warnings in mex fortran files?

1 visualizzazione (ultimi 30 giorni)

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 Commenti
dpb
dpb il 21 Set 2023
Modificato: dpb il 21 Set 2023
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 il 21 Set 2023
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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Fortran with MATLAB in Help Center e File Exchange

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by