Installed locations:
Intel-MKL includes both BLAS and LAPACK routines. See how Intel-MKL compares with competing libraries:
To compile and link a sinle threaded BLAS and/or LAPACK routine with the Intel-MKL library enter:
ifort pgm.f(90) -o pgm-sequential \
$MKLROOT/lib/em64t/libmkl_solver_lp64_sequential.a \
-Wl,--start-group \
$MKLROOT/lib/em64t/libmkl_intel_lp64.a \
$MKLROOT/lib/em64t/libmkl_sequential.a \
$MKLROOT/lib/em64t/libmkl_core.a \
-Wl,--end-group \
-lpthread
To compile and link a multiple threaded (N.B.: the number of threads will be equal to the number of processors present on the node where the compilation and linking was performed) BLAS and/or LAPACK routine with the Intel-MKL library enter:
ifort pgm.f(90) -o pgm-omp \
$MKLROOT/lib/em64t/libmkl_solver_lp64.a \
-Wl,--start-group \
$MKLROOT/lib/em64t/libmkl_intel_lp64.a \
$MKLROOT/lib/em64t/libmkl_intel_thread.a \
$MKLROOT/lib/em64t/libmkl_core.a \
-Wl,--end-group \
-openmp \
-lpthread
Set MKLROOT to: /u/local/compilers/intel/current/current/mkl
Replace pgm.f(90) with the name of the file containing your source code and pgm with the name of the executable to be created.
For other Intel-MKL routines, select the appropriate libraries from the
$MKLROOT/lib/em64t directory.
See the documentation at:
/u/local/compilers/intel/11.1/current/Documentation/en_US/mkl/.
For C, replace ifort with icc; for C++ replace ifort with icpc. Note that for C++, you might additionally have to declare any functions you call as being "extern" as in the following example:
extern "C" void sgesv(int *, int *, float *, int *, int *, float *, int *, int * );
code the function name and the argument list for the function you are calling.