firedrake-adjoint does not respect nest= flag
When in the forward model a system is assembled with a nest=False/True argument to assemble() - this setting is not replicated in the associated assembly of the adjoint system. This flag which determines whether or not a PETSc MatNest matrix type is used, needs to be set correctly to work in combination with certain solver settings: - nest=True does not work with direct solvers - nest=True is required for fieldsplit
A workaround is to use the global parameters['matnest']=True/False, but this is only a solution if all systems require the same setting, which is not generally the case.
Comments (2)
-
-
FWIW, you don't need
nest=True
for fieldsplit. The problem is incompatibility.py
_extract_args
drops a lot of stuff on the floor in the firedrake case. Insolving.py
at around line 85 you can see how these are used. I don't see how thesolver_parameters
make it through into the callback to the firedrake solve. But the problem is that additionally the nest kwarg is not a "solver parameter" so I don't know how to send the appropriate information through. - Log in to comment
Oh sorry, I see that I wasn't logged in. For context: this is in Thetis with firedrake-adjoint.