Repository navigation
Keep solve scratch out of the solver factorizations and take an optional workspace in ldiv! - #914
Merged
Merged
Conversation
…nal `workspace` in `ldiv!` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 24, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #914 +/- ##
==========================================
- Coverage 94.01% 93.95% -0.06%
==========================================
Files 16 16
Lines 9189 9198 +9
==========================================
+ Hits 8639 8642 +3
- Misses 550 556 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ACK.UmfpackWS` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ViralBShah
added a commit
that referenced
this pull request
Oct 9, 2026
…ember (#1017) Documentation only, drawn from the pull requests merged since early September and their review comments. - **PR text.** The rule against reporting routine checks is its own bullet and names the forms that still got through: test modes passing, the ambiguity check, the Julia build, pass counts. Titles fit one line of `git log --oneline`. - **Added.** Julia's CI flags, `--depwarn=error` and the trim test (#971, #972); dense results where every entry would be stored (#1004, #1005, #1007); opaque elements (#982, #977, #1006); fixed test inputs and `mismatch` (#991, #998). - **Removed.** Rules that Aqua, `.gitignore` or #990 made unnecessary, and test detail that `test/AGENTS.md` already holds. - **`src/solvers/`.** Caller-owned solve workspaces (#914), copying an aliased right-hand side (#942), validating before a refactorization (#899, #901). Corrects the lock field names and the index-type testing rule. - **`test/`.** Fixed inputs and top-level helper loading (#971); drops the notes on worker groups, which `runtests.jl` no longer has. - **`gen/`.** Header order, and running `make` before a change (#1003). Written by Claude Code (Claude Opus 5.5). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
ldiv!with a CHOLMOD, UMFPACK or SPQR factorization now takes an optionalworkspacekeyword. Without one, a solve allocates its own scratch space instead of reusing a buffer stored in the factorization. This is the workspace part of #912, split out so that #912 only changes threading.Each solver kept its solve scratch inside the factorization: the
ldiv!buffers of aCHOLMOD.Factor, theUmfpackWSfield of anUmfpackLU, and the_ldiv_workspaceof aQRSparse. That state is gone.ldiv!(x, F, b; workspace)takes a caller-owned workspace instead:luUMFPACK.UmfpackWS(F)(existing)cholesky,ldltCHOLMOD.CholmodWS(F)(new)qrSPQR.SpqrWS(F)(new)1. Uniform support. The keyword works with
F,F'andtranspose(F), in bothldiv!(x, F, b)andldiv!(F, b), for all three solvers. This PR adds the methods that were missing onmain:ldiv!forF'andtranspose(F)of a CHOLMODFactor: the adjoint solves the same Hermitian system, and the transpose solves the conjugate one;ldiv!(x, transpose(F), b)for SPQR;ldiv!(F, b)for a squareqrfactorization and its adjoint and transpose.2. Sizing. A workspace grows as needed. An
UmfpackWSthat is too small, for example after turning on iterative refinement, used to throwArgumentError; it now grows.3. Cost. Time is unchanged; allocations change as follows:
ldiv!(x, F, b)maincholesky, n = 100lu, n = 100qr, n = 1004. Behaviour changes.
ldiv!without a workspace allocates.copy(F::UmfpackLU, ws)still works but ignoresws.UmfpackLUserializes without workspace sizes.ldiv!methods and aworkspacekeyword on the existing ones.5. Docs. "Reusing a factorization" in
docs/src/solvers.mdnow explains the keyword.UMFPACK.UmfpackWS,CHOLMOD.CholmodWSandSPQR.SpqrWSare documented and included in the manual. The new names follow the existingUmfpackWS, and each constructor takesF,F'ortranspose(F). The thread-safety section no longer says the factorizations own a workspace.Tested on Julia nightly with
Pkg.test(test_args=["solvers"]),ambiguous, the doctests and the whitespace check. A new test intest/solvers/solvers.jlruns every form above with and without a workspace for all three solvers, against dense solves. The allocation tests now pass a workspace and still require zero allocations, and the CHOLMOD lifetime tests check that aCholmodWSfrees its buffers through the right Common.Written with Claude Code.
🤖 Generated with Claude Code