Thanks for the suggestion. I tried those two and obtained the following. It suggests that I try snes_converged_reason but I think I did. Maybe I'm not specifying the parameters correctly? Any ideas what else I can try? Cheers, Francis Saving file at /QG2L-Stommel-psi-u-q.ipynb Linear firedrake_0_ solve did not converge due to DIVERGED_PCSETUP_FAILED iterations 0 PCSETUP_FAILED due to FACTOR_NUMERIC_ZEROPIVOT Nonlinear firedrake_0_ solve did not converge due to DIVERGED_LINEAR_SOLVE iterations 0 Traceback (most recent call last): File "test.py", line 93, in <module> soln0 = steadylinearQG2d(Ztrial, Ztest, Gwinds, bcs) File "test.py", line 48, in steadylinearQG2d linear_solver.solve() File "/home/fpoulin/software/firedrake/src/firedrake/firedrake/variational_solver.py", line 223, in solve solving_utils.check_snes_convergence(self.snes) File "/home/fpoulin/software/firedrake/src/firedrake/firedrake/solving_utils.py", line 233, in check_snes_convergence %s""" % (snes.getIterationNumber(), msg)) firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. Reason: Inner linear solve failed to converge after 0 iterations with reason: unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Sent: Wednesday, June 21, 2017 11:01:49 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] problem solving a linear system On 21/06/17 15:58, Francis Poulin wrote:
Thank you Andrew. We will look at that closely.
But if we are solving a linear system using LU then we shouldn't be using snes though should we? That is the error we are getting in convergence.
We always use SNES, but for linear problems it is set to ksponly (so it's equivalent to just using KSP). That error looks like potentially you had a zero pivot in the LU factorisation? What does running the solve with: "ksp_converged_reason": True, "snes_converged_reason": True, (in addition to your other parameters) say? Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake