The example from the README page/first page of the docs doesn't run.
Expected behavior
The solve call at the end should run with the retcode Success.
Minimal Reproducible Example 👇
using BoundaryValueDiffEq
tspan = (0.0, pi / 2)
function simplependulum!(du, u, p, t)
θ = u[1]
dθ = u[2]
du[1] = dθ
du[2] = -9.81 * sin(θ)
end
function bc!(residual, u, p, t)
residual[1] = u[end ÷ 2][1] + pi / 2
residual[2] = u[end][1] - pi / 2
end
prob = BVProblem(simplependulum!, bc!, [pi / 2, pi / 2], tspan)
@time sol = solve(prob, MIRK4(), dt = 0.05)
Error & Stacktrace ⚠️
There's no error, but this warning shows up 20+ times near the start of the run:
┌ Warning: The supplied DiffCache was too small and was enlarged. This incurs allocations
│ on the first call to `get_tmp`. If few calls to `get_tmp` occur and optimal performance is essential,
│ consider changing 'N'/chunk size of this DiffCache to 12.
└ @ PreallocationTools ~/.julia/packages/PreallocationTools/zJxgA/src/PreallocationTools.jl:191
I'm not sure
If I let the solve call run for a long time (I left it for several hours and I'm not sure when in there it finished), it returns with the retcode Failure:
Describe the bug 🐞
The example from the README page/first page of the docs doesn't run.
Expected behavior
The
solve
call at the end should run with the retcodeSuccess
.Minimal Reproducible Example 👇
Error & Stacktrace ⚠️
There's no error, but this warning shows up 20+ times near the start of the run:
I'm not sure
If I let the
solve
call run for a long time (I left it for several hours and I'm not sure when in there it finished), it returns with the retcodeFailure
:Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
I'd imagine this is because of the PreallocationTools issue, but I haven't been able to find anything over there about how to fix it.