Difference between revisions of "Intel compilers"

From Peyton Hall Documentation
Jump to navigation Jump to search
Line 1: Line 1:
{{oldfaq|NUM=152}}
+
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.
  
There are multiple versions of the Intel compilers installed. Depending on which version you want to run, add one of these sets of lines to your shell startup file (.bashrc for bash users, .cshrc for tcsh users):
 
  
For version 8.1:
+
== Setup ==
For bash:
+
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
source /usr/peyton/intel/8.1/icc/bin/iccvars.sh
+
** bash
source /usr/peyton/intel/8.1/ifc/bin/ifortvars.sh
+
**: <tt>source /usr/peyton/intel/8.1/icc/bin/iccvars.sh</tt>
source /usr/peyton/intel/8.1/idb/bin/idbvars.sh
+
**: <tt>source /usr/peyton/intel/8.1/ifc/bin/ifortvars.sh</tt>
 
+
**: <tt>source /usr/peyton/intel/8.1/idb/bin/idbvars.sh</tt>
For tcsh:
+
** tcsh
 
+
**: <tt>source /usr/peyton/intel/8.1/icc/bin/iccvars.csh</tt>
source /usr/peyton/intel/8.1/icc/bin/iccvars.csh
+
**: <tt>source /usr/peyton/intel/8.1/ifc/bin/ifortvars.csh</tt>
source /usr/peyton/intel/8.1/ifc/bin/ifortvars.csh
+
**: <tt>source /usr/peyton/intel/8.1/idb/bin/idbvars.csh</tt>
source /usr/peyton/intel/8.1/idb/bin/idbvars.csh
+
* Version 9.0
 
+
** bash
For version 9.0:
+
**: <tt>source /usr/peyton/intel/9.0/cc/bin/iccvars.sh</tt>
For bash:
+
**: <tt>source /usr/peyton/intel/9.0/fc/bin/ifortvars.sh</tt>
 
+
**: <tt>source /usr/peyton/intel/9.0/idb/bin/idbvars.sh</tt>
source /usr/peyton/intel/9.0/cc/bin/iccvars.sh
+
** tcsh
source /usr/peyton/intel/9.0/fc/bin/ifortvars.sh
+
**: <tt>source /usr/peyton/intel/9.0/cc/bin/iccvars.csh</tt>
source /usr/peyton/intel/9.0/idb/bin/idbvars.sh
+
**: <tt>source /usr/peyton/intel/9.0/fc/bin/ifortvars.csh</tt>
 
+
**: <tt>source /usr/peyton/intel/9.0/idb/bin/idbvars.csh</tt>
For 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
 
  
  
 +
== 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.
 
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.
  
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.
+
'''''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.
This information from Robert Lupton:
 
 
 
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
 
 
 
 
 
An addition from Hiranya Peiris:
 
  
I have a mixed code with f77 and f90 source files and the ifc compiler had no problem recognizing the f77 files and compiling them. However I had to use a linker flag called -Vaxlib. Otherwise it complained about iargc or get_arg functions.
 
  
 +
=== 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 '<tt>.SUFFIXES : .f90</tt>' to your makefiles, as well as a rule such as '<tt>.f90.o:; ifc $(FFLAGS) -c $*.f90</tt>'.
  
A recent issue related to the Intel compilers use on Fedora Core 2 machines was tracked down by Robert Lupton, who points us to this webpage:
 
  
  http://newweb.ices.utexas.edu/misc/ctype.c
+
=== 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.
  
This will do as a workaround until newer versions of the compiler suite can be tested for compatability on the network.
+
[[Category:Software]]

Revision as of 17:51, 16 May 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.


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


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.