BioSimulator.jl
BioSimulator.jl copied to clipboard
Performance issues, memory leak, high cpu usage?
Hi there, I am not sure if this is because I am using the package wrong, but when I try and make the most simple possible script to run a simulation, I am getting very high memory and CPU usage, and it seems to hang and not produce any results. When I had save_points set to nothing, the memory usage climbed to 5.9 GB and then it got OOM killed. I tried with save_points set as below, and this took me to 533 MB and 12.4% CPU usage, and stayed there for a while before I killed it as well. Any tips would be appreciated!
using BioSimulator, Plots
# initialize
network = Network("BDI")
# species definitions; add components with <=
network <= Species("X", 5)
# reaction definitions
network <= Reaction("birth", 2.0, "X --> X + X")
network <= Reaction("death", 1.0, "X --> 0")
network <= Reaction("immigration", 0.5, "0 --> X")
state, model = parse_model(network)
result = simulate(state, model, EnhancedDirect(),
tfinal = 100.0,
save_points = 0:10:100)
plot(result, summary = :trajectory,
xlabel = "time", ylabel = "count",
label = ["X"])