ScaLAPACK on Lisa

The MPI version of the ScaLAPACK library, compiled from http://www.netlib.org/scalapack is available via the command:

  • Intel compilers:
  module load fortran c scalapack openmpi
# If you are using scalapack version < 2.0 NOTE: this is deprecated
  module load fortran c mkl scalapack openmpi blacs/openmpi
  • GNU compilers:
  module load scalapack/gnu openmpi/gnu blacs/openmpi/gnu
# If you are using scalapack version < 2.0 NOTE: this is deprecated
  module load scalapack/gnu openmpi/gnu

Compiling and linking

Use the flag -lscalapack

and the flags for the following packages:

  • LAPACK
  • BLAS
  • CBLAS (Only if you are using scalapack version < 2.0 (DEPRECATED))
  • BLACS (Only if you are using scalapack version < 2.0 (DEPRECATED))

Examples

  • Using gnu compilers
  module load scalapack/gnu lapack/gnu blas/gnu openmpi/gnu
  mpif90 prog.f -lscalapack -llapack -lblas
# For scalapack version < 2.0 (DEPRECATED):
  module load scalapack/gnu lapack/gnu blas/gnu cblas/gnu \
       openmpi/gnu blacs/openmpi/gnu
  mpif90 prog.f -lscalapack -lfblacs -lcblacs -lblacs \
	 -llapack -lf77blas -lcblas -lblas
  • Using intel compilers
  module load fortran c scalapack lapack blas
  mpif90 prog.f -lscalapack -llapack -lblas
# For scalapack version < 2.0 (DEPRECATED):
  module load fortran c scalapack lapack blas cblas \
	 openmpi blacs/openmpi
  mpif90 prog.f -lscalapack -lfblacs -lcblacs -lblacs \
		-llapack -lblas

NOTE: above examples are using the reference implementation of LAPACK and BLAS. See MKL for much more efficient implementations of these libraries.