Filter löschen
Filter löschen

Linux gfortran no supported compiler

6 Ansichten (letzte 30 Tage)
Ken
Ken am 16 Mär. 2017
Bearbeitet: Zain am 10 Sep. 2018
I am attempting to generate a simple mex file for a fortran file. For example, compiling timestwo.f using mex. This is the output that I receive:
INPUT:
mex -v timestwo.f
OUTPUT:
Neither -compatibleArrayDims nor -largeArrayDims is selected.
Using -compatibleArrayDims. In the future, MATLAB will require the use of
-largeArrayDims and remove the -compatibleArrayDims option.
For more information:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
No MEX options file identified; looking for an implicit selection.
... Looking for compiler 'gfortran' ...
... Executing command 'which gfortran' ...Yes ('/usr/bin/gfortran').
... Looking for folder '/usr/bin' ...Yes.
... Executing command 'which gfortran' ...Yes ('/usr/bin/gfortran').
... Executing command 'gfortran -print-file-name=libgfortran.so' ...Yes ('/usr/lib/gcc/x86_64-redhat-linux/6.2.1/libgfortran.so').
... Looking for folder '/usr/lib64' ...Yes.
... Executing command 'which gfortran' ...Yes ('/usr/bin/gfortran').
... Executing command 'gfortran -print-file-name=libgfortranbegin.a' ...Yes ('libgfortranbegin.a').
... Looking for folder 'libgfortranbegin.a' ...No.
Did not find installed compiler 'gfortran'.
This happens on both my Fedora and Ubuntu Linux boxes. Note this only happens with fortran. I can run "mex -v timestwo.c" with no problem at all.
Outside of Matlab I can invoke gfortran with no problem.
Maybe this has to due with the compiler version. It picks up the newest version of my If it does, how can I get it use a lower version?

Antworten (1)

Zain
Zain am 10 Sep. 2018
Bearbeitet: Zain am 10 Sep. 2018
Check this link:
and modify to your needs. Or change the version of the gfortran to the older one.

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by