Repository navigation
Build: every extension depends on every package header - #1196
Merged
Merged
Conversation
./uw build keeps its build directory, and setuptools recompiles an extension only when a source or a listed dependency is newer than it. Cython lists the headers a .pyx names, but not the headers those include, so an edit to uw_face_orientation.h (included by petsc_compat.h) or nanoflann.hpp (by kdtree_interface.hpp) left the old extension in place. Underworld development team with AI support from Claude Code
Member
Author
|
Review record, pre-PR.
No findings. Underworld development team with AI support from Claude Code |
Member
Author
|
#1196 at 60412d1: PASS on both checks. From H1 (review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH)), with three successive builds of one worktree (
Underworld development team with AI support from Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
./uw buildkeeps itsbuild/directory between builds, and setuptools recompiles an extension only when one of its sources or declared dependencies is newer than the built object. Cython declares the headers a.pyxnames incdef extern from, but not the headers those headers include. An edit to such a header therefore installed the old extension.Two headers are reached that way:
uw_face_orientation.h, included bypetsc_compat.h(Pair boundary quadrature points by face orientation on 3-D triangular faces (#1188) #1195). H1, the session that runs our parallel checks on a 96-thread Linux workstation, found this one: its rebuild after a header-only change kept the old solver extension.nanoflann.hpp, included bykdtree_interface.hpp. It is ondevelopmentnow.setup.pynow passesdepends=to every extension, listing every.hand.hppundersrc/underworld3. That is all of them rather than each extension's own, because it is simpler and cannot miss a new include. The cost is that a header edit recompiles every extension: about a minute and a half on the macOS machine.Shown
All runs are
./uw buildin one worktree, on macOS with a 12-core Apple M4. We read the object timestamps inbuild/temp.*.ckdtree.opetsc_generic_snes_solvers.opetsc_compat.h(named in the.pyx), buildnanoflann.hpp(nested), buildnanoflann.hpp, buildThe dependency is by timestamp, so a touch and an edit behave the same. After the rebuild,
test_0502andtest_1001pass (29 tests).No tests, tolerances or coordinate matches are involved. There is no issue: this is a build fix found in review.
Underworld development team with AI support from Claude Code