-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update values before klu_factor #157
Conversation
Otherwise it's just using the values from before! BTW, why do we need to klu_factor before klu!, instead of just klu!? Don't that do the factorization as well?
@Wimmerer do you know why after that change we'd suddenly get https://github.com/SciML/ModelingToolkit.jl/runs/7370823848?check_suite_focus=true#step:6:739 ? It was never dispatching to that |
I'm going to have to step through this code to be sure this is what we want. The LinearSolve.jl/src/factorization.jl Line 150 in cd582d9
fact.nzval is updated to be the same as A.nzval .
Why exactly are we hitting the singular error? Is First thing I want to try here is actually running The KLU refactor method also needs several exceptions checked and handled gracefully now that I look at it. |
For UMFPACK I recall there were some changes recently which fixed some things in UMFPACK refactors. We may just disable resolves temporarily until 1.9 if I'm correct. I'll try to figure out a way to test that manually. |
Or rather, the question is: is |
Codecov Report
@@ Coverage Diff @@
## main #157 +/- ##
==========================================
+ Coverage 65.66% 65.71% +0.05%
==========================================
Files 9 9
Lines 632 633 +1
==========================================
+ Hits 415 416 +1
Misses 217 217
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Yes, it's creating in OrdinaryDiffEq.jl with a zero matrix matching the same sparsity pattern at the initialization time, and then when solving it updates the value to the Jacobian and factorizes. So I think #158 would error (and we should try to capture this in tests).
Then what does |
I'm going to merge this so downstream is fixed, but we should continue to discuss. |
Okay that's the issue then. In order to refactor KLU requires an existing factorization (unlike UMFPACK AFAIK). So we need to detect that, or set some flag to ignore the first matrix. Or perhaps |
Otherwise it's just using the values from before!
BTW, why do we need to klu_factor before klu!, instead of just klu!? Don't that do the factorization as well?
Fixes SciML/OrdinaryDiffEq.jl#1701