Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126067] Re: NDSolve is really slow in version 8 but not 7
  • From: A Retey <awnl at gmx-topmail.de>
  • Date: Sat, 14 Apr 2012 03:12:12 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jm8psc$j38$1@smc.vnet.net>

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




  • Prev by Date: Re: Frameless Window in Manipulate
  • Next by Date: Re: Deleting expressions containing a certain head
  • Previous by thread: NDSolve is really slow in version 8 but not 7
  • Next by thread: computing derivatives and limits