Be the first to rate this file! 51 downloads (last 30 days) File Size: 4.95 KB File ID: #22290

Windows mex setup with ifort 11.0

by Kristjan Jonasson

 

01 Dec 2008

Windows mexing with Matlab 7.6/7.7 (+probably others) and ifort 11.0

I am interested in collaboration

Download Now | Watch this File

File Information
Description

WINDOWS MEXING WITH MATLAB 7.6 AND 7.7 (AND PROBABLY OTHERS) WITH IFORT 11.0  
 
This submission contains three files that enable mexing with version 11.0 of ifort. The files should be copied to the folder:  
 
   c:\program files\matlab\r20xyz\bin\win32\mexopts  
 
(where r20xyz could for example be r2008a or r2008b), and the two files with extension .b should be renamed to have extension  
.bat (Matlab central regulations do not allow .bat files). These files are updated from the version 10.1 files.  
 
Then mex -setup should work.  
 
NOTE: The default location of ifort.exe has changed between versions 10.xxx and version 11 of the ifort compiler from:  
 
   C:\Program Files\Intel\Compiler\Fortran\10.1.011\IA32\Bin  
 
to:  
 
   C:\Program Files\Intel\Compiler\11.0\066\Fortran\Bin\IA32  
 
Note in particular that the order of Bin and IA32 has been reversed. The include and lib folders have also new locations. To create .stp and .bat files for other subversions of ifort 11, make copies of the files and appropriate changes in both of them (search for the version number, "11.0").  
 
To support other subversions of version 10 than 10.1.011 make copies of the files intelf10msvs2005opts.bat and intelf10msvs2005opts.stp and make the necessary changes in them (change e.g. 10.1.012 to 10.1.021). It is probably also possible to create similar files for versions 8.x and 9.x of the compiler.  
 
NOTE 1: There are some similar files by C.Chee on Matlab Central that inspired me for these, see http://www.mathworks.com/matlabcentral/fileexchange/18563.  
 
NOTE 2: For mexing with gcc, gfortran and g95, see  
http://sourceforge.net/projects/gnumex  
 
NOTE 3: I have not tested the intelf11msvs2005engmatopts.bat (for building engine applications).  
 
NOTE 4: One more change I have made to the bat file is to remove the /fixed flag from the compiler flags to allow free form input. In theory this should allow Fortran 95 programs in free format to be turned into mex files, but for some reason my short test file does not currently work (although my Fortran 77 test does work). I have not had time to look into this further.  
 
Nov.2008. Kristjan Jonasson (jonasson@hi.is)  

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
mex -setup with Intel Fortran and MS VS.Net

MATLAB release MATLAB 7.7 (R2008b)
Other requirements Intel ifort Fortran compiler
Zip File Content  
Other Files intelf11msvs2005engmatopts.b,
intelf11msvs2005opts.stp,
readme.txt,
intelf11msvs2005opts.b
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com