← Back to team overview

dolfin team mailing list archive

Re: [Question #108259]: PETSc Krylov solver did not converge (PETSc reason -4).

 

Question #108259 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/108259

Anders Logg proposed the following answer:
On Thu, Apr 29, 2010 at 06:45:28AM -0000, Garth Wells wrote:
> Question #108259 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/108259
>
> Garth Wells proposed the following answer:
>
> On 29/04/10 00:42, N.A. Borggren wrote:
> > Question #108259 on DOLFIN changed:
> > https://answers.launchpad.net/dolfin/+question/108259
> >
> > N.A. Borggren proposed the following answer:
> > Hello,
> >     It seems that my Krylov solver was working better a few weeks ago than
> > now as well.  I applied the assemble_system suggestion above but I still get
> > an error message for a humble 756x756 matrix that works just fine without
> > the 'gmres' option in solve.  I was relying on 'gmres' before to solve
> > problems when just "solve(A, self.u1.vector(), b)" (PETSc LU solver,
> > umfpack) would run out of memory.
>
> Try using
>
>    solver = KrylovSolver("gmres")
>    solver.parameters["monitor_convergence"] = True
>    solver.parameters["error_on_nonconvergence"] = False
>
>    solver.solve(A, x, b)
>
> It's possible that your solver wasn't converging before, but is only now
> picked up because DOLFIN now throws an error by default upon failed
> convergence.
>
> Garth

And do the same thing using the old "working" DOLFIN version (ideally
for a simple test case). Then post the output (the convergence) for
both. Then we'll know for sure there's a problem. I also expect it
didn't converge before (since things seem to work fine here and I
don't remember changing anything except for converting a warning to an
error message).

--
Anders

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.