Intel Fortran compiler

Intel Fortran compiler

When I installed the Intel Cluster Studio XE 2013 evaluation version on my x86_64 linux CentOS workstation with Intel Sandy Bridge processors, the prerequisite check said that my linux operating system was unsupported. Does that mean that the Intel compiler, Intel MPI or Intel MKL libraries may not work properly after they are installed? I proceeded to install the software anyway.
I wanted to use the Intel MPI and Intel compiler ifort and MKL library to compile a code. But now when I try to use the Intel compiler from the installed directory in my makefile
F90 = /opt/intel/impi/
I get the message: ifort: command not found

What file should F90= point to?

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You need to use the "source" command to define ifort (and establish libraries), as explained in the documentation.  For example:

source /opt/intel/bin/ intel64

Retired 12/31/2016

Intel MPI has  mpif90 as a wrapper for gfortran.  If you are combining with a build which uses ifort, you need mpiifort.  Some customers alter their installation so that mpif90 acts as an alias for mpiifort.

In order to use Intel MPI, you need both the Intel compilervars source which Steve quoted, and the

source /opt/intel/impi/bin64/

Note the different way in which you select 64-bit mode for impi.

Thank you for the info.  I used the source commands and compiled the code ok.  I used the compiler flags in makefile.comm:



LFLAGS= -lm -shared-intel -lstdc++

CPPFLAGS = -cpp -O3 -DUSE_64

FFLAGS = -r8 -O3 -ipo -DNONVERBOSE -extend-source 132

F90 = /opt/intel/impi/



My question is are the Intel MKL BLAS libraries included in this compiled code?

I ran the code with the executable and it was 35% faster than the code compiled with gfortran and openmpi.

But when I compiled the code explicitly including the MKL library using:


FFLAGS += -mkl=cluster

the code ran slower, but the code is supposed to run faster when the BLAS library is included.

Could you please tell me how I can include the MKL BLAS library that will speed up the code?

According to

I guess you may want the plain -mkl option, which enables the use of BLAS functions which use OpenMP library for threading support.  These are OK to use in a cluster application; any BLAS call will execute within the same node where it is called.  The reference doesn't make clear the exact intended purpose of the "cluster" option, but it may pertain to built-in MKL clustering facilities such as pardiso.

If your application has a flag such as you quote, setting it on and linking with -mkl flag presumably will get you the MKL BLAS functions.  If your data sets are too small for efficient use of MKL (e.g. matrix multiplication with maximum dimension < 16) you may find that MKL doesn't improve performance.  BLAS level 1 calls typically are faster with in-line code than with any version of library function calls (provided that you have normal compiler optimization turned on).  ifort does an excellent job with in-line compilation at -O3 even of matrix multiplication when the data set is small enough not to benefit from threading.

Leave a Comment

Please sign in to add a comment. Not a member? Join today