-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Support for SparseDiffTools v2 #1917
Conversation
can you also handle OrdinaryDiffEq.jl/src/derivative_utils.jl Lines 856 to 857 in 3885e70
OrdinaryDiffEq.jl/src/derivative_utils.jl Lines 872 to 873 in 3885e70
|
@ChrisRackauckas can you explain why we are using the OOP
EDIT |
@ChrisRackauckas are there any convergence tests of implicit methods with a time- or parameter-dependent If there aren't, where would you recommend adding one? (I mean an explicit dependence on |
There are but not with operators I think. It would be good to explicitly test that |
@gaurav-arya , check out |
looks like the time dependence test passed @gaurav-arya . @ChrisRackauckas is there anything left to do here? |
@vpuri3 do you know the cause of the speedup in the numbers you posted for Krylov solves? Was there a type instability before or has something changed algorithmically? |
@@ -1,6 +1,6 @@ | |||
const ROSENBROCK_INV_CUTOFF = 7 # https://github.com/SciML/OrdinaryDiffEq.jl/pull/1539 | |||
|
|||
struct StaticWOperator{isinv, T} | |||
struct StaticWOperator{isinv, T} <: AbstractSciMLOperator{T} |
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.
what is the effect here? Can you time a static array ROBER and make sure that doesn't regress?
src/derivative_wrappers.jl
Outdated
@@ -272,7 +280,8 @@ function build_jac_config(alg, f::F1, uf::F2, du1, uprev, u, tmp, du2, | |||
end | |||
|
|||
sparsity, colorvec = sparsity_colorvec(f, u) | |||
if alg_autodiff(alg) | |||
# TODO: more generc, do we need this? |
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.
? I don't understand.
# KenCarp3, # WOperator doesn't support split problems | ||
# CFNLIRK3, # WOperator doesn't support split problems |
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.
Is that a regression?
@ChrisRackauckas StaticWOperator regression using OrdinaryDiffEq, StaticArrays, BenchmarkTools
function rober(u, p, t)
y₁, y₂, y₃ = u
k₁, k₂, k₃ = p
dy₁ = -k₁ * y₁ + k₃ * y₂ * y₃
dy₂ = k₁ * y₁ - k₂ * y₂^2 - k₃ * y₂ * y₃
dy₃ = k₂ * y₂^2
SA[dy₁, dy₂, dy₃]
end
prob = ODEProblem{false}(rober, SA[1.0, 0.0, 0.0], (0.0, 1e5), SA[0.04, 3e7, 1e4])
for Alg in (Rodas4, Rosenbrock23)
@info "$Alg"
int = init(prob, Alg())
@assert int.cache.W isa OrdinaryDiffEq.StaticWOperator
@btime solve(prob, $Alg(), save_everystep = false)
end on this branch julia> include("b.jl")
[ Info: Rodas4
59.250 μs (900 allocations: 38.14 KiB)
[ Info: Rosenbrock23
46.375 μs (744 allocations: 30.97 KiB) on master julia> include("b.jl")
WARNING: using StaticArrays.push in module Main conflicts with an existing identifier.
[ Info: Rodas4
60.042 μs (900 allocations: 38.14 KiB)
[ Info: Rosenbrock23
48.542 μs (744 allocations: 31.08 KiB) |
weird the accuracy error isn't showing up on my local tests (MacOS, Linux w. JL 1.9, ). rerunning CI hoping that its just a fluke |
It went away? The last thing then is to run Downstream locally and make sure it all works on master branches. If so, then this is good to merge. |
it did go away. The only errors now are from downstream. I'll run the downstream tests locally with the PR branches this afternoon. |
@ChrisRackauckas, I ran
Init dt vs dorpri tests: Error During Test at /Users/vp/.julia/packages/SafeTestsets/A8
3XK/src/SafeTestsets.jl:25
Got exception outside of a @test
LoadError: Cannot find method(s) for dopri5! I've tried to loadODESolvers(), but it d
idn't work. Please check ODEInterface.help_solversupport() and call loadODESolvers and
check also this output. For further information see also ODEInterface.help_install. I also updated the compats in |
Can also confirm that all StochasticDiffEq tests pass locally on the PR branch with this ODE branch |
@ChrisRackauckas good to merge? |
Alright, here it goes. |
Where is the PR to DelayDiffEq? |
Looks like delaydiffeq doesn't need a PR. The only reference to function OrdinaryDiffEq.alg_autodiff(alg::AbstractMethodOfStepsAlgorithm)
OrdinaryDiffEq.alg_autodiff(alg.alg)
end I also ran DelayDiffEq tests locally. Everything passed. |
No description provided.