# Dolfin GMRES vs. CBC.Block LGMRES

This question is maybe way too general, but perhaps you can give me some hints:

I want to solve a nonsymmetric problem with CBC.Block.

The standard dolfin solve method with Trilinos backend solves the system in 5 iterations:

A, b = assemble_system(a, L)

solve(A, x.vector(), b, "gmres", "ilu")

However trying to solve the system with CBC.Block fails:

Ap = ILU(A)

Ainv = LGMRES(A, precond=Ap)

x = Ainv * b

with the following:

File "/usr/local/

y, resids, rank, s = lstsq(hess, e1)

File "/usr/lib/

a1, b1 = map(asarray_

File "/usr/lib/

"array must not contain infs or NaNs")

ValueError: array must not contain infs or NaNs

I also tried BiCGStab as a solver (3 iterations with builtin Trilinos solver, NaN residuum in case of the CBC.Block implementation).

As far as I understand, both the Trilinos GMRES and the CBC.Block LGMRES use the IFPACK ILU preconditioner. So does this mean the only difference between the two libraries is the implementation of the iterative methods?

I want to use the CBC.Block solver, because I want to implement a Schur complement method where I have to solve another linear system per GMRES step.

Do you have any hints what I could do to make things work with CBC.Block? I know this question is very general. I will gladly provide more information if needed.

Thanks in advance, Claas

## Question information

- Language:
- English Edit question

- Status:
- Solved

- For:
- CBC.Block Edit question

- Assignee:
- No assignee Edit question

- Solved by:
- Claas Abert

- Solved:

- Last query:

- Last reply: