Repository navigation
Correct the thread-safety docs and stress test separate factorizations - #42
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #42 +/- ##
=======================================
Coverage 97.31% 97.31%
=======================================
Files 1 1
Lines 372 372
=======================================
Hits 362 362
Misses 10 10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
175ea92 to
4177988
Compare
|
Review fix in 4dd6047. When the lock was busy, the finalizer re-registered itself and only retried after a later GC. Under contention it kept failing, and the GC cannot see libklu memory: factor-and-discard on all 8 threads reached 12.5 GB in 30s on Linux, against about 600 MB on Not fixed, and one more reason to keep this as a draft: |
4dd6047 to
030a336
Compare
030a336 to
d79cbd5
Compare
d79cbd5 to
f0a00f3
Compare
adfb945 to
2582bc3
Compare
…d-safety docs Extend the stress test of separate factorizations to analyze, factor, refactor, solve, and free, for each element and index type, with finalizers running meanwhile. Batching right-hand sides into one call doesn't run them in parallel, as the docs said. Only giving each task its own factorization does. Refs #38. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2582bc3 to
0d0ea27
Compare
Corrects the thread-safety docs and strengthens the stress test for separate factorizations. It changes no behaviour.
Changes
solve!call runs them in parallel, but that call runs on one thread. Solving in parallel takes a factorization per task, such ascopy(F), and the docs now give that cost. This is in the README,docs/src/index.md, and thekludocstring.docs/src/index.md.Float64values and one index type. It now also refactors and repeatedly factors and frees, for each element and index type, with finalizers running meanwhile. It stays in the existing concurrency testset.isok =$callfrom Fix crashes on unfactored objects and bad permutations, and keep the singular status #53.History
Refs #38. This PR originally added a process-wide lock around every libklu call, so the earlier comments here are about that. The lock has been removed because it stopped separate factorizations from running in parallel, with 2,814 solves/s against 23,217 at 8 threads, and SparseArrays.jl has no such lock either. The code is preserved in d79cbd5 in case a repro shows that it's needed.
Testing
The full suite passes locally on Linux with Julia 1.13 at
-t 1,-t 4and-t 8, and on 1.10 at-t 2. Aqua and the docs build also pass.The stress test guards against regressions. It passes without any source change, so it doesn't show a new bug.
🤖 Generated with Claude Code