Understanding the "vode" warning for `scipy.integrate.ode`: "This integrator is not re-entrant. You cannot have two ode instances...at the same time."
Hi all, I'd like to make sure I am understanding the warning for the "vode" and "zvode" integrators, provided by `scipy.integrate.ode` correctly -- it might seem repetitive, but please bear with me. Let us say one has ODE problem 1, which is completely separate and different from ODE problem 2. Then, this warning tells us that we have to choose to solve ODE problem 1 first, and then ODE problem 2, even though they are completely separate. I cannot solve ODE problem 1 and ODE problem 2 in parallel, using two *separate* instances of `scipy.integrate.odeint`. Presumably, this is because the same instance of the underlying solver is called by all `scipy.integrate.odeint` instances? Kind regards, Brian
13.05.2015, 04:33, Brian Merchant kirjoitti:
I'd like to make sure I am understanding the warning for the "vode" and "zvode" integrators, provided by `scipy.integrate.ode` correctly -- it might seem repetitive, but please bear with me.
(i) The warning applies only to scipy.integrate.ode when using vode/zvode. It does not apply to scipy.integrate.odeint or the other solvers available in scipy.integrate.ode. (ii) It is not possible to do this: solve first one problem, then switch to a second problem, and then switch back to the first one. The solver has only a single process-wide opaque internal state that can only hold one problem at a time. (iii) Where the limitation comes from in practice is that the VODE/ZVODE solvers use many global variables; the code is fairly old Fortran, and is not that easily refactored.
participants (2)
-
Brian Merchant
-
Pauli Virtanen