Intel® Fortran Compiler for Linux* - Non-Default Installations

The Intel® compilers have installation requirements that some users would like to bypass. The technique covered in this FAQ provides workarounds for the following default constraints:

  • The rpm utility must be used
  • Root access must be available
  • Multiple minor versions cannot be installed

To install the compilers on Linux* systems and bypass one or more of the above requirements, please use the unsupported method described below.

The following example steps demonstrate the installation of the ia-32 Fortran compiler version 8.1.022, without root privileges, into a user's home directory. The $HOME directory can be substituted by whatever you desire. The steps can be repeated for multiple compilers, and can be generalized to also apply to the C++ compiler, and compilers for the Itanium architecture.

  1. Move the compiler tar archive into the desired directory ($HOME for this example) and create an "opt" subdirectory.
    # <download l_fc_pc_8.1.022.tar.gz to $HOME>
    $ cd $HOME
    $ mkdir opt
  2. Extract the compiler archive which is sitting in your current working directory.
    $tar xzvf l_fc_pc_8.1.022.tar.gz
  3. Using rpm2cpio, convert the compiler  rpm files to cpio format.
    $ rpm2cpio l_fc_pc_8.1.022/intel-ifort8-8.1-022.i386.rpm |cpio -i
  4. Rename the default directory to something more specific if you would like to install multiple version 8 compilers.
    $ mv intel_fc_80 intel_fc_8.1.022
  5. Fixup all text files under the cpio'd compiler's bin directory by substituting each replacement string "<INSTALLDIR>" with the new actual path of your liking.
    $ cd intel_fc_8.1.022
    $ for i in $(file bin/* |grep text |cut -f1 -d:)
    > do
    > mv $i $i.orig
    > sed "s:<INSTALLDIR>:$(pwd):g" $i.orig >$i
    > done
    $ cd bin
    $ cat ifort # visually inspect paths
    $ chmod +x  ifort uninstall.sh
    $ rm *.orig
  6. Copy your license file to the licenses directory.
    $ cd ..
    $ cp path-to-mylicense.lic licenses/
  7. Enable the compiler and give it a try.
    $ cd $HOME/src
    $ source $HOME/opt/intel_fc_8.1.022/bin/ifortvars.sh
    $ ifort test.f
Per informazioni più dettagliate sulle ottimizzazioni basate su compilatore, vedere il nostro Avviso sull'ottimizzazione.