-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Introduce lu!
for UmfpackLU
to make use of its symbolic factorization
#33738
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! This is outside of what I typically work with, so I only have some confusion to share with you.
Here are some more explanation: Prior to this PR, the calls to these two routines were coupled: Every time we want to perform a LU factorization of |
I see, so the sparsity pattern check is internal in UMFPACK. |
@dkarrasch Exactly, yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except for the minor style comment, but that style is probably not applied elsewhere in this file, so we could as well leave it.
I'm not sure, but is there a place in the Julia docs to show the docstring of the sparse |
What's the status on this? Does this need another review before we merge? |
Does
|
Yes, it does mutate the first argument |
In that case is this just a case of rebase and merge? |
I think so. I wasn't confident enough to simply merge at the time, and was hoping someone else would have a look. But the feature was asked for, so we should let people use and test it in the wild. |
Very nice to see this. This is certainly important for implicit Euler timestepping and path following for PDEs. Will try this out as soon as it becomes available and I can afford the time (unfortunately not before mid February). |
Perhaps @ChrisRackauckas and @YingboMa may also want it in DiffEq. |
yes I do. |
Will be out in 1.5. would be good to test it on master. |
This is very nice! Thanks for your work! julia> @btime naive_lu(matrices)
1.584 s (623885 allocations: 862.68 MiB)
julia> @btime reuse_lu(matrices)
1.182 s (344645 allocations: 707.05 MiB) I am surprised that the improvement isn’t very dramatic. Did Julia cache something before? |
Symbolic factorization is usually only 10-20% of the factorization time. We already had the capability of reusing the numeric factorization. We are not caching anything automatically. |
May be the picture changes a bit when setting the pivot tolerance to zero (if you can afford this for your problem, certainly this cannot be the default). The hypothesis is that there would be no reordering steps from partial pivoting, making the numerical factorization relatively cheaper. Not sure though. |
Thanks for the insight, I will keep that in mind when I implement the feature in JuliaDiffEq. |
…tion (#33738) * Introduce `lu!` for `UmfpackLU` to make use of its symbolic factorization * Remove spaces at keyword argument Co-authored-by: Viral B. Shah <[email protected]>
This PR introduces a
lu!
method forUmfpackLU
to make use of a previously computed symbolic factorization (closes #33323).Here are some benchmarks: