Hello Lawrence, Thanks for the suggestion. Now the options that are have are the following: nonlinear_solver = NonlinearVariationalSolver(nonlinear_problem, solver_parameters={ 'ksp_type':'preonly', 'ksp_monitor': True, 'matnest': False, 'mat_type': 'aij', 'pc_type':'lu', 'snes_converged_reason': True, 'ksp_converged_reason': True, 'pc_factor_mat_solver_package': 'mumps' }) Unfortunately, as you can read below, I still seem to get a similar error. I am almost certainly doing something silly, I just can't quite tell what that is. If you have other ideas please let me know and I will happy give them a try. Cheers, Francis $ python QG1L_Stommel_psiuq.py Linear firedrake_1_ solve did not converge due to DIVERGED_PCSETUP_FAILED iterations 0 PCSETUP_FAILED due to FACTOR_OUTMEMORY Nonlinear firedrake_1_ solve did not converge due to DIVERGED_LINEAR_SOLVE iterations 0 Traceback (most recent call last): File "QG1L_Stommel_psiuq.py", line 115, in <module> nonlinear_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 160, 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_convered_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: Thursday, March 30, 2017 4:24 AM To: firedrake Subject: Re: [firedrake] close to fixing my nonlinear QG solver Hi Francis,
On 30 Mar 2017, at 02:50, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
$ python QG1L_Stommel_psiuq.py Linear firedrake_1_ solve did not converge due to DIVERGED_PCSETUP_FAILED iterations 0 PCSETUP_FAILED due to FACTOR_NUMERIC_ZEROPIVOT
The PETSc LU by default doesn't do any pivoting, and you may have a zero on the diagonal somewhere? Try using mumps instead, by adding 'pc_factor_mat_solver_package': 'mumps' to your nonlinear solver options. Cheers, Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake