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

How to set up Matlab for MEX-file generation using ifort 12.0 on windows 7 64bit

Peter_Simon
Beginner
1,712 Views
I've been able to set up Matlab R2010a (64 bit) under Windows 7 (64 bit) to use ifort 12.0 (64 bit) for MEX file generation. I've created the two configuration files attached, and placed them in the standard directory within the Matlab installation path: c:/Program Files/MATLAB/R2010a/bin/win64/mexopts/. With these in place, the command

mex -setup

finds the ifort 12 compiler, and allows me to select and install it as the MEX compiler.

Thought this might be useful to others.

--Peter

0 Kudos
6 Replies
Steven_L_Intel1
Employee
1,712 Views
Thanks for the contribution!
0 Kudos
glinskyc
Beginner
1,712 Views
Peter,
I have been looking and trying to figure this out for quite some time, however I am running R2009b instead. Is there anything I should change about the files for this? Or will ifort 12.0 simply not work on 2009b?
I appreciate the help.
Chad
0 Kudos
glinskyc
Beginner
1,712 Views
Peter,
Shown below is the current error I'm getting. It seems to be getting stuck on looking for msvc90shellopts.stp file. Where would this file come from? It doesn't exist in the directory where I saved the other two (as you specify above).
>> mex -setup
Please choose your compiler for building external interface (MEX) files:
Can't locate C:\PROGRA~1\MATLAB\bin\win64/mexopts/\compilerComponents/msvc90shellopts.stp in @INC (@INC contains: C:/Program Files/MATLAB/sys/perl/win32/site/lib C:/Program Files/MATLAB/sys/perl/win32/lib . C:\PROGRA~1\MATLAB\bin\) at C:\PROGRA~1\MATLAB\bin\/mexsetup.pm line 437.
??? Error using ==> mex at 221
Unable to complete successfully.
0 Kudos
William_Sailor1
Beginner
1,712 Views
The scripts did not work as hoped in my 64 bit PC, running VS2010 with intel fortran 12 and Matlab 2011a. Note that the current VS2010 is not discussed in the thread.

Is the problem that Mathworks (maker of Matlab) and Intel are not getting along nowadays?

What are the prospects that the two environments will be out-of-the-box compatabile like they used to be??
0 Kudos
Steven_L_Intel1
Employee
1,712 Views
We have fine relations with Mathworks. But it is often the case that third-party scripts are written in a way that is specific to versions of the Intel compiler. Have you asked Mathworks for help on this?
0 Kudos
Zhongzhou_Yang
Beginner
1,712 Views
Hi, Dear Peter,
I just installedIntel Visual Fortran Composer XE 2011 on Windows 7 with 32 bit. I am wondering whether you have similar files to set up Matlab 2011b for Mex-file generation or not.
If not, could you provide some user guide to generate these files?
Thanks a lot!
Regards,
Zhongzhou Yang
0 Kudos
Reply