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


Groups > comp.soft-sys.math.mathematica > #9606 > unrolled thread

NDSolve is really slow in version 8 but not 7

Started byJonathan Frazer <J.Frazer@sussex.ac.uk>
First post2012-04-13 08:58 +0000
Last post2012-04-14 07:14 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  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

#9606 — NDSolve is really slow in version 8 but not 7

FromJonathan Frazer <J.Frazer@sussex.ac.uk>
Date2012-04-13 08:58 +0000
SubjectNDSolve is really slow in version 8 but not 7
Message-ID<jm8psc$j38$1@smc.vnet.net>
Hi All,

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?

Many thanks,

Jonny

[toc] | [next] | [standalone]


#9642

FromA Retey <awnl@gmx-topmail.de>
Date2012-04-14 07:14 +0000
Message-ID<jmb84s$r53$1@smc.vnet.net>
In reply to#9606
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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web