Skip to content

Commit e91367e

Browse files
Workaround v1.10 function redefinition issue
JuliaLang/julia#52635
1 parent cecce40 commit e91367e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/derivative_wrappers.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const FIRST_AUTODIFF_TGRAD_MESSAGE = """
66
1. Turn off automatic differentiation (e.g. Rosenbrock23() becomes
77
Rosenbrock23(autodiff=false)). More details can be found at
88
https://docs.sciml.ai/DiffEqDocs/stable/features/performance_overloads/
9-
2. Improving the compatibility of `f` with ForwardDiff.jl automatic
9+
2. Improving the compatibility of `f` with ForwardDiff.jl automatic
1010
differentiation (using tools like PreallocationTools.jl). More details
1111
can be found at https://docs.sciml.ai/DiffEqDocs/stable/basics/faq/#Autodifferentiation-and-Dual-Numbers
1212
3. Defining analytical Jacobians and time gradients. More details can be
@@ -48,7 +48,7 @@ const FIRST_AUTODIFF_JAC_MESSAGE = """
4848
1. Turn off automatic differentiation (e.g. Rosenbrock23() becomes
4949
Rosenbrock23(autodiff=false)). More details can befound at
5050
https://docs.sciml.ai/DiffEqDocs/stable/features/performance_overloads/
51-
2. Improving the compatibility of `f` with ForwardDiff.jl automatic
51+
2. Improving the compatibility of `f` with ForwardDiff.jl automatic
5252
differentiation (using tools like PreallocationTools.jl). More details
5353
can be found at https://docs.sciml.ai/DiffEqDocs/stable/basics/faq/#Autodifferentiation-and-Dual-Numbers
5454
3. Defining analytical Jacobians. More details can be

test/interface/autodiff_error_tests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ tspan = (0.0, 1.0)
3434
prob = ODEProblem(lorenz!, u0, tspan)
3535
@test_throws OrdinaryDiffEq.FirstAutodiffJacError solve(prob, Rosenbrock23())
3636

37-
function lorenz!(du, u, p, t)
37+
function lorenz2!(du, u, p, t)
3838
du[1] = 10.0(u[2] - u[1])
3939
a[1] = t
4040
du[2] = u[1] * (28.0 - u[3]) - u[2]
4141
du[3] = u[1] * u[2] - (8 / 3) * u[3]
4242
end
43+
prob = ODEProblem(lorenz2!, u0, tspan)
4344
@test_throws OrdinaryDiffEq.FirstAutodiffTgradError solve(prob, Rosenbrock23())
4445

4546
## Test that nothing is using duals when autodiff=false

0 commit comments

Comments
 (0)