Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10578
| From | Narasimham <mathma18@hotmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: NDSolve profiling |
| Date | 2012-06-21 09:24 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jrup92$fnq$1@smc.vnet.net> (permalink) |
| References | <jrrvgu$4sd$1@smc.vnet.net> |
On Jun 20, 12:53 pm, Ben <Benjamin.R.Le...@gmail.com> wrote: > Are there any tricks to profiling/optimising NDSolve? > > A computationally expensive subexpression (involving ProductLog) is repea= ted 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 optimi= sations like using compile unless that is already redundant). > > My ODE has multiple coupled-components so I've also experimented with con= verting it into vector form. With simpler ODEs I've found this has facilita= ted 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 won= dering whether switching from a coupled set of equations to vector form of = the identical ODE/IVP may cause the algorithm pick a different step sequenc= es, or may be more likely to produce catastrophic-cancellation inaccuracies= ? > > Can anybody share relevant insight into the evaluation that goes on behin= d the scenes of ndsolve's equation-processing and iteration, and how to deb= ug or ways to optimise it for speed? > > Thanks, > Ben If the relations are explicitly and logically defined there may be no problems.Sometimes what appears as a narrow deviation may be surprising; but in any case at least a representative code should be posted here to help avoid vagueness,to pinpoint the problem. Narasimham
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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