MATLAB: Mex -setup -v FORTRAN, Failure using R2014a with Win7, MSVS2013 sp1 and Intel Fotran Composer 2013 SP1

fortranintel fortran composer 2013mex compilermsvs2013r2014awindows 7

mex -setup -v worked just fine to set up C++, but failed to setup Fortran. From the output, it looks like matlab is not properly supporting the latest compilers from 2013, but would have worked if MSVS was 2012. Is there a way I can easily fix the problem by making a link, adding a path or copying a file?
Here is the output:
mex -setup FORTRAN -v
Verbose mode is on.
... Looking for compiler 'Intel Visual Fortran Composer XE 2011 with Microsoft SDK 7.1' ...
... Looking for environment variable 'IFORT_COMPILER12' ...No.
Did not find installed compiler 'Intel Visual Fortran Composer XE 2011 with Microsoft SDK 7.1'.
... Looking for compiler 'Intel Visual Fortran Composer XE 2011 with Microsoft Visual Studio 2008' ...
... Looking for environment variable 'IFORT_COMPILER12' ...No.
Did not find installed compiler 'Intel Visual Fortran Composer XE 2011 with Microsoft Visual Studio 2008'.
... Looking for compiler 'Intel Visual Fortran Composer XE 2011 with Microsoft Visual Studio 2010' ...
... Looking for environment variable 'IFORT_COMPILER12' ...No.
Did not find installed compiler 'Intel Visual Fortran Composer XE 2011 with Microsoft Visual Studio 2010'.
... Looking for compiler 'Intel Visual Fortran Composer XE 2013 with Microsoft Visual Studio 2008' ...
... Looking for environment variable 'IFORT_COMPILER14' ...Yes ('C:\Program Files (x86)\Intel\Composer XE 2013 SP1\').
... Looking for file 'C:\Program Files (x86)\Intel\Composer XE 2013 SP1\Bin\intel64\ifort.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Intel\Composer XE 2013 SP1' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...No.
Did not find installed compiler 'Intel Visual Fortran Composer XE 2013 with Microsoft Visual Studio 2008'.
... Looking for compiler 'Intel Visual Fortran Composer XE 2013 with Microsoft Visual Studio 2010' ...
... Looking for environment variable 'IFORT_COMPILER14' ...Yes ('C:\Program Files (x86)\Intel\Composer XE 2013 SP1\').
... Looking for file 'C:\Program Files (x86)\Intel\Composer XE 2013 SP1\Bin\intel64\ifort.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Intel\Composer XE 2013 SP1' ...Yes.
... Looking for environment variable 'VS100COMNTOOLS' ...No.
Did not find installed compiler 'Intel Visual Fortran Composer XE 2013 with Microsoft Visual Studio 2010'.
... Looking for compiler 'Intel Visual Fortran Composer XE 2013 with Microsoft Visual Studio 2012' ...
... Looking for environment variable 'IFORT_COMPILER14' ...Yes ('C:\Program Files (x86)\Intel\Composer XE 2013 SP1\').
... Looking for file 'C:\Program Files (x86)\Intel\Composer XE 2013 SP1\Bin\intel64\ifort.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Intel\Composer XE 2013 SP1' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
Did not find installed compiler 'Intel Visual Fortran Composer XE 2013 with Microsoft Visual Studio 2012'.
Error using mex
No supported compiler or SDK was found. For options, visit
http://www.mathworks.com/support/compilers/R2014a/win64.

Best Answer

As you've discovered, your particular combination of Intel Fortran and Visual Studio is not supported in 14a ( Details ).
You are on the right track if you want to hack something together. None of this is documented or supported, I can offer a few hints:
  1. Don't meddle with the files in your preferences folder ('prefdir'). Instead, put the XML file you are experimenting with in your current working folder ('pwd'). Give it a name like 'custom.xml'; you can instruct MEX to use this file with 'mex -f custom.xml other arguments'.
  2. You are effectively going to want to update custom.xml file such that it preserves the Intel-specific settings, but swaps in the VS2013 settings. This is often, but not always, a largely mechanical process. The file matlabroot\bin\win64\mexopts\msvcpp2013.xml should give you a strong sense of the edits you'll want to make in custom.xml
Hope this helps.
Related Question