Sunday, 05 September 2010
you are here: Home arrow Web Articles arrow Matlab arrow Install Intel Fortran 10.0. under Matlab
Install Intel Fortran 10.0. under Matlab
Matlab version 7.5 R2007 doesn't support the Intel Fortran 10.0 compiler but if we have install the Intel Fortran 10.0 compiler in Windows XP it is possible install it in Matlab using mex -setup. For do this, following the nexts steps.
  1. The enviroment variable IFORT_COMPILER10 must be exists and its value must be the path where Intel Visual Fortran is installed.
  2. let $MATLABROOT  be the directory where Matlab is installed. Check that the folder $MATLABROOT\bin\win32\mexopts contains the files:
    • intelf91msvs2005engmatopts.bat
    • intelf91mvs2005opts.bat
    • intelf91msvs2005opts.stp
  3. In the same folder, make a copy of the files:
    •     intelf91msvs2005engmatopts.bat
    •     intelf91mvs2005opts.bat
    •     intelf91msvs2005opts.stp
  4. Rename the files copy with the names:
    • intelf91msvs2005engmatopts.bat ==>> intelf10msvs2005engmatopts.bat
    • intelf91mvs2005opts.bat ==>> intelf10mvs2005opts.bat
    • intelf91msvs2005opts.stp ==>> intelf10msvs2005opts.stp
  5. Edit intelf10msvs2005opts.bat  file and replace all cases of  IFORT_COMPILER91 by IFORT_COMPILER10
  6. Edit  intelf10msvs2005opts.stp file :
    • Replace the name of function called intelf91msvs2005opts by intelf10msvs2005opts
    • Replace all cases of intelf91msvs2005opts by intelf10msvs2005opts
    • Find default_location varieble (line 13) and change its value by the path where Intel Fortran is installed.
    • Replace all cases of IFORT_COMPILER91 by IFORT_COMPILER10 (line 37)
    • Line 39: Replace 9.1 by 10.0
    • Find at the windows registry (run regeditt) the  SOFTWARE\Intel\Compilers\Fortran\version variable and look its value (100.025 in my computer)
    • Line 45: Replace 91 by  100.025 (at the path)
    • Linea 49: Replace 9.1 por 10.0
  7. Edit intelf10msvs2005engmatopts.bat file:
    • Replace all cases of IFORT_COMPILER91 by IFORT_COMPILER10
    • Line 58: Replace 9.1 por 10.0
    • Line 83: Where  version appears, replace  9.1 by 10.0.25
    • Line 86: Replace IFORT_COMPILER91, by IFORT_COMPILER10


Run Matlab and execute mex -setup. When Matlab asks "Would you like mex to locate installed compilers [y]/n?" you must answer n. LAter, should be appear a menu with a list of the compilers supported by Matlab. In this list, must be appera the Intel Fortran 10 compiler.

With this procedure you could install Intel fortran 10 compiler in your Matlab, but it is possible that an error will appear because Matlab tries to install the Miscrosoft Visual linker in a standar path that could be doesn't the path where the linker is really installed. To solve this problem, the file  msvc80opts.stp must be patched in this way:

  • Edit msvc80opts.stp
    • At line where the variable default_location is declared, replace the default path by the really path.
    • Comment the next lines:
      • line 26: if (&correct_version("$msvc8_root\\VC\\bin\\cl.exe","14.0")){ 
      • line 28: }
      • line 39: if (&correct_version("$msvc8_root\\VC\\bin\\cl.exe","14.0")){ 
      • line 41: }
      • line 49: if (&correct_version("$default_location\\VC\\bin\\cl.exe","14.0")){
      • line 51: }

   

 
Advertisement
Copyright © 2010 Juan Francisco Garamendi Bragado. All rights reserved