Azzera filtri
Azzera filtri

MEX doesn't look for GFORTRAN, although I added it to the path

6 visualizzazioni (ultimi 30 giorni)
I want to setup MEX with GFORTRAN on MATLAB. I know that you're supposed to add it to the environment variable by doing this:
setenv('PATH', [getenv('PATH') ':/usr/local/bin/'])
And I did, getenv('PATH') gives me:
'/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin'.
So I used -v and see what's going on. It turns out MATLAB is not looking for GFORTRAN at all:
Verbose mode is on.
... Looking for compiler 'Intel Fortran Composer XE' ...
... Looking for environment variable 'IFORT_COMPILER17' ...No.
... Looking for environment variable 'IFORT_COMPILER16' ...No.
... Looking for environment variable 'IFORT_COMPILER15' ...No.
... Looking for environment variable 'IFORT_COMPILER14' ...No.
... Looking for environment variable 'IFORT_COMPILER13' ...No.
... Executing command 'which ifort' ...No.
Did not find installed compiler 'Intel Fortran Composer XE'.
How can I make MATLAB search through the PATH environment?
I have a MAC and I use MATLAB 2017a. How can I make MATLAB look for GFORTRAN instead of Intel Fortran Composer XE?

Risposta accettata

Walter Roberson
Walter Roberson il 12 Ago 2017
gfortran is not supported for Mac in R2017a. R2015a was the last release with gfortran support for Mac.
  2 Commenti
jh2011
jh2011 il 13 Ago 2017
What's the difference between gfortran and Intel Fortran Composer XE?
Walter Roberson
Walter Roberson il 13 Ago 2017
Ummm, nearly everything?
If you really want to, you could take a backup copy of
/Applications/MATLAB_R2017a.app/bin/maci64/mexopts/intel_fortran.xml
and then hack the file to pieces, tweaking all of the environment variables named and all of the library names and all of the directory names...

Accedi per commentare.

Più risposte (0)

Categorie

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

Community Treasure Hunt

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

Start Hunting!

Translated by