Be the first to rate this file! 8 Downloads (last 30 days) File Size: 12.35 KB File ID: #24347

MEXING WITH IFORT 11.0 IN 64 BIT MATLAB

by Leslie Foster

 

04 Jun 2009

FOR 64 BIT MATLAB IN WINDOWS MEXING WITH MATLAB 7.6 - 7.8 AND IFORT 11.0

| Watch this File

File Information
Description

   FOR 64 BIT MATLAB IN WINDOWS MEXING WITH MATLAB 7.6 - 7.8 WITH INTEL'S IFORT 11.0

To enable mexing with ifort version 11.0, rename the file with extension .b to have extension .bat (Matlab central regulations do not allow .bat files), and copy them to the folder:

   d:\program files\matlab\r20xyz\bin\win64\mexopts

(where r20xyz could for example be r2008a, r2008b or r2009a). These files are updated from the version 10.1 files. Then mex -setup should work after, potentially, a few addtional changes:

o If your software is installed on the C: drive rather than the D: drive then in intelf11msvs2005opts.bat three instances of D: need to be changed to C: and in intelf11msvs2005opts.stp one instance of C: should be changed to D:

o The location of your Fortran compiler may be at slightly different location. This may require a modification to the line in intelf11msvs2005opts.bat:

set IFORT_COMPILER11=D:\Program Files (x86)\Intel\Compiler\11.0\061\fortran

and to the line in intelf11msvs2005opts.stp

my $default_location = "D:\\Program Files (x86)\\Intel\\Compiler\\11.0\\061\\fortran";

The changes for 64 bit Intel Fortran 11 were made by modifying the 32 bit version by Kristjan Jonasson described at http://www.mathworks.com/matlabcentral/fileexchange/22290. Some of the above discussion parallels Kristjan's discussion.

associated files:

readme.txt -- describes how to add to MATLAB's mex utilility to allow use of the Intel Fortran 11.0 compiler

intelf11msvs2005opts.b and intelf11msvs2005opts.stp -- two files discussed in above

Files which can be used to test that the mex utility is working and which illustrate how BLAS and LAPACK routines can be called:

lupp.m -- describes the use of the lupp code

lupp.F -- the gateway routine for lupp

luppf.F -- a "computational routine" called by lupp.F

lupp_mex.m -- has examples of mex commands to compile lupp.F

lupp_test.m -- is a MATLAB routine that tests the compiled lupp

Leslie Foster (foster@math.sjsu.edu), 6-4-2009

            

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Windows mex setup with ifort 11.0

MATLAB release MATLAB 7.8 (R2009a)
Other requirements Intel ifort Fortran compiler
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
25 Jan 2011 Leslie Foster

As pointed out in
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283589

the type of nlhs and nrhs in Matlab's mexFunction should be int*4, even on a 64 bit computer. This means that changes are required in lupp.F and luppf.F. Line 38 of lupp.F should be changed to
      INTEGER*4 NLHS, NRHS
and line 25 of luppf.F should be changed to
      integer m,n,lda,ldl,ldu,ldp
      integer*4 nlhs
The original code worked in Matlab 7.8 but the correction is required for Matlab 7.9.

Also for lupp_mex.m to work with Matlab 7.9 (or greater, I presume, but have not tested) in lupp_mex.m the three occurrences of
version_num == 7.8
should be changed to
version_num >= 7.8).

Les Foster

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
external interfaces Leslie Foster 05 Jun 2009 11:15:31
mex Leslie Foster 05 Jun 2009 11:15:31
mex setup Leslie Foster 05 Jun 2009 11:15:31
mexing Leslie Foster 05 Jun 2009 11:15:31
ifort Leslie Foster 05 Jun 2009 11:15:31
fortran Leslie Foster 05 Jun 2009 11:15:31
blas Leslie Foster 05 Jun 2009 11:15:31
lapack Leslie Foster 05 Jun 2009 11:15:31

Contact us at files@mathworks.com