Epetra crashes with sor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
New
|
Undecided
|
Unassigned |
Bug Description
Consider the following code:
from dolfin import *
import random
import sys
mesh = UnitInterval(40)
V = FunctionSpace(mesh, "CG", 2)
parameters[
assert ('sor', 'Successive over-relaxation') in krylov_
def main(ic):
out = Function(V)
u = TrialFunction(V)
v = TestFunction(V)
A = assemble(inner(u, v)*dx)
b = assemble(inner(ic, v)*dx)
solve(A, out.vector(), b, "cg", "sor")
return out
if __name__ == "__main__":
ic = Function(V)
vec = ic.vector()
for i in range(len(vec)):
vec[i] = random.random()
out = main(ic)
It crashes with:
Solving linear system of size 81 x 81 (Epetra Krylov solver).
AZ_check_options: ERROR: sym GS preconditioning can only be used with MSR matrices.
...
*** -------
*** Error: Unable to solve linear system using Epetra Krylov solver.
*** Reason: Solution failed to converge (error code 1).
*** Where: This error was encountered inside EpetraKrylovSol
*** -------
It works if you either
a) remove the "sor" string
b) change the backend to PETSc.