SLEPc is a software package that provides functionality for solving a variety of eigenspectrum problems, both standard and generalised. It relies on various different sparse and dense matrix and vector formats that are defined in the PETSc package. Naturally, this means PETSc must be correctly installed before a working copy of SLEPc can be installed as described here.
deal.II has wrapper classes to the solver and spectral transformation parts of SLEPc that loosely provide almost the same interfaces as the wrapper classes to the PETSc functionality. They are used in a simple case in step-36.
SLEPc requires the environment variables
PETSC_ARCH to be set already and usually
requires you to set the environment
SLEPC_DIR as well. If the environment
variable is set, then
deal.II will pick up on this during
configuration; just as before with PETSc.
cmake can be used to override the values
SLEPc_DIR if, for example, these environment
variables are not set at all. You can also
-DDEAL_II_WITH_SLEPC=OFF as a flag during
configuration to have deal.II completely
ignore a SLEPc installation.
Note: The version numbers (x,y,z) of your SLEPc installation must be identical to the same version numbers of your PETSc installation.
Installing SLEPc is not much of a challenge once PETSc has been
correctly installed (check this first!). What is happening here,
is that SLEPc scans your PETSc installation and figures out how
that was configured; its location, the
PETSC_ARCH, MPI settings, debug
mode, and so on.
This builds a simple SLEPc installation:
tar xvzf slepc-x-y-z.tar.gz cd slepc-x-y-z export SLEPC_DIR=`pwd` export LD_LIBRARY_PATH=$SLEPC_DIR/$PETSC_ARCH/lib:$LD_LIBRARY_PATH ./configure makeNow let SLEPc check his own sanity:
make testwill self-check the serial (and MPI) implementation of SLEPc.
Finally, you may want to put the two
commands above into your
~/.cshrc files, with the first one replaced by
cmakeinstallation should then be able to pick up where you installed SLEPc and include it automatically in the deal.II build without any further need for instructions. You will see at the bottom of the
cmakeoutput if that is what actually happened.