This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

ilu preconditioning in parallel

+1 vote

I would like to use ILU preconditioning with the PETSc backend in parallel. By default, with the code
```
from dolfin import *

mesh = UnitSquareMesh(10, 10, 'crossed')

V = FunctionSpace(mesh, 'CG', 1)

u = TrialFunction(V)
v = TestFunction(V)

a = dot(grad(u), grad(v)) * dx
L = 1.0 * v * dx

A = assemble(a)
b = assemble(L)

bcs = DirichletBC(V, 0.0, 'on_boundary')
bcs.apply(A, b)

solver = KrylovSolver('cg', 'ilu')
sol = Function(V)
solver.solve(A, sol.vector(), b)
I'm getting the error message
[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: No support for this operation for this object type!
[0]PETSC ERROR: Matrix format mpiaij does not have a built-in PETSc ILU!
```
when run with mpiexec -n 2.

Are there packages/options needed in the compilation of Dolfin/PETSc in order to get this to work? What are possible alternatives?

asked Dec 29, 2013 by nschloe FEniCS User (7,120 points)

1 Answer

+3 votes
 
Best answer

The ilu preconditioner is not available in parallel. With PETSc I think hypre_euclid is the closest alternative. Try list_krylov_solver_preconditioners() to get a list of available preconditioners. For even more flavors than already wrapped in dolfin, have a look at the petsc4py demo.

answered Dec 30, 2013 by mikael-mortensen FEniCS Expert (29,340 points)
selected Dec 31, 2013 by nschloe
...