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

Fortran & Matlab

klamat2
初学者
977 次查看
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 项奖励
6 回复数
Jugoslav_Dujic
重要分销商 II
977 次查看
Does this thread help?
Jugoslav
0 项奖励
klamat2
初学者
977 次查看
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 项奖励
g_f_thomas
初学者
977 次查看
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 项奖励
klamat2
初学者
977 次查看
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 项奖励
os3
初学者
977 次查看
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 项奖励
os3
初学者
977 次查看
update of scripts, see attachment
0 项奖励
回复