-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpectedly slow simulation with zvode #927
Comments
I think you have a typo on the nsteps for lsoda, it is not the same as the
other two. Can you please verify and let me know.
On Thu, Mar 2, 2023 at 2:22 PM Torkel ***@***.***> wrote:
I have a simple model I want to simulate. I try the various solvers lsoda
zvode and vode. For some reason, the lsod solver is waaay faster than the
other two. Like, thing are fine because I can simualte quickly, but I
wanted to check whenever I was doing something wrong causing the slow down.
Here is the code:
import sys, os, numpy, libsbml, gillespy2
import timeit
import numpy
from gillespy2 import ODESolver, ODECSolver
model_multistate = gillespy2.core.import_SBML('../Data/multistate.xml')[0]
leng = 1000
%time model_multistate.run(solver=ODESolver,t=leng,increment=leng/50.,integrator='vode',integrator_options={"nsteps":1000000})
%time model_multistate.run(solver=ODESolver,t=leng,increment=leng/50.,integrator='zvode',integrator_options={"nsteps":1000000})
%time model_multistate.run(solver=ODESolver,t=leng,increment=leng/50.,integrator='lsoda',integrator_options={"nsteps":100000})
0
Here is a screenshot of the output:
[image: image]
<https://user-images.githubusercontent.com/18099310/222572607-ead15084-44d5-48fd-842d-4ea679c61433.png>
(lsoda 100 times faster)
I am attaching the model (renamed as .txt file to make GitHub happy)
multistate.txt
<https://github.com/StochSS/GillesPy2/files/10876289/multistate.txt>
—
Reply to this email directly, view it on GitHub
<#927>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKZDIXV4GX6OEYOSYWEDWDW2EMT5ANCNFSM6AAAAAAVN6D7JM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Sincerely,
Brian Drawert
Brian Drawert, Ph.D. (he/him)
Visiting Researcher
National Environmental Modeling and Analysis Center (NEMAC)
University of North Carolina Asheville
|
Away from computer, but can check tomorrow. You mean that for lsoda nstep lack one 0? Generally, having that argument seems to make no difference for lsoda. Even for the otherones it only sets the limit and shouldn't have any effect unless that limit is hit (which it is not)? |
I can confirm that setting
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a simple model I want to simulate. I try the various solvers
lsoda
zvode
andvode
. For some reason, thelsod
solver is waaay faster than the other two. Like, thing are fine because I can simualte quickly, but I wanted to check whenever I was doing something wrong causing the slow down.Here is the code:
Here is a screenshot of the output:

(lsoda 100 times faster)
I am attaching the model (renamed as .txt file to make GitHub happy)
multistate.txt
The text was updated successfully, but these errors were encountered: