You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a bug in my test suite, where Julia 1.11 would segfault under [email protected]. Julia 1.10 works with 3 and 4, Julia 1.11 only works with 3.
The curious thing is: it only segfaults after ReverseDiff is loaded. Since ReverseDiff was a stale dependency in my test suit which was loaded in a different @save_testset even, this isn't really a bug for me anymore and I couldn't put to much time into finding a MWE which does not use my Libarary, sorry.
Expected behavior
No segfault 🙃
Minimal Reproducible Example 👇
Note that this will install a specific commit of NetworkDynamics, in which I bumped the compact to 4.0. The library is used to construct the RHS of a ODE, NonlinarSolve is the used to find a fixpoint. It calls the function 2 times, it works before import ReverseDiff and segfaults after.
using Pkg
pkg"activate --temp"pkg"add NetworkDynamics#8b21567, Graphs, ReverseDiff, SteadyStateDiffEq"using NetworkDynamics
using Graphs
using SteadyStateDiffEq
functionswing_equation(dv, v, esum, p,t)
P, I, γ = p
dv[1] = v[2]
dv[2] = P - γ * v[2] .+ esum[1]
dv[2] = dv[2] / I
nothingend
vertex =VertexModel(f=swing_equation, g=1, sym=[:δ, :ω], psym=[:P_ref, :I=>1, :γ=>0.1])
functionsimple_edge(e, v_s, v_d, (K,), t)
e[1] = K *sin(v_s[1] - v_d[1])
end
edge =EdgeModel(;g=AntiSymmetric(simple_edge), outsym=:P, psym=[:K=>1.63, :limit=>1])
g =SimpleGraph([01101;
10110;
11010;
01101;
10010])
nw =Network(g, vertex, edge)
# nw is just some callable ode rhs (du, u, p ,t)# typestable, but has some DiffCaches which I know does something with ReverseDiff
u0 =rand(dim(nw))
p =rand(pdim(nw))
prob =SteadyStateProblem(nw, u0, p)
# this workssolve(prob, SSRootfind())
# segfaults after importimport ReverseDiff
solve(prob, SSRootfind())
The reason this is triggered based on package loading, is how the automatic AD backend selection happens. That said this is the first time I have seen that error.
Describe the bug 🐞
I found a bug in my test suite, where Julia 1.11 would segfault under [email protected]. Julia 1.10 works with 3 and 4, Julia 1.11 only works with 3.
The curious thing is: it only segfaults after
ReverseDiff
is loaded. SinceReverseDiff
was a stale dependency in my test suit which was loaded in a different@save_testset
even, this isn't really a bug for me anymore and I couldn't put to much time into finding a MWE which does not use my Libarary, sorry.Expected behavior
No segfault 🙃
Minimal Reproducible Example 👇
Note that this will install a specific commit of NetworkDynamics, in which I bumped the compact to 4.0. The library is used to construct the RHS of a ODE, NonlinarSolve is the used to find a fixpoint. It calls the function 2 times, it works before
import ReverseDiff
and segfaults after.Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: