Intel compilers

From Peyton Hall Documentation

(Difference between revisions)
Jump to: navigation, search
(Removed references to 8.1, 9.0; changed 10.0 to 10.1; added 11.0 information)
(Removed the warning about having to use older compilers on some machines; modified the note about -static to suggest it for both condor and hydra)
Line 41: Line 41:
'''''NOTE:'''''
'''''NOTE:'''''
-
: The compilers may not run on all Linux machines in the building (should be at least RedHat 7.2).  You will need to use compiler version 9 or below on machines running RedHat 7.x or below (I believe hydra is the last one).  Also note that in the case of Hydra, you should probably build statically linked binaries to ensure the libraries needed to execute the program are available on the compute nodes (linker option '-static').  The license we have for the compilers allows for 2 users to compile code simultaneously; if you get an error about compiling, try waiting a few minutes and running the command again.
+
If compiling code for use on [[Cluster Computing|Hydra]] or [[Condor|condor]], you should probably build statically linked binaries to ensure the libraries needed to execute the program are available on the compute nodes (linker option '-static').  The license we have for the compilers allows for 2 users to compile code simultaneously; if you get an error about compiling, try waiting a few minutes and running the command again.

Revision as of 23:11, 12 March 2009

Many have found that the compilers from Intel generate faster code than the standard GNU compilers. We try to keep up with the licensing from Intel so we have somewhat recent versions of the compilers installed, and below you'll find more information about them.


Contents

Setup

There are multiple versions of the Intel compilers installed. Depending on which version you want to run, you'll need to source some scripts to get all your paths setup properly. Add one of these sets of lines to your shell startup file (.bashrc for bash users, .cshrc for tcsh users).

  • Version 11.0
    Starting with version 11.0, the Intel Compiler directory structure has changed a bit. The C++ compiler, Fortran compiler, and Intel Debugger are all within the same directory tree. The new method for calling the setup script is as follows (replace <arch> with one of ia32 for 32-bit machines, or intel64 for 64-bit machines):
    • bash
      • C/C++ Compiler & Debugger
        source /usr/peyton/intel/11.0/bin/iccvars.sh <arch>
      • Fortran Compiler & Debugger
        source /usr/peyton/intel/11.0/bin/ifortvars.sh <arch>
    • csh/tcsh
      • C/C++ Compiler & Debugger
        source /usr/peyton/intel/11.0/bin/iccvars.csh <arch>
      • Fortran Compiler & Debugger
        source /usr/peyton/intel/11.0/bin/ifortvars.sch <arch>
  • Version 10.1
    • 32-bit
      • bash
        source /usr/peyton/intel/10.1/cc32/bin/iccvars.sh
        source /usr/peyton/intel/10.1/fc32/bin/ifortvars.sh
        source /usr/peyton/intel/10.1/idb32/bin/idbvars.sh
      • tcsh
        source /usr/peyton/intel/10.1/cc32/bin/iccvars.csh
        source /usr/peyton/intel/10.1/fc32/bin/ifortvars.csh
        source /usr/peyton/intel/10.1/idb32/bin/idbvars.csh
    • 64-bit
      • bash
        source /usr/peyton/intel/10.1/cc64/bin/iccvars.sh
        source /usr/peyton/intel/10.1/fc64/bin/ifortvars.sh
        source /usr/peyton/intel/10.1/idb64/bin/idbvars.sh
      • tcsh
        source /usr/peyton/intel/10.1/cc64/bin/iccvars.csh
        source /usr/peyton/intel/10.1/fc64/bin/ifortvars.csh
        source /usr/peyton/intel/10.1/idb64/bin/idbvars.csh

Use

The Intel compiler suite is installed in /usr/peyton/intel, consisting of the C (icc) and Fortran (ifort) compilers as well as a debugger from Intel.

NOTE: If compiling code for use on Hydra or condor, you should probably build statically linked binaries to ensure the libraries needed to execute the program are available on the compute nodes (linker option '-static'). The license we have for the compilers allows for 2 users to compile code simultaneously; if you get an error about compiling, try waiting a few minutes and running the command again.


Source files

The Fortran compiler assumes that the source files are called *.f90 (or else it tries to compile f77, or at least I think that that's what happens). Also, you'll need to add '.SUFFIXES : .f90' to your makefiles, as well as a rule such as '.f90.o:; ifc $(FFLAGS) -c $*.f90'.


Linking

Some users have had to use the linker flag -Vaxlib, otherwise the compiler complained about iargc or get_arg functions. Another issue related to the Intel compilers use on Fedora Core 2 machines is described on the page http://newweb.ices.utexas.edu/misc/ctype.c. This may no longer be an issue, as I think the compiler version that was installed has since been upgraded.


32 vs. 64-bit

As of version 10 of the Intel compiler we have both x86 and x86_64 versions of the compiler installed. The 32-bit version will make 32-bit executables and the 64-bit version will make 64-bit executables.

You must compile your code using the proper compiler for the platform on which you will want to run your executable!

While the 32-bit compiler might compile code on a 64-bit machine, there's no guarantee that all the necessary 32-bit libraries will be available on all machines... especially if you intend to use condor. Stick with the 64-bit compiler and you'll save yourself a lot of headaches.

If you're not sure what platform you're using, run the following command:

uname -i

Anything in the form of ix86 is 32-bit, x86_64 is 64-bit

Personal tools