Bug in the function assemble_system, in dolfin-adjoint

Issue #94 resolved
Joakim Sundnes created an issue

Lines 79-81 in the file dolfin-adjoint/dolfin_adjoint/assembly.py read:

(lhs_out, rhs_out) = backend.assemble_system(*args, **kwargs)

to_annotate = utils.to_annotate(kwargs.pop("annotate", None))

These lines need to change places, since the “annotate” keyword needs to be removed from the kwargs before it is passed to the backend.assemble_system(…). In the assemble-function (lines 17-19) it is done correctly. In pyadjoint the call to kwargs.pop is replaced by a call to annotate_tape, which also appears to remove the “annotate” keyword from kwargs. This call is included in assemble but not in assemble_system, so a similar issue may be present in pyadjoint.

Comments (1)

  1. Log in to comment