BLAS, LAPACK and ScaLAPACK
BLAS, Lapack and its parallel version Scalapack are among of the most widely used libraries in computational science. Their importance is such that most computer vendors provide a specialist version for their hardware. Some examples
- MKL (Math Kernal Library) which is the version of Lapack/Scalapack developed by Intel
- ACML which is similar, but developed by AMD
- LibSci which contains ACML and some other libraries and is found on the Cray machines
MKL on Ferlin/Ekman/Ellen
MKL is the recommended version of Lapack/Scalapack for Ferlin. Many versions of MKL are installed on Ferlin to see which versions are installed use the command
module avail mkl
Note the version numbers correspond to the intel compiler version number that that version of MKL came with rather than the specific MKL version.
Linking MKL
MKL is a complicated library with many options. It also supports many different compilers, and 32 bit (the default) or 64 bit integers. So the compile and linking flags can be complicated. Intel have provided a website to make getting the right flags easier
The flags for a typical situation, using the intel compiler and 32 bit integers are as follows.
LDFLAGS="-L/pdc/vol/i-compilers/11.1/icc/mkl/lib/em64t -lmkl_intel_lp64 \
-lmkl_sequential -lmkl_core -lpthread \
-Wl,--rpath,/pdc/vol/i-compilers/11.1/icc/mkl/lib/em64t"
CFLAGS="-I/pdc/vol/i-compilers/11.1/icc/mkl/include"
LibSci on Lindgren
Lapack and Scalapack are very easy to use on Lindgren as the Cray libsci is integrated with the cc/CC/ftn wrapper scripts and are automatically called.
To use LAPACK on Lindgren you must first
module add xt-libsci fftw
then use the cc/CC/ftn wrapper scripts as normal. In the current version of xt-libsci it is necessary to have the fftw module loaded even if ffts are not needed as just linking with xt-libsci will result in problems at the link stage.
ACML on Ekman/Povel
ACML is an implementation of BLAS and LAPACK optimised especially for AMD processors. The library contains other routines for FFT and random number computations too.
Latest Version: 5.1.0 -- Also available: 5.0.0, 4.3.0
To use the library load first the module:
module load acml/5.1.0-general
Then you can use an advisory script that helps you to select the right library as well as to specify the necessary compiler and linker options:
acml-advisor
For more information see the documentation in the installation directory or AMD's online documentation on the web.


