Intel compilers

From Peyton Hall Documentation
Jump to navigation Jump to search

Template:oldfaq

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: For 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

For 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

For version 9.0: For 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

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


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.

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.


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

This will do as a workaround until newer versions of the compiler suite can be tested for compatability on the network.