Repository navigation
Conversation
A subfunction of a mixed Function is a view into the dat of its parent, and a Function on the same subspace has a dat of its own. Both have the same space, parent and index, so they got the same key and shared a loop that was built for the other layout, which gives wrong values.
pbrubeck
left a comment
There was a problem hiding this comment.
I know that 5566 was still failing CI, should we add the example from the PR description to the tests? Or is it covered already by the existing tests?
|
Done, I added the example as |
|
About the CI here: "Basic repository checks" fails because the base of this PR is your branch and not |
I meant CI failing on 5566. You need to add the |
| # Subspaces of a mixed space compare equal, but the loops index the dat of their parent. | ||
| tuple((V, V.parent, V.index) for V in spaces), |
There was a problem hiding this comment.
The signature should include ufl-specific information, and the loop nuances should be captured by the axis_trees
There was a problem hiding this comment.
Maybe they are only needed for the arguments?
Fixes wrong values from shared loops in #5566. A subfunction of a mixed Function is a view into the dat of its parent, and a Function on the same subspace has a dat of its own. Both get the same key, so one reuses the loop built for the other layout.
Before this change it prints 2.9112 and then 0.1828, with it 2.9112 twice. It also fixes
test_checkpoint_comm_disk_checkpointing_parallelandtest_sub_comm_disk_checkpointing_parallelon 3 ranks, which fail on the base branch.A related case I have not hit:
ParloopBuilderbuilds a different loop when a coefficient shares its buffer with the output tensor, and that is not in the key either.