Drop AdditiveSchwarzDiagnostics from public API#38
Merged
Conversation
Empirical bake-off (see issue) showed Auto's wall-clock decisions are within noise of optimal across the project's relevant range, and the diagnostics struct had zero readers outside the scheduler itself. Inline the metrics into AdditiveScheduler and remove the public surface. ReductionStrategy is kept: AtomicScatter vs ParallelReduction is a real memory-vs-time tradeoff (12x peak memory at scale) that users may want to control.
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.
Summary
AdditiveSchwarzDiagnostics(Rust struct,pub usere-exports, Python class,additive_schwarz_diagnosticsaccessors at every layer).AdditiveScheduler— they remain private to theAutoheuristic.ReductionStrategyand thePreconditioner::Additive(_, ReductionStrategy)knob unchanged: the wall-clock-vs-memory tradeoff (12x peak memory at scale) is a real user concern.Closes #34.
Why
Empirical bake-off across small / medium / huge regimes (see the issue comments) showed:
Auto's wall-clock decisions are within the ~5% measurement noise floor on every regime in the project's normal operating range.AdditiveSchwarzDiagnosticshad zero readers outside the scheduler itself — no test asserted on its fields, no benchmark inspected it, no production caller read it.ReductionStrategyis kept because memory matters: on a 100K-DOF problem,ParallelReductionpeaks at ~9.6 MB vsAtomicScatter's ~800 KB (12x). At 1M DOFs that becomes ~96 MB vs ~8 MB. Memory-constrained or server-scenario users need the override.Test plan
cargo build --workspace --releasecleancargo test --workspace --exclude within-pyall pass (within-py lib-test failure is the expected "PyO3 can't run standalone" issue per CLAUDE.md)pixi run developrebuilds the extension cleanlypytest tests/97/97 passsubdomains().len()and directinner_parallelism_work_estimate()iteration — same assertions, nodiagnostics()dependency