Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Calling Matlab from IVF8

Rohitha_J_
Beginner
318 Views
Hi,

Has anyone successful in creating the *.lib files needed to
call Matlab from IVF8. *.lib files supplied by Matlab for
CVF does not seem to compatible with IVF8. Fortran routine
I use for calling Matlab is compiled with "default" calling
convention of IVF8.

-Rohitha
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
318 Views

I suppose you're talking about Matlab R12? (As I was told, R13 does have set of libraries for IVF).

For what it's worth, attached is (working for me) "fengdemo.f" Matlab sample compiled with IVF8, but I had to change the calling convention from "Default" to "CVF" -- note also that Link and Include paths are extendedby Matlab's "msvc60" directory.

Another approach could be to retain "Default" calling convention and spell out INTERFACE blocks with !DEC$ATTRIBUTES STDCALL, REFERENCEand ALIAS for every Matlab routine (BTW, I think it would be nice if Intel folks could have added !DEC$ATTRIBUTES CVF), but that's pretty tedious.

Jugoslav

0 Kudos
Rohitha_J_
Beginner
318 Views
Actually, I am using R13 and it does not have libraries for IVF8.

I was able to get it work with INTERFACE blocks and using ATTRIBUTES
STDCALL, REFERENCE, MIXED_STR_LEN_ARG and ALIAS and then linking
with libraries for msvc60.

Thanks for your help.

-Rohitha
0 Kudos
Reply