[SciPy-User] VODE seems too slow for big systems.
Peter John Garrone
pgarrone at optusnet.com.au
Fri Dec 31 05:00:42 EST 2010
Hi,
I am modelling water flow and erosion using a triangular mesh. (I am attempting to develop realistic terrain
for a game scenario.)
I have developed a model that integrates an ODE using VODE from scipy.integrate, which seems to work the best.
Using 4 states per point, the system works for models at a certain scale. I am able to differentiate the model
and calculate the banded jacobian accurately, which helps a lot.
To make it work faster and better, and looking to putting it on Amazon to calculate models of finer resolution,
I made my functional evaluations threaded. However for large models, using no threads, one thread, or two threads
made little difference to the calculation rate. Indeed, if running threaded, the two threads that did the function
evaluations and were supposed to be occupying my dual-cpu system were instead using only a small fraction of the CPU,
and I infer that most of the time was lost in the VODE algorithm. The measurement was made with the ps utility on linux.
Looking at the BDF algorithm that VODE employs, I would guess that it intrinsically scales linearly. However as
it uses a predictor-corrector step that employs Newtons method that solves a Jacobian expression, I speculate that
solving the Jacobian expression for models with tens of thousands of states using direct factorization would be the
element taking most of the time.
There are iterative solvers in scipy that might solve the Jacobian expression much more quickly. However getting
VODE to employ it might be a problem. I wonder if anybody could point me to a better approach here.
Peter Garrone
More information about the SciPy-User
mailing list