Closed albertomercurio closed 2 months ago
Can you share an allocation profile?
julia> Profile.print()
Overhead β [+additional indent] Count File:Line; Function
=========================================================
β1 @Base/Base.jl:608; (::Base.var"#1055#1056")()
β 1 @Base/Base.jl:572; profile_printing_listener()
β 1 @Base/asyncevent.jl:159; wait
β 1 @Base/asyncevent.jl:142; _trywait(t::Base.AsyncCondition)
β 1 @Base/condition.jl:125; wait
β 1 @Base/condition.jl:130; wait(c::Base.GenericCondition{Base.Threads.SpinLock}; first::Bool)
β β 1 @Base/task.jl:994; wait()
1β β 1 @Base/task.jl:985; poptask(W::Base.IntrusiveLinkedListSynchronized{Task})
β29 @Base/task.jl:675; task_done_hook(t::Task)
β 29 @Base/task.jl:994; wait()
28β 29 @Base/task.jl:985; poptask(W::Base.IntrusiveLinkedListSynchronized{Task})
β1 β¦lib/v1.10/Distributed/src/remotecall.jl:279; (::Distributed.var"#137#139")()
β 1 @Base/condition.jl:78; lock
β 1 @Base/lock.jl:229; lock(f::Distributed.var"#138#140", l::ReentrantLock)
β 1 β¦ib/v1.10/Distributed/src/remotecall.jl:281; #138
β 1 @Base/condition.jl:125; wait
β 1 @Base/condition.jl:130; wait(c::Base.GenericCondition{ReentrantLock}; first::Bool)
β β 1 @Base/task.jl:994; wait()
1β β 1 @Base/task.jl:985; poptask(W::Base.IntrusiveLinkedListSynchronized{Task})
β1 @VSCodeServer/src/eval.jl:34; (::VSCodeServer.var"#64#65")()
β 1 @Base/essentials.jl:889; invokelatest(::Any)
β 1 @Base/essentials.jl:892; #invokelatest#2
β 1 @VSCodeServer/src/repl.jl:193; (::VSCodeServer.var"#111#113"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Proβ¦
β 1 @Base/logging.jl:627; with_logger
β 1 @Base/logging.jl:515; with_logstate(f::Function, logstate::Any)
β β 1 @VSCodeServer/src/repl.jl:192; (::VSCodeServer.var"#112#114"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.β¦
β β 1 @VSCodeServer/src/repl.jl:229; repleval(m::Module, code::Expr, ::String)
β β 1 @Base/Base.jl:88; eval
1β β 1 @Base/boot.jl:385; eval
Total snapshots: 32. Utilization: 3% across all threads and tasks. Use the `groupby` kwarg to break down by thread and/or task.
@oscardssmith can you take another look at this?
should be fixed by https://github.com/SciML/DiffEqCallbacks.jl/pull/218
Describe the example
Hello, a couple of weeks ago I created issue #211 , showing an increasing of memory allocations for versions larger than v3.2.0. I noticed that the MWE was not very minimal, in the sense that, by adding the callback, the number of saved states increased a lot. To overcome this, here I propose a very similar working example, where I define the
saveat = [list[end]]
to save the state only once. In this way, I get 1.07 k allocations against the 56 of the versions <3.2.0, a big difference, since it scales also with the length of tlist.Minimal Reproducible Example π