Borrar filtros
Borrar filtros

Linux gfortran no supported compiler

6 visualizaciones (últimos 30 días)
Ken
Ken el 16 de Mzo. de 2017
Editada: Zain el 10 de Sept. de 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?

Respuestas (1)

Zain
Zain el 10 de Sept. de 2018
Editada: Zain el 10 de Sept. de 2018
Check this link:
and modify to your needs. Or change the version of the gfortran to the older one.

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by