Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

how to use intel fortran compiler 9.1 in matlab 7.1

pazixu
Beginner
587 Views
Hi all,

I have some problems concerning mexing fortran code in MATLAB.

The following is my situation:
Matlab version: 7.1 R14sp3
Fortran compiler: intel visual fortran 9.1
IDE: Visual studio 2005
OS: Windows XP sp2

I tried to download a modified intelf8.1.bat for my case and adjusted it to 9.1 version. But I still got error when compiling. Please help, thanks a lot.

options file is shown below:
----------------------------------------------------------------
-> Options file = C:Documents and SettingspazixuApplication
DataMathWorksMATLABR14SP3mexopts.bat
MATLAB = C:MATLAB71
-> COMPILER = ifort
-> Compiler flags:
COMPFLAGS = /iface:cvf /IC:MATLAB71/extern/include -c -w95 -nologo
-DMATLAB_MEX_FILE
OPTIMFLAGS = /MD -O3 -Og -DNDEBUG
DEBUGFLAGS = /MD -Zi
arguments =
Name switch = /Fo
-> Pre-linking commands =
-> LINKER = link
-> Link directives:
LINKFLAGS = /dll /export:MEXFUNCTION /MAP
/LIBPATH:"C:MATLAB71externlibwin32digitaldf60" libmx.lib
libmex.lib libmat.lib msvcrt.lib /implib:_lib1219.x
LINKDEBUGFLAGS = /debug /pdb:"yprimef.mexw32.pdb"
LINKFLAGSPOST =
Name directive = /out:"yprimef.mexw32"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler = rc /fo "mexversion.res"
-> Resource Linker =
----------------------------------------------------------------

Errors are like below. Since too many alike syntax error, I just excerpt
one from the output.

--> "ifort /iface:cvf /IC:MATLAB71/extern/include -c -w95 -nologo
-DMATLAB_MEX_FILE /FoC:DOCUME~1pazixuLOCALS~1Tempyprimefg.obj /MD
-O3 -Og -DNDEBUG yprimefg.F"

fortcom: Warning: Bad # preprocessor line
yprimefg.F(19) : Error: Syntax error, found ',' when expecting one of:
=> = . ( %
MWPOINTER PLHS(*), PRHS(*)
-----------------------^
0 Kudos
1 Reply
Steven_L_Intel1
Employee
587 Views
Try adding /fpp to the command line. Are you sure you need /iface:cvf?
0 Kudos
Reply