-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Porting over some low cost Algorithms #257
Conversation
avik-pal
commented
Oct 20, 2023
•
edited
Loading
edited
- Broyden
- Inplace
- OOP
- Integrate into the Test Suite
- Basic Tests
- 23 Test Problems
- Klement
- Inplace
- OOP
- Integrate into the Test Suite
- Basic Tests
- 23 Test Problems
Codecov Report
@@ Coverage Diff @@
## master #257 +/- ##
==========================================
- Coverage 93.90% 92.25% -1.66%
==========================================
Files 15 18 +3
Lines 1231 1614 +383
==========================================
+ Hits 1156 1489 +333
- Misses 75 125 +50
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
For |
I have added both Broyden is faster than the one in SimpleNonlinearSolve. Klement as expected seems to spend a significant amount of time in singularity checking. Someone with more familiarity with LinearAlgebra needs to chime in on how to handle this in the general case. I can add a branching based on LU factorization and default to that. |
I am reusing the factorization for singularity if the user specifies julia> @benchmark solve(probN, GeneralKlement(; linsolve=LUFactorization()))
BenchmarkTools.Trial: 23 samples with 1 evaluation.
Range (min … max): 168.920 ms … 283.473 ms ┊ GC (min … max): 0.00% … 40.56%
Time (median): 218.867 ms ┊ GC (median): 1.57%
Time (mean ± σ): 219.950 ms ± 37.673 ms ┊ GC (mean ± σ): 8.37% ± 11.92%
███ ▁ █ ▁ ▁ ▁ ▁ █ ▁ ▁ ▁█ ▁ ▁ ▁
███▁▁▁▁▁▁▁▁▁▁▁█▁█▁▁▁█▁▁▁█▁█▁▁▁▁▁█▁▁▁█▁█▁█▁▁▁▁▁▁██▁█▁▁▁▁▁█▁▁▁█ ▁
169 ms Histogram: frequency by time 283 ms <
Memory estimate: 252.29 MiB, allocs estimate: 201.
julia> @benchmark solve(probN, GeneralKlement(; linsolve=QRFactorization()))
BenchmarkTools.Trial: 12 samples with 1 evaluation.
Range (min … max): 382.058 ms … 475.142 ms ┊ GC (min … max): 1.69% … 20.59%
Time (median): 440.708 ms ┊ GC (median): 1.52%
Time (mean ± σ): 433.578 ms ± 36.193 ms ┊ GC (mean ± σ): 5.63% ± 7.69%
█ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ █
█▁█▁▁▁▁▁▁▁▁▁▁▁█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█▁█▁█▁▁▁▁▁▁▁█▁█▁▁▁▁▁▁▁▁█▁█ ▁
382 ms Histogram: frequency by time 475 ms <
Memory estimate: 309.65 MiB, allocs estimate: 229.
julia> @benchmark solve(probN, GeneralKlement(; linsolve=nothing))
BenchmarkTools.Trial: 18 samples with 1 evaluation.
Range (min … max): 232.665 ms … 382.726 ms ┊ GC (min … max): 0.87% … 36.40%
Time (median): 274.173 ms ┊ GC (median): 2.18%
Time (mean ± σ): 283.057 ms ± 47.992 ms ┊ GC (mean ± σ): 10.11% ± 12.59%
█▁ ▁
██▁▁▁█▁▁▁▁▁▁▆▁▁▁▁▁▁▁▁▆▁▁▁▁▁▆▁▁▁▁▁▁▆▆▁▆▆▆▁▁▁▆▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▆ ▁
233 ms Histogram: frequency by time 383 ms <
Memory estimate: 305.70 MiB, allocs estimate: 192. on a problem with |
d2251ba
to
4ce655d
Compare
Marking it as WIP, I want to add LBroyden to this as well! |
910a30a
to
4dc40bc
Compare
@ChrisRackauckas this is ready to go! |
@ChrisRackauckas let's merge this one? |