Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for changes to firedrake.assemble default behaviour. #212

Merged
merged 14 commits into from
Jan 20, 2025

Conversation

JHopeCollins
Copy link
Member

@JHopeCollins JHopeCollins commented Jan 17, 2025

The default behaviour of firedrake.assemble was changed in #3947. Dirichlet bc nodes are now automatically zeroed, you can't switch this off without an error, and you can no longer pass a Function as the tensor, only a Cofunction.
This PR updates asQ to deal with this.

Essentially, we now deal with boundary conditions in essentially the same way as firedrake:

  1. AllAtOnceForm will now:
    a) Enforce the boundary conditions on the AllAtOnceFunction before calculating the residual.
    b) Set the residual to 0 at all DirichletBC nodes.
    c) Only accept an AllAtOnceCofunction for the tensor argument (previously it would accept a compatible AllAtOnceFunction, PETSc.Vec, or firedrake.Function for the tensor argument).
  2. AllAtOneJacobian.mult will do the same thing as firedrake.ImplicitMatrixContext, i.e. it will leave the bc nodes untouched, and also ignore their effect on the rest of the nodes.

Other changes to note:

  1. The HybridisationSCPC that we use to apply hybridisation to the complex_proxy block forms is broken, in that the test LVS solves diverge. I have xfailed the tests for now so that we can merge the fixes to the main library, and opened Fix HybridisationSCPC after assemble(..., zero_bc_nodes=True) updates. #213 to fix it urgently.
  2. We are seeing some non-deterministic failures due to mismatched codegen on different ranks. I suspect that these are also causing/related to the timeout failures we're seeing. Because these aren't related to the assemble changes I think we can merge if these are the only test failures.

@JHopeCollins JHopeCollins added bug Something isn't working Core functionality Adding to the main paradiag functionality upstream Issue related to upstream dependencies labels Jan 17, 2025
@JHopeCollins JHopeCollins self-assigned this Jan 17, 2025
@JHopeCollins JHopeCollins added the PRIORITY Needs urgent attention label Jan 20, 2025
.github/workflows/test.yml Show resolved Hide resolved
asQ/allatonce/form.py Show resolved Hide resolved
@colinjcotter
Copy link
Collaborator

can merge

@JHopeCollins JHopeCollins merged commit 76cb14a into master Jan 20, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Core functionality Adding to the main paradiag functionality PRIORITY Needs urgent attention upstream Issue related to upstream dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants