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

Fortran & Matlab

klamat2
Beginner
792 Views
Hello NG,

I'm looking forward to mex fortran code with ivf 8.1 in the matlab environment under windows 2000.

So far ivf is not supported by mathworks i need help to rewrite the df66opts.bat or the intelc71opts.bat to work with intel visual fortran 8.1 - hints I found in some ng's are all for linux.

Thanks
- Matthew
0 Kudos
6 Replies
Jugoslav_Dujic
Valued Contributor II
792 Views
Does this thread help?
Jugoslav
0 Kudos
klamat2
Beginner
792 Views
Thank's for this hint, but my problem is the opposit using of matlab and fortran - i want to call fortran code compiled with ivf 8.1 from the matlab environment ...

Thanks
- Matthew
0 Kudos
g_f_thomas
Beginner
792 Views
IIRC this can be done with Matlab 14 which dispenses with the mex and allows you to load a classic/AX dll. Check it out on the MathWorks site.

HTH,
Gerry T.
0 Kudos
klamat2
Beginner
792 Views
Hallo G.F.

You're right regarding the matlab interface to generic dll's, but the advantage of the old-fashioned mex is the absence of necessity to change the "high-level" m-code, thats is calling the fortran subroutines.

Thanks
- Matthew
0 Kudos
os3
Beginner
792 Views
For anyone who whishes to build MATLAB mex dll's with ifc 8.1:
I have attached an archive with two options files to be put into the "%MATLAB%inwin32mexopts " directory.
After copying the files, use "mex -setup", it should find the compiler and install the "mexopts.bat" file
(at least on two machines :-).
To build a mex dll, one of the issues is (as mentioned before) to link the dll with the correct libraries using the correct calling convention. In these options files I have chosen the CVF calling convention and linking against the df60 libraries; appears to work for my projects. I have not yet tested all mex library calls (but "mexErrMsgTxt" and some others work).
The setup script is a hack of other scripts; one of the issues is that one actually needs to set two `root' directories in the mexopts.bat file, and I do not think the matlab mex setup process allows for that. This script therefore assumes a environment var to get around that. See the warning.
(no guarantees ;- )
BJ
0 Kudos
os3
Beginner
792 Views
update of scripts, see attachment
0 Kudos
Reply