Hello there,
It seems there is a bug with DifferentialEquations.jl when solving for large systems of ODEs. I tried to make the simplest example to obtain the error:
using DifferentialEquations
function f(du,u,p,t)
return du = u
end
tspan = (0.0,1)
u0 = sprand(Float64,10000,0.3)
p = Dict()
prob = ODEProblem(f,u0,tspan,p)
sol = solve(prob)
This makes Julia crash, and throws the following message:
signal (11): Segmentation fault: 11
in expression starting at /Users/victorboussange/projects/divers/test_matrix_mult.jl:72
setindex! at ./array.jl:767 [inlined]
_map_zeropres! at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/SparseArrays/src/higherorderfns.jl:387
_noshapecheck_map! at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/SparseArrays/src/higherorderfns.jl:151 [inlined]
_copyto! at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/SparseArrays/src/higherorderfns.jl:993 [inlined]
_copyto! at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/SparseArrays/src/higherorderfns.jl:1007 [inlined]
copyto! at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/SparseArrays/src/higherorderfns.jl:989 [inlined]
materialize! at ./broadcast.jl:756 [inlined]
calculate_residuals! at /Users/victorboussange/.julia/packages/OrdinaryDiffEq/miOSH/src/misc_utils.jl:58 [inlined]
perform_step! at /Users/victorboussange/.julia/packages/OrdinaryDiffEq/miOSH/src/perform_step/low_order_rk_perform_step.jl:653
perform_step! at /Users/victorboussange/.julia/packages/OrdinaryDiffEq/miOSH/src/perform_step/composite_perform_step.jl:43 [inlined]
perform_step! at /Users/victorboussange/.julia/packages/OrdinaryDiffEq/miOSH/src/perform_step/composite_perform_step.jl:43 [inlined]
solve! at /Users/victorboussange/.julia/packages/OrdinaryDiffEq/miOSH/src/solve.jl:345
#__solve#257 at /Users/victorboussange/.julia/packages/OrdinaryDiffEq/miOSH/src/solve.jl:7
#__solve at ./none:0 [inlined]
#__solve at ./none:0 [inlined]
#__solve at ./none:0 [inlined]
#__solve at ./none:0 [inlined]
#__solve at ./none:0
unknown function (ip: 0x13e0f2ded)
#__solve#2 at /Users/victorboussange/.julia/packages/DifferentialEquations/UZIcy/src/default_solve.jl:15
unknown function (ip: 0x13e0f056e)
#solve#429 at ./none:0 [inlined]
solve at /Users/victorboussange/.julia/packages/DiffEqBase/cPqrj/src/solve.jl:27
do_call at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:323
eval_stmt_value at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:362 [inlined]
eval_body at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:759
jl_interpret_toplevel_thunk_callback at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:885
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x138f70ebf)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:894
jl_toplevel_eval_flex at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:764
jl_parse_eval_all at /Users/osx/buildbot/slave/package_osx64/build/src/ast.c:883
include_string at ./loading.jl:1008
include_string at /Users/victorboussange/.julia/packages/CodeTools/xGemk/src/eval.jl:30
unknown function (ip: 0x120bddcd3)
#116 at /Users/victorboussange/.julia/packages/Atom/mngyX/src/eval.jl:94
withpath at /Users/victorboussange/.julia/packages/CodeTools/xGemk/src/utils.jl:30
withpath at /Users/victorboussange/.julia/packages/Atom/mngyX/src/eval.jl:46 [inlined]
#115 at /Users/victorboussange/.julia/packages/Atom/mngyX/src/eval.jl:93 [inlined]
with_logstate at ./logging.jl:395
with_logger at ./logging.jl:491 [inlined]
#114 at /Users/victorboussange/.julia/packages/Atom/mngyX/src/eval.jl:92 [inlined]
hideprompt at /Users/victorboussange/.julia/packages/Atom/mngyX/src/repl.jl:87
macro expansion at /Users/victorboussange/.julia/packages/Atom/mngyX/src/eval.jl:91 [inlined]
macro expansion at /Users/victorboussange/.julia/packages/Media/ItEPc/src/dynamic.jl:24 [inlined]
#113 at /Users/victorboussange/.julia/packages/Atom/mngyX/src/eval.jl:86
handlemsg at /Users/victorboussange/.julia/packages/Atom/mngyX/src/comm.jl:164
unknown function (ip: 0x120b9dc3c)
jl_apply at /Users/osx/buildbot/slave/package_osx64/build/src/./julia.h:1571 [inlined]
jl_f__apply at /Users/osx/buildbot/slave/package_osx64/build/src/builtins.c:556
#19 at ./task.jl:259
unknown function (ip: 0x120c6a7b4)
jl_apply at /Users/osx/buildbot/slave/package_osx64/build/src/./julia.h:1571 [inlined]
start_task at /Users/osx/buildbot/slave/package_osx64/build/src/task.c:572
Allocations: 143879521 (Pool: 143858514; Big: 21007); GC: 264
Julia has exited. Press Enter to start a new session.
I experienced this on a Mac and a Linux machine.
Any idea where does it come from?