Intel compilers

From Peyton Hall Documentation

(Difference between revisions)
Jump to: navigation, search
(Added information about the 10.0 compiler and some notes about 32 and 64 bit compiling)
Line 1: Line 1:
-
{{inuse|1 hour to add information about the Intel 10.0 compiler}}
 
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.
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.

Revision as of 16:29, 27 September 2007

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 8.1
    • bash
      source /usr/peyton/intel/8.1/icc/bin/iccvars.sh
      source /usr/peyton/intel/8.1/ifc/bin/ifortvars.sh
      source /usr/peyton/intel/8.1/idb/bin/idbvars.sh
    • tcsh
      source /usr/peyton/intel/8.1/icc/bin/iccvars.csh
      source /usr/peyton/intel/8.1/ifc/bin/ifortvars.csh
      source /usr/peyton/intel/8.1/idb/bin/idbvars.csh
  • Version 9.0
    • bash
      source /usr/peyton/intel/9.0/cc/bin/iccvars.sh
      source /usr/peyton/intel/9.0/fc/bin/ifortvars.sh
      source /usr/peyton/intel/9.0/idb/bin/idbvars.sh
    • tcsh
      source /usr/peyton/intel/9.0/cc/bin/iccvars.csh
      source /usr/peyton/intel/9.0/fc/bin/ifortvars.csh
      source /usr/peyton/intel/9.0/idb/bin/idbvars.csh
  • Version 10.0
    Starting with version 10.0, we have both 32-bit and 64-bit versions of the Intel compiler installed. See the important notes below.
    • 32-bit
      • bash
        source /usr/peyton/intel/10.0/cc/bin/iccvars.sh
        source /usr/peyton/intel/10.0/fc/bin/ifortvars.sh
        source /usr/peyton/intel/10.0/idb/bin/idbvars.sh
      • tcsh
        source /usr/peyton/intel/10.0/cc/bin/iccvars.csh
        source /usr/peyton/intel/10.0/fc/bin/ifortvars.csh
        source /usr/peyton/intel/10.0/idb/bin/idbvars.csh
    • 64-bit
      • bash
        source /usr/peyton/intel/10.0/cce/bin/iccvars.sh
        source /usr/peyton/intel/10.0/fce/bin/ifortvars.sh
        source /usr/peyton/intel/10.0/idbe/bin/idbvars.sh
      • tcsh
        source /usr/peyton/intel/10.0/cc/bin/iccvars.csh
        source /usr/peyton/intel/10.0/fc/bin/ifortvars.csh
        source /usr/peyton/intel/10.0/idb/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:

The compilers may not run on all Linux machines in the building (should be at least RedHat 7.2). 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.


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.

Personal tools