Skip to content

Merge upstream main into perf/tinyasm-dofmap-copy - #1

Merged
manishpaulish merged 18 commits into
manishpaulish:perf/tinyasm-dofmap-copyfrom
firedrakeproject:main
Aug 20, 2026
Merged

Merge upstream main into perf/tinyasm-dofmap-copy#1
manishpaulish merged 18 commits into
manishpaulish:perf/tinyasm-dofmap-copyfrom
firedrakeproject:main

Conversation

@manishpaulish

Copy link
Copy Markdown
Owner

Internal branch update. Merging firedrakeproject:main so firedrakeproject#5348 picks up the CI fixes.

connorjward and others added 18 commits August 3, 2026 15:16
* Enforce deterministic mesh distribution for flaky test

---------

Co-authored-by: Pablo Brubeck <brubeck@protonmail.com>
…on eigenproblem (#5308)

* Add a demo on Carstensen-Gedicke lower bounds for the Dirichlet Poisson eigenproblem

---------

Co-authored-by: Umberto Zerbinati <umberto.zerbinati@maths.ox.ac.uk>
Co-authored-by: Pablo Brubeck <brubeck@protonmail.com>
30 minutes was cutting it too fine for some steps in our CI run and the job was terminating with no clear idea why.
* Fix HypreADS and HypreAMS for fieldsplit

Co-authored-by: Pablo Brubeck <brubeck@protonmail.com>
* Fix DG injection for symmetric tensors
* Contract quadrature reductions in loop nest order

The loop nest visits the quadrature indices in source order, so placing
reductions in any other order makes each partial contraction outlive the
loop that produced it and become an array.  Sorting the reduction order
by index extent does exactly that on cells whose quadrature axes have
different extents.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Apply suggestion from @pbrubeck

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* Add Fedora 44 as a community arch to firedrake-configure

* Improve printing of long configs in warnings
* tsfc: cancel Jacobian products and reciprocal factors

- Enable do_cancel_jacobian_products in compute_form_data, so that
  contractions of the Jacobian with its inverse are cancelled before
  the inverse is expanded into individual matrix entries, and apply
  the same simplifications in preprocess_expression.
- Cancel reciprocal factors, such as detJ**2 * (1 / detJ)**2, in
  spectral mode and in dual evaluation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Test interpolation of products of coefficient evaluations

A product of coefficient evaluations on a hexahedron contracts more
indices than one sum factorisation can search, and raised
NotImplementedError.  Cover scalar powers, along with the vector and
tensor expressions whose value indices contract the evaluations
together.

Companion to firedrakeproject/fiat#280.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* Make serial submesh construction linear in the number of points

Submesh(mesh, comm=COMM_SELF) cost O(P^2) in the number of mesh points P.
On three ranks a UnitSquareMesh(181, 181) needed 8.9 seconds to build one
serial submesh. Four times more cells cost about ten times more time.

Every preconditioner that builds a subdomain matrix through
firedrake.preconditioners.matis pays this cost, because local_mesh builds
one serial submesh per process.

The cost was in submesh_correct_entity_classes. A submesh on COMM_SELF has
no neighbour, so it has no ghost points and no owned points, and every
point is core. The function set that state one point at a time.
DMLabelSetValue moves the stratum into a hash set and destroys its index
set. The DMLabelHasPoint of the next iteration reads the hash set back,
sorts it, and rebuilds the index set and the bit array. Each point
therefore cost O(k log k) in the size k of the core stratum so far.

Set the three strata in bulk instead. This is the same fix as the one in
PR #5326 for the coarse and fine cell maps.

submesh_create also built a temporary label that marked every cell, and
passed it to DMPlexFilter. DMPlexFilter selects every cell by itself when
it gets no label, so the label was unnecessary. Submesh now leaves
label_name as None for a codim-0 submesh of the whole mesh. A codim-1
submesh still passes the "depth" label, because DMPlexFilter with no label
selects cells, not facets.

Measured on three ranks, for submesh_correct_entity_classes alone:

    cells   before     after
      717    34 ms   0.12 ms
     2787   320 ms   0.43 ms
    11059  3214 ms   1.85 ms
    22023  8907 ms   3.80 ms

The whole submesh build at 11059 cells falls from 3256 ms to 71 ms.

Both paths produce the same submesh. On UnitSquareMesh(128, 128) with
three ranks, the submesh built with a label and the submesh built without
one have the same chart, the same subpoint index set, and the same
pyop2_core, pyop2_owned, pyop2_ghost and Face Sets strata.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Pablo Brubeck <brubeck@protonmail.com>
@manishpaulish
manishpaulish merged commit 4477429 into manishpaulish:perf/tinyasm-dofmap-copy Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants