Problem with NonlinearVariationalProblem
Dear Firedrakers, Having updated Firedrake I'm having trouble running old code that previously worked. In particular one of the variational solvers isn't working. The code is: Q_initialprob = NonlinearVariationalProblem(Functional, z, bcs = bc1, nest=False) Q_initialsolve = NonlinearVariationalSolver(Q_initialprob, solver_parameters={ 'ksp_type':'gmres', 'pc_type':'lu', 'pc_factor_mat_solver_package': 'mumps' }) And my error message: Traceback (most recent call last): File "src/experiment_stochastic_QG.py", line 32, in <module> main() File "src/experiment_stochastic_QG.py", line 22, in main conserving_stochastic_QG_scheme(k, m) File "/home/tmb15/src/stochastic-gfd/stochastic_QG_paper/src/energy_conserving_stochastic_QG_model.py", line 374, in conserving_stochastic_QG_scheme nest=False) TypeError: __init__() got an unexpected keyword argument 'nest' (firedrake) tmb15@tom-Latitude-E5450:~/src/stochastic-gfd/stochastic_QG_paper$ gedit src/energy_conserving_stochastic_QG_model.py & I don't really know what I'm doing, but I tried just removing "nest = False", and got this error message: Traceback (most recent call last): File "src/experiment_stochastic_QG.py", line 32, in <module> main() File "src/experiment_stochastic_QG.py", line 22, in main conserving_stochastic_QG_scheme(k, m) File "/home/tmb15/src/stochastic-gfd/stochastic_QG_paper/src/energy_conserving_stochastic_QG_model.py", line 384, in conserving_stochastic_QG_scheme Q_initialsolve.solve() File "/home/tmb15/src/firedrake/src/firedrake/firedrake/variational_solver.py", line 192, in solve self.snes.solve(None, v) File "PETSc/SNES.pyx", line 537, in petsc4py.PETSc.SNES.solve (src/petsc4py.PETSc.c:171835) petsc4py.PETSc.Error: error code 56 [0] SNESSolve() line 4128 in /tmp/pip-Tvwyv5-build/src/snes/interface/snes.c [0] SNESSolve_NEWTONLS() line 230 in /tmp/pip-Tvwyv5-build/src/snes/impls/ls/ls.c [0] KSPSolve() line 620 in /tmp/pip-Tvwyv5-build/src/ksp/ksp/interface/itfunc.c [0] KSPSetUp() line 393 in /tmp/pip-Tvwyv5-build/src/ksp/ksp/interface/itfunc.c [0] PCSetUp() line 968 in /tmp/pip-Tvwyv5-build/src/ksp/pc/interface/precon.c [0] PCSetUp_LU() line 92 in /tmp/pip-Tvwyv5-build/src/ksp/pc/impls/factor/lu/lu.c [0] MatGetOrdering() line 260 in /tmp/pip-Tvwyv5-build/src/mat/order/sorder.c [0] MatGetOrdering_ND() line 19 in /tmp/pip-Tvwyv5-build/src/mat/order/spnd.c [0] No support for this operation for this object type [0] Cannot get rows for matrix type nest Any idea what I should do? Thanks, Tom
On 02/11/16 13:27, T. M. Bendall wrote:
Dear Firedrakers,
Having updated Firedrake I'm having trouble running old code that previously worked. In particular one of the variational solvers isn't working.
The code is:
Q_initialprob = NonlinearVariationalProblem(Functional, z, bcs = bc1, nest=False)
Q_initialsolve = NonlinearVariationalSolver(Q_initialprob, solver_parameters={ 'ksp_type':'gmres', 'pc_type':'lu', 'pc_factor_mat_solver_package': 'mumps' })
The specification of the matrix type now occurs in the solver_parameters. Use 'mat_type': 'aij' in the solver_parameters dict. Lawrence
Brilliant, everything seems to be working properly now. Thank you! On 02/11/16 13:52, Lawrence Mitchell wrote:
On 02/11/16 13:27, T. M. Bendall wrote:
Dear Firedrakers,
Having updated Firedrake I'm having trouble running old code that previously worked. In particular one of the variational solvers isn't working.
The code is:
Q_initialprob = NonlinearVariationalProblem(Functional, z, bcs = bc1, nest=False)
Q_initialsolve = NonlinearVariationalSolver(Q_initialprob, solver_parameters={ 'ksp_type':'gmres', 'pc_type':'lu', 'pc_factor_mat_solver_package': 'mumps' }) The specification of the matrix type now occurs in the solver_parameters. Use 'mat_type': 'aij' in the solver_parameters dict.
Lawrence
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (2)
- 
                
                Lawrence Mitchell
- 
                
                T. M. Bendall