Compiling SLEPc 3.5.4 on ARCHER (Cray XC30)

SLEPc (Scalable Library for Eigenvalue Problem Computations) a library for parallel computation of eigenvalues and eigenvectors. Based on PETSc.


It is recommended you use SLEPc major and minor versions that correspond to the underlying PETSc installation. e.g. At time of writing, cray-petsc/ (v3.5.x line) is the default PETSc module on ARCHER. Hence these instructions detail a build of SLEPc 3.5.4.

Certain environment modules must be loaded prior to compilation. Either the Cray, GNU or Intel compilers can be used by swapping to the corresponding PrgEnv. The Intel compiler is used here as an example. Note: Substitute cray-petsc for cray-petsc-complex if doing a complex build.

module swap PrgEnv-cray PrgEnv-intel
module load cray-petsc/
module load arpack


Download the SLEPc source and run the configure script (substitute /path/to/install/dir for the directory you wish to install SLEPc in):

tar xf slepc-3.5.4.tar.gz
cd slepc-3.5.4
./configure --prefix=/path/to/install/dir --with-arpack-dir=$ARPACK_DIR --with-arpack-flags=-lparpack_MPI-XC30,-larpack_XC30

Use the suggested make command given as the output at the end of configuration. e.g:

 Configure stage complete. Now build the SLEPc library with (gnumake build):
   make SLEPC_DIR=$PWD PETSC_DIR=/opt/cray/petsc/

After the above make completes, again use the prompted command:

gmake[1]: Leaving directory `/home1/z01/z01/dsloanm/slepc_build/slepc-3.5.4'
Now to install the library do:
make SLEPC_DIR=/home/z01/z01/dsloanm/slepc_build/slepc-3.5.4 PETSC_DIR=/opt/cray/petsc/ install

Finally, you will be prompted to test the installation with:

Install complete.
Now to check if the libraries are working do (in current directory):
make SLEPC_DIR=/path/to/install/dir PETSC_DIR=/opt/cray/petsc/ PETSC_ARCH="" test

With the Intel compiler, tests 10 and 7f may fail with messages similar to:

*******************Error detected during compile or link!*******************
/home/z01/z01/dsloanm/slepc_build/slepc-3.5.4/src/eps/examples/tests test7f

These can be safely ignored. They are a result of the test system incorrectly detecting the compiler warning:

icc: command line warning #10120: overriding '-xCORE-AVX-I' with '-msse3'

as an error.

Finally, if you intend to use your installation with pkg-config, you must edit the SLEPc.pc file:

vi /path/to/install/dir/lib/pkgconfig/SLEPc.pc

to remove the PETSc requirement line:

Requires: PETSc = 3.5.2

Failure to do so will result in the PrgEnv breaking with lpthread related errors.