Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10553

NDSolve profiling

From Ben <Benjamin.R.Lewis@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject NDSolve profiling
Date 2012-06-20 07:53 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jrrvgu$4sd$1@smc.vnet.net> (permalink)

Show all headers | View raw


Are there any tricks to profiling/optimising NDSolve?

A computationally expensive subexpression (involving ProductLog) is repeated many times in my ODE, so I'd like to check whether it is only computed once per evaluation point (and would also like to try other possible optimisations like using compile unless that is already redundant).

My ODE has multiple coupled-components so I've also experimented with converting it into vector form. With simpler ODEs I've found this has facilitated using compiled functions in NDSolve (and gave an overall speed boost), but with my current ODE I find that the vector form causes failure. I'm wondering whether switching from a coupled set of equations to vector form of the identical ODE/IVP may cause the algorithm pick a different step sequences, or may be more likely to produce catastrophic-cancellation inaccuracies?

Can anybody share relevant insight into the evaluation that goes on behind the scenes of ndsolve's equation-processing and iteration, and how to debug or ways to optimise it for speed?

Thanks,
Ben

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

NDSolve profiling Ben <Benjamin.R.Lewis@gmail.com> - 2012-06-20 07:53 +0000
  Re: NDSolve profiling Narasimham <mathma18@hotmail.com> - 2012-06-21 09:24 +0000
    Re: NDSolve profiling Ben <benjamin.r.lewis@gmail.com> - 2012-06-24 08:23 +0000

csiph-web