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.
- 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
- Extract the compiler archive which is sitting in your current working directory.
$tar xzvf l_fc_pc_8.1.022.tar.gz
- 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
- 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
- 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:)
$ cd bin
> mv $i $i.orig
> sed "s:<INSTALLDIR>:$(pwd):g" $i.orig >$i
$ cat ifort # visually inspect paths
$ chmod +x ifort uninstall.sh
$ rm *.orig
- Copy your license file to the licenses directory.
$ cd ..
$ cp path-to-mylicense.lic licenses/
- 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
Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização