Dear all, I get an error similar to an old error reported here: https://github.com/firedrakeproject/firedrake/issues/303 The error is fixed when adding David's suggestion " parameters["assembly_cache"]["enabled"] = False " at the top of the script, but it seems weird because I am not running in parallel. I am attaching two files if you want to see the lines where the error appears. The traceback of the error is the following: -------------------------------------------------------- File "buoy-swe.py", line 131, in <module> (phi0, eta0, W0, Z0) = solvers_SV(rhs, mu0_5, mu_solver0_5, phi_solver0_5, eta_solver1, phi_solver1, eta0, phi0, Z0, W0, eta1, phi1, Z1, W1, W0_5, step_b, rho, Mass, dt); File "/e/data1/users/matak/opt/firedrake/Ship/Modules/Wave-maker/solvers.py", line 164, in solvers_SV phi_solver0_5.solve() # Solve for phi0_5 File "<string>", line 2, in solve File "/opt/firedrake/3.0/lib/python2.7/site-packages/PyOP2-0.11.0_173_g1e3c1eb-py2.7-linux-x86_64.egg/pyop2/profiling.py", line 197, in wrapper return f(*args, **kwargs) File "/opt/firedrake/3.0/lib/python2.7/site-packages/firedrake/variational_solver.py", line 287, in solve self.snes.solve(None, v) File "PETSc/SNES.pyx", line 516, in petsc4py.PETSc.SNES.solve (src/petsc4py.PETSc.c:161228) File "PETSc/petscsnes.pxi", line 284, in petsc4py.PETSc.SNES_Jacobian (src/petsc4py.PETSc.c:31311) File "/opt/firedrake/3.0/lib/python2.7/site-packages/firedrake/variational_solver.py", line 175, in form_jacobian ctx._jac.M._force_evaluation() File "/opt/firedrake/3.0/lib/python2.7/site-packages/firedrake/matrix.py", line 143, in M self.assemble() File "/opt/firedrake/3.0/lib/python2.7/site-packages/firedrake/matrix.py", line 72, in assemble self._assembly_callback(self.bcs) File "/opt/firedrake/3.0/lib/python2.7/site-packages/firedrake/assembly_cache.py", line 340, in inner PETSc.Mat.Structure.DIFFERENT_NONZERO_PATTERN) File "PETSc/Mat.pyx", line 616, in petsc4py.PETSc.Mat.copy (src/petsc4py.PETSc.c:113902) petsc4py.PETSc.Error: error code 73 [0] SNESSolve() line 3840 in /tmp/pip-0XEmR8-build/src/snes/interface/snes.c [0] SNESSolve_KSPONLY() line 41 in /tmp/pip-0XEmR8-build/src/snes/impls/ksponly/ksponly.c [0] SNESComputeJacobian() line 2203 in /tmp/pip-0XEmR8-build/src/snes/interface/snes.c [0] MatCopy() line 3771 in /tmp/pip-0XEmR8-build/src/mat/interface/matrix.c [0] Object is in wrong state [0] Not for factored matrix Thanks, Anna.
Hi Anna, can you report this as a github issue please, attaching all the files necessary to run the problem? I have a very vague idea about what might be happening, but obviously can't reproduce because I can't run the test case. I /think/ what might be happening is that you assemble an operator, and then go into solve, petsc "factors" the matrix as part of that step, seemingly in place. But I thought that was not the default, so I'm confused. Lawrence
On 11 Dec 2015, at 18:12, Anna Kalogirou <a.kalogirou@leeds.ac.uk> wrote:
Dear all,
I get an error similar to an old error reported here: https://github.com/firedrakeproject/firedrake/issues/303
The error is fixed when adding David's suggestion " parameters["assembly_cache"]["enabled"] = False " at the top of the script, but it seems weird because I am not running in parallel. I am attaching two files if you want to see the lines where the error appears.
The traceback of the error is the following: -------------------------------------------------------- File "buoy-swe.py", line 131, in <module> (phi0, eta0, W0, Z0) = solvers_SV(rhs, mu0_5, mu_solver0_5, phi_solver0_5, eta_solver1, phi_solver1, eta0, phi0, Z0, W0, eta1, phi1, Z1, W1, W0_5, step_b, rho, Mass, dt); File "/e/data1/users/matak/opt/firedrake/Ship/Modules/Wave-maker/solvers.py", line 164, in solvers_SV phi_solver0_5.solve() # Solve for phi0_5 File "<string>", line 2, in solve File "/opt/firedrake/3.0/lib/python2.7/site-packages/PyOP2-0.11.0_173_g1e3c1eb-py2.7-linux-x86_64.egg/pyop2/profiling.py", line 197, in wrapper return f(*args, **kwargs) File "/opt/firedrake/3.0/lib/python2.7/site-packages/firedrake/variational_solver.py", line 287, in solve self.snes.solve(None, v) File "PETSc/SNES.pyx", line 516, in petsc4py.PETSc.SNES.solve (src/petsc4py.PETSc.c:161228) File "PETSc/petscsnes.pxi", line 284, in petsc4py.PETSc.SNES_Jacobian (src/petsc4py.PETSc.c:31311) File "/opt/firedrake/3.0/lib/python2.7/site-packages/firedrake/variational_solver.py", line 175, in form_jacobian ctx._jac.M._force_evaluation() File "/opt/firedrake/3.0/lib/python2.7/site-packages/firedrake/matrix.py", line 143, in M self.assemble() File "/opt/firedrake/3.0/lib/python2.7/site-packages/firedrake/matrix.py", line 72, in assemble self._assembly_callback(self.bcs) File "/opt/firedrake/3.0/lib/python2.7/site-packages/firedrake/assembly_cache.py", line 340, in inner PETSc.Mat.Structure.DIFFERENT_NONZERO_PATTERN) File "PETSc/Mat.pyx", line 616, in petsc4py.PETSc.Mat.copy (src/petsc4py.PETSc.c:113902) petsc4py.PETSc.Error: error code 73 [0] SNESSolve() line 3840 in /tmp/pip-0XEmR8-build/src/snes/interface/snes.c [0] SNESSolve_KSPONLY() line 41 in /tmp/pip-0XEmR8-build/src/snes/impls/ksponly/ksponly.c [0] SNESComputeJacobian() line 2203 in /tmp/pip-0XEmR8-build/src/snes/interface/snes.c [0] MatCopy() line 3771 in /tmp/pip-0XEmR8-build/src/mat/interface/matrix.c [0] Object is in wrong state [0] Not for factored matrix
Thanks,
Anna. <buoy-swe.py><solvers.py>_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (2)
- 
                
                Anna Kalogirou
- 
                
                Lawrence Mitchell