Difference between revisions of "Mex options"

From LIBISIS
Jump to navigation Jump to search
 
Line 1: Line 1:
 +
=LINUX=
 
== gfortran ==
 
== gfortran ==
 
<pre>
 
<pre>
Line 23: Line 24:
 
#            FOPTIMFLAGS='-O2'
 
#            FOPTIMFLAGS='-O2'
 
#            FDEBUGFLAGS='-g'
 
#            FDEBUGFLAGS='-g'
 +
</pre>
 +
 +
=WINDOWS=
 +
== Intel Fortran ==
 +
The standard mexopts.bat file also needs to be slightly altered to compile the mex files on windows, <tt>/free</tt> must be added to the COMPFLAGS group
 +
<pre>
 +
rem ********************************************************************
 +
rem Compiler parameters
 +
rem ********************************************************************
 +
set COMPILER=ifort
 +
set COMPFLAGS=/fpp /Qprec "/I%MATLAB%/extern/include" -c -nologo -DMATLAB_MEX_FILE /free
 +
set OPTIMFLAGS=/MD -Ox -DNDEBUG
 +
set DEBUGFLAGS=/MD -Zi /PDB:"%OUTDIR%%MEX_NAME%%MEX_EXT%.pdb"
 +
set NAME_OBJECT=/Fo
 
</pre>
 
</pre>

Revision as of 08:56, 22 February 2008

LINUX

gfortran

#            FC='gfortran'
#            FFLAGS='-fPIC -fno-omit-frame-pointer -fexceptions -ffree-form'
#            FLIBS="$RPATH $MLIBS -lm"
#            FOPTIMFLAGS='-O'
#            FDEBUGFLAGS='-g'

g95

#            FC='g95'
#            FFLAGS='-fPIC -fno-omit-frame-pointer -fexceptions -ffree-form'
#            FLIBS="$RPATH $MLIBS -lm"
#            FOPTIMFLAGS='-O'
#            FDEBUGFLAGS='-g'

Intel Fortran

the directory path defined here in FLIBS is of course specific to your own intel fortran distribution and release number

#            FC='ifort'
#            FFLAGS='-fPIC -u -w95 -free -warn all'
#            FLIBS='$RPATH $MLIBS -L/opt/intel/fce/9.1.045/lib  -lm'
#            FOPTIMFLAGS='-O2'
#            FDEBUGFLAGS='-g'

WINDOWS

Intel Fortran

The standard mexopts.bat file also needs to be slightly altered to compile the mex files on windows, /free must be added to the COMPFLAGS group

rem ********************************************************************
rem Compiler parameters
rem ********************************************************************
set COMPILER=ifort
set COMPFLAGS=/fpp /Qprec "/I%MATLAB%/extern/include" -c -nologo -DMATLAB_MEX_FILE /free
set OPTIMFLAGS=/MD -Ox -DNDEBUG
set DEBUGFLAGS=/MD -Zi /PDB:"%OUTDIR%%MEX_NAME%%MEX_EXT%.pdb"
set NAME_OBJECT=/Fo