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


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

Re: NDSolve is really slow in version 8 but not 7

From A Retey <awnl@gmx-topmail.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: NDSolve is really slow in version 8 but not 7
Date 2012-04-14 07:14 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jmb84s$r53$1@smc.vnet.net> (permalink)
References <jm8psc$j38$1@smc.vnet.net>

Show all headers | View raw


Hi,

> I'm using NDSolve to solve a set of roughly 40 first order
> differential equations. It takes about 10 seconds in version 7 but
> more like 850 in version 8. Does anyone know why this might be and
> how I can speed things up?
>
> Also for one scenario I'm getting the error
>
> NDSolve::"ndsz" :  ""At "\[NoBreak]t\[NoBreak]" ==
> "\[NoBreak]39.77534338386624`\[NoBreak]", step size is \ effectively
> zero; singularity or stiff system suspected."
>
> I realise its difficult to help without me giving an example but its
> a bit tricky to do so. Are there any standard tricks I could try?

I have seen things like that in some cases. Usually the reason was that 
the newer version was choosing a different Method than the older version 
did. So what you could try would be to find out which Method was chosen 
with version 7 and then explicitly set that Method in version 8. I found 
that usually then version 8 is even somewhat faster.

Unfortunately it's not a trivial task to determine which Method was 
used, but there has been a discussion about that either in this group or 
on stack exchange. I remember that Oliver Ruebenkoenig was making some 
valuable contributions to that discussion, so you might want to include 
his name in a search.

There is a chance that those choices are changed for good reasons, so 
you'd have to make sure that the result will in fact be correct when 
using the faster method...

hth,

albert

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


Thread

NDSolve is really slow in version 8 but not 7 Jonathan Frazer <J.Frazer@sussex.ac.uk> - 2012-04-13 08:58 +0000
  Re: NDSolve is really slow in version 8 but not 7 A Retey <awnl@gmx-topmail.de> - 2012-04-14 07:14 +0000

csiph-web