Fast s function mex maci64


I think this question has been there for a while… I’m trying to compile the mex function on a mac (os X) using MATLAB 2015a. I’ve downloaded the build_structure as described here: and modified the MAKE file to locate MATLAB as is on mac. I have also installed gfortran.
Now, as I use the "make s function’ from MATLAB instead of following the procedure described, I run into a problem with the nwtc/source/SysMatlab.f90:64:35:

Now i notice that IFPORT is a function of intel fortran compiler, and couldn’t find any quick alternatives on the internet for using it with gfortran. I’m level ‘0’ in fortran but decent at MATLAB/mex/embedded code gen. So I was wondering if you have come across this problem and have any solution for it.

Many thanks!


Often, you can just remove the “USE IFPORT” line because gfortran has its own built-in extensions that replace it. SysMatlab.f90 is SysIVF.f90 with some Matlab replacement commands for printing to the command window. On Mac with gfortran, you’d want to put those same Matlab replacement commands in SysGnuLin.f90 (the gfortran Linux version of SysIVF.f90).

Hello Bonnie, Thank you for your reply. I’m following it up on the other thread with you and Stefano.