Slaton Lipscomb

Slaton's Tips:
Installing the Intel Fortran Compiler, ifort

Last updated April 14, 2006
Comments/corrections welcome.

Portland Compiler Group's pgf90 is the supported Fortran compiler for a number of scientific applications on the Linux platform. However, a single-seat Portland Fortran workstation license costs between $400 and $700, plus an additional $175 to $560 per year for updates. This may be prohibitive for some labs.

Alternatively, Intel's Fortran compiler ifort (formerly ifc) has a free unsupported license available on the Linux platform. In addition, it currently has better optimization for newer Intel CPU features, including hyperthreading and SSE2. It is not recommended, however, to use this compiler with AMD processors.

The Intel Fortran compiler for Linux can be downloaded here:

  « http://www.intel.com/software/products/compilers/flin/index.htm »

You will also need to obtain a license by email.

At the time of this writing, the current ifort release is 8.0.039. It is compatible with Red Hat releases through RH 9, and glibc releases through 2.3.2.

ifort is RPM-based. Starting with release 8.0, you must be root to install it, since the installation path is hard-coded to the system location /opt. If you are not an administrator on the machine, you will have to extract the files using rpm2cpio, and then manually install them to the desired location.

For a root install, skip to step 3.

First untar the archive, then extract the installation files to a local directory using these commands:

$ tar xzvf l_fc_pc_8.0.039.tar.gz
$ cd l_fc_pc_8.0.039
$ rpm2cpio ../intel-ifort8-8.0-47.i386.rpm | \
    cpio -ivd --no-absolute-filenames
$ mv opt/ [desired location]

Be sure to replace [desired location] with a place that you have write-permission and wish to install the software.

You will also need to edit the files ifort, ifc, ifort.cfg, ifc.cfg, ifortvars.csh and ifortvars.sh, and replace all references to <INSTALLDIR> with the correct installation full path.

Now skip to step 4.

Now cd to the directory containing your untarred ifort files and run install.

$ ./install

You will be asked a series of questions during the install. These are the replies that you should give:

1
accept
/opt/intel_fc_80
-U --replacefiles

Finally, several environment variables need to be defined in order to use ifort. See the files ifortvars.csh and ifortvars.sh for more information. For our local installation, I set the following environment variables for csh and tcsh users. For sh and bash, change accordingly.

setenv INTEL              /opt/intel_fc_80/bin
setenv F77                /opt/intel_fc_80/bin/ifort
setenv F90                /opt/intel_fc_80/bin/ifort
setenv FC                 /opt/intel_fc_80/bin/ifort
setenv INTEL_LICENSE_FILE /opt/intel_fc_80/licenses
setenv PATH               /opt/intel_fc_80/bin:${PATH}
setenv LD_LIBRARY_PATH    ${LD_LIBRARY_PATH}:/opt/intel_fc_80/lib
setenv MANPATH            ${MANPATH}:/opt/intel_fc_80/man

The preferred way to do this is using the Modules system.