[SciPy-User] Speeding up integrate.odeint with weave/blitz

Sebastian Walter sebastian.walter@gmail....
Wed Dec 8 04:08:07 CST 2010

On Tue, Dec 7, 2010 at 11:48 PM, Rob Clewley <rob.clewley@gmail.com> wrote:
> Gus,
> On Tue, Dec 7, 2010 at 4:26 PM, Gus Ishere <gus.is.here@gmail.com> wrote:
>> I currently have a call like: integrate.odeint(dX_dt,X0,t,full_output=True)
>> One approach to speed up the integration time is to make dX_dt into a weave
>> function. Is there a better way to speed it up and avoid the function call
>> overhead in Python? Any examples would be very appreciated.
>> dX_dt is very simple.
> There are different compromises in the different possible approaches,
> I wouldn't say any is "best". One approach is to use my PyDSTool
> package (pydstool.sourceforge.net), which I think will save you work
> and provide powerful options in the long term but requires some extra
> installation and learning curve for the more sophisticated user
> interface. It will automatically compile the dX_dt function you
> specify into C and link it with the C integrator.

Does that mean that your tool translates Python to C?

> So there is very
> little overhead in interaction between your function and the
> integrator, and once my code is installed this happens quite
> transparently to the user. PyDSTool even gives you the opportunity to
> hand-optimize the C code for your function before final compilation,
> if that floats your speedboat.
> --
> Robert Clewley, Ph.D.
> Assistant Professor
> Neuroscience Institute and
> Department of Mathematics and Statistics
> Georgia State University
> PO Box 5030
> Atlanta, GA 30302, USA
> tel: 404-413-6420 fax: 404-413-5446
> http://www2.gsu.edu/~matrhc
> http://neuroscience.gsu.edu/rclewley.html
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-User mailing list