- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to support old versions of my software so I keep several versions of Intel Fortran Installed.
In order to select the correct version in Visual Studio I have a script file which prompts me to select the version and sets IFORT_COMPILER11 to the compiler directory. This works because it overrides whatever setting is saved in Visual Studio.
Now that we have Visual Fortran 12 we have a new environment variable IFORT_COMPILER12. How do these two variables interact?
Here is my idea for my new script but it does not find the compiler when I select 12.0:
@echo off
rem #****************************************************
rem # Compiler
rem #****************************************************
echo Compiler Version
echo 1 ivf 12.0
echo 2 ivf 11.1.067
echo 3 ivf 11.0.074
set /p ans=Select compiler [1]
if '%ans%'=='' set ans=1
if '%ans%'=='1' set IfortInstallDir="C:\\Program Files (x86)\\Intel\\ComposerXE-2011\\"
if '%ans%'=='2' set IfortInstallDir="C:\\Program Files (x86)\\Intel\\Compiler\\11.1\\067\\"
if '%ans%'=='3' set IfortInstallDir="C:\\Program Files (x86)\\Intel\\Compiler\\11.0\\074\\fortran\\"
set IFORT_COMPILER12=%IfortInstallDir%
set IFORT_COMPILER11=%IfortInstallDir%
call %IfortInstallDir%bin\\ifortvars ia32 vs2008
set IfortInstallDir
set PATH=%path%;%vspath%
cd %vse%\\RomaxDevelopment
devenv /useenv
In order to select the correct version in Visual Studio I have a script file which prompts me to select the version and sets IFORT_COMPILER11 to the compiler directory. This works because it overrides whatever setting is saved in Visual Studio.
Now that we have Visual Fortran 12 we have a new environment variable IFORT_COMPILER12. How do these two variables interact?
Here is my idea for my new script but it does not find the compiler when I select 12.0:
@echo off
rem #****************************************************
rem # Compiler
rem #****************************************************
echo Compiler Version
echo 1 ivf 12.0
echo 2 ivf 11.1.067
echo 3 ivf 11.0.074
set /p ans=Select compiler [1]
if '%ans%'=='' set ans=1
if '%ans%'=='1' set IfortInstallDir="C:\\Program Files (x86)\\Intel\\ComposerXE-2011\\"
if '%ans%'=='2' set IfortInstallDir="C:\\Program Files (x86)\\Intel\\Compiler\\11.1\\067\\"
if '%ans%'=='3' set IfortInstallDir="C:\\Program Files (x86)\\Intel\\Compiler\\11.0\\074\\fortran\\"
set IFORT_COMPILER12=%IfortInstallDir%
set IFORT_COMPILER11=%IfortInstallDir%
call %IfortInstallDir%bin\\ifortvars ia32 vs2008
set IfortInstallDir
set PATH=%path%;%vspath%
cd %vse%\\RomaxDevelopment
devenv /useenv
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Andrew,
You can simply switch from IVF versions using VS options. Just go to Tools>Options>Intel Visual Fortran>Compilers.
Pedro
You can simply switch from IVF versions using VS options. Just go to Tools>Options>Intel Visual Fortran>Compilers.
Pedro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I knew that but it is so easy to forget to select the correct version and waste 20 minutes compiling for the wrong version.
My prompt also shows my software version but I deleted those for my post.
It also enables you to have several Visual Studio copies open at a time with each having different version settings. This is great for comparing old and new software for changes at runtime.
Andy
My prompt also shows my software version but I deleted those for my post.
It also enables you to have several Visual Studio copies open at a time with each having different version settings. This is great for comparing old and new software for changes at runtime.
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Open the command prompt environment for the version you want and type:
devenv /useenv
This will use the environment you set up from the command line.
devenv /useenv
This will use the environment you set up from the command line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve. So here is the guts needed for the last three versions of Fortran:
@echo off
echo Compiler Version
echo 1 MySoftware V3
echo 2 MySoftware V2
echo 3 MySoftware V1
set /p ans=Select compiler [1]
if '%ans%'=='' set ans=1
if '%ans%'=='1' call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat" ia32 vs2008
if '%ans%'=='2' call "C:\Program Files (x86)\Intel\Compiler\11.1\067\bin\ifortvars.bat" ia32
if '%ans%'=='3' call "C:\Program Files (x86)\Intel\Compiler\11.0\074\fortran\Bin\ifortvars.bat" ia32
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv" /useenv
@echo off
echo Compiler Version
echo 1 MySoftware V3
echo 2 MySoftware V2
echo 3 MySoftware V1
set /p ans=Select compiler [1]
if '%ans%'=='' set ans=1
if '%ans%'=='1' call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat" ia32 vs2008
if '%ans%'=='2' call "C:\Program Files (x86)\Intel\Compiler\11.1\067\bin\ifortvars.bat" ia32
if '%ans%'=='3' call "C:\Program Files (x86)\Intel\Compiler\11.0\074\fortran\Bin\ifortvars.bat" ia32
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv" /useenv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is correct.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page