ScaLAPACK

Description

ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines (think parallel LAPACK).

User instructions

ScaLAPACK is available via the modules system. To add it to your environment run:

$ module load scalapack/2.0.2

A relevant OpenMPI module must also be loaded. ScaLAPACK is trickier to use than LAPACK but extensive documentation is available on the netlib website.

To link ScaLAPACK, add ‘-lscalapack’ to the link command. Note that a LAPACK implementation must also be linked (e.g. MKL or LAPACK).

The MKL also contains an (optimised) implementation of ScaLAPACK.

License

Modified BSD license.

Admin notes

# Intel version
ml intel openmpi lapack
CMAKE_PREFIX_PATH=$OPENMPI_ROOT CC=icc CXX=icpc cmake ../scalapack-2.0.2 -DCMAKE_INSTALL_PREFIX=/common/debian/9.1/MPI/intel/2017.4/openmpi/2.1/scalapack/scalapack-2.0.2 -DBUILD_TESTING=ON -DBLAS_LIBRARIES:STRING=-lblas -DLAPACK_LIBRARIES:STRING=-llapack
make
make test

# GCC version
ml purge
ml gcc openmpi lapack
CMAKE_PREFIX_PATH=$OPENMPI_ROOT cmake ../scalapack-2.0.2 -DCMAKE_INSTALL_PREFIX=/common/debian/9.1/MPI/gcc/6.3/openmpi/2.1/scalapack/scalapack-2.0.2 -DBUILD_TESTING=ON -DBLAS_LIBRARIES:STRING=-lblas -DLAPACK_LIBRARIES:STRING=-llapack
make
make test

BLAS and LAPACK implementations are required to compile the library but these need not be the ones linked to when compiling applications. For simplicity I chose the netlib reference implementations.

The resultant library (lib/libscalapack.a) can then be just copied to the appropriate directory on the NFS server.