I'm solving an eigenvalue problem using SLEPcEigenSolver and I want to set the preconditioner.
In a previous question the solution was to use the following to set the preconditioner by:
eps = eigensolver.eps()
st = eps.getST()
st.setType('sinvert')
ksp = st.getKSP()
ksp.setType('preonly')
pc = ksp.getPC()
pc.setType('lu')
pc.setFactorSolverPackage('mumps')
Unfortunately, when I try this with both the development version and the stable version for Ubuntu, I get the error:
*** Error: Unable to access SLEPcEigenSolver objects in python.
*** Reason: dolfin must be configured with slepc4py enabled.
Both slepc and slepc4py are installed on my system. How do I configure dolfin to use them? Do I need to build it from source or is there a better way?