Intel® Fortran Compiler XE 13.1 User and Reference Guides
Before you invoke the compiler, you need set certain environment variables that define the location of compiler-related components.
The Intel® Visual Fortran Compiler installation includes a file that you can run to set environment variables.
On Linux* OS and OS X*, the file is a shell script named compilervars.sh or compilervars.csh.
On Windows* OS, the file is a batch file named compilervars.bat.
The following information is operating system-dependent.
Set the environment variables before using the compiler. You can use the source command to execute the shell script, compilervars.sh or compilervars.csh, from the command line to set them.
source <install-dir>/bin/compilervars.sh <arg>
The script takes an architecture argument <arg>:
ia32: Compiler and libraries for IA-32 architecture only
intel64: Compiler and libraries for Intel® 64 architecture only
For example, to execute this script file for the bash shell:
The user should use /opt/intel/bin/compilervars.sh ia32 if the installation was conducted by the root user. For a non-root installation, <path>/intel/bin/compilervars.sh ia32, where <path> is the installation directory.
source <install-dir>/bin/compilervars.sh ia32
If you use the C shell, use the .csh version of this script file:
source <install-dir>/bin/compilervars.csh ia32
If you want compilervars.sh to run automatically when you start Linux OS* or OS X*, you can edit your .bash_profile file and add the line above to the end of your file. For example:
# set up environment for Intel(R) compiler source <install-dir>/bin/compilervars.sh ia32
Intel® Composer XE creates symbolic links in the /opt/intel directory at install. You can source the environment variables using the symbolic links. If you have two versions of Intel® Composer XE 2013 installed, the most recently installed version will be linked symbolically.
If you compile a program without ensuring the proper environment variables are set, you will see an error similar to the following when you execute the compiled program:
./a.out: error while loading shared libraries: libimf.so: cannot open shared object file: No such file or directory