- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to be able to write a script to determine if someone has installed the IVF compiler, and which version. Do you have a recommended way to do that?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, the catch is that there can be more than one version installed. Some things that may help you.
The environment variable IFORT_COMPILER10 is defined if any 10.x compiler is installed. Its value is a semicolon-separated list of paths to the various compiler folders. I find that sometimes if a version is uninstalled it still shows up in this list.
Registry keys under HKEY_LOCAL_MACHINESOFTWAREIntelCompilersFORTRAN list the installed versions, but again there may be entries for no-longer-installed versions.
If you have already established the ifort environment and simply want to know what version you are using, you can compile and run a program such as the following one, compiled with /FPP:
integer IVERSION
IVERSION = __INTEL_COMPILER
write (*,'(A,I0,A,I0)') 'Version ',IVERSION/100,'.',MOD(IVERSION,100)/10
end
The environment variable IFORT_COMPILER10 is defined if any 10.x compiler is installed. Its value is a semicolon-separated list of paths to the various compiler folders. I find that sometimes if a version is uninstalled it still shows up in this list.
Registry keys under HKEY_LOCAL_MACHINESOFTWAREIntelCompilersFORTRAN list the installed versions, but again there may be entries for no-longer-installed versions.
If you have already established the ifort environment and simply want to know what version you are using, you can compile and run a program such as the following one, compiled with /FPP:
integer IVERSION
IVERSION = __INTEL_COMPILER
write (*,'(A,I0,A,I0)') 'Version ',IVERSION/100,'.',MOD(IVERSION,100)/10
end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
I realize that there could be more than one version installed - that's one of the things I was worried about.
I currently have 9.1 installed and I have an environment var named IFORT_COMPILER91 defined. I know that people with 10.0 installed have a IFORT_COMPILER10. I was wondering about people with version 10.1, and whether there was a better way than testing for these environment vars. Sounds like the registry entries are an alternative, but not necessarily a superior one.
Can people have 10.0 and 10.1 installed at the same time?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, they could have 10.0 and 10.1 both installed, but IFORT_COMPILER10 is used for both.

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