Closed
Description
Over at https://github.com/Deltares/Ribasim.jl, we're using MTK to build large hydrological models. What we see is that on some models, especially those that form a cyclic graph (but not on all of them), we run out of memory in the following code:
The size of next_assignments
keeps growing for each loop, hitting 1e9 for a system with 1290 states. Smaller models, even those with many cyclic parts converge much quicker. This behavior has also improved in the last months, now only running out of memory on the largest models.
With this serialized structurally simplified sim here to deserialize, we have the following MWE for the current MTK master branch, Julia 1.9.
using Serialization
using ModelingToolkit
using DataInterpolations
sim = deserialize("cached_simplified_sim.jls")
tspan = (1.5463008e9, 1.5513984e9)
prob = ODAEProblem(sim, [], tspan; sparse = true) # OOM
Metadata
Metadata
Assignees
Labels
No labels