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

how to detect the installed version

martymike
Novice
2,608 Views
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?
0 Kudos
3 Replies
Steven_L_Intel1
Employee
2,608 Views
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
0 Kudos
martymike
Novice
2,608 Views

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?

0 Kudos
Steven_L_Intel1
Employee
2,608 Views
Yes, they could have 10.0 and 10.1 both installed, but IFORT_COMPILER10 is used for both.
0 Kudos
Reply