Skip to content

MTK: memory usage and out of memory??? #4468

@B-LIE

Description

@B-LIE

Is there a memory problem with MTK❓

I am testing some components of pipes, etc. that I am developing, and have experienced that my Lunar Lake laptop with 32 GB runs out of memory and starts to swap on the disk, and then glitches or crashes completely. Seems like the ODEProblem (prob) and the solution (sol) become extraordinarily large.

Some numbers:

  1. Rigid/lumped pipe, 3 unknowns, 30 observed. Base.summarysize():
  • sol.t: 360 B
  • sol.u: 2920 B
  • prob: 1.50 MB
  • sol: 1.52 MB
  1. Distributed pipe with 100 cells, 300 unknowns, 931 observed. Base.summarysize():
  • sol.t: 664 B
  • sol.u: 0.18 MB
  • prob: 8.67 GB
  • sol: 8.67 GB

It gets worse when I connect several pipes, and other equipment.

Why does the prob and the sol become so large? Is there anything I can do to reduce the sizes? I generate the prob via:

prob = ODEProblem(sys, [pipe.md => 0.0], tspan)

sol = solve(prob, Rodas5P())

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions