help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Help-gsl] Performance issue with ODE solvers


From: Michael Stauffer
Subject: RE: [Help-gsl] Performance issue with ODE solvers
Date: Mon, 28 Jan 2008 19:16:11 -0500

> -----Original Message-----
> From: Brian Gough [mailto:address@hidden 
> Sent: Monday, January 28, 2008 4:22 PM
> To: Michael Stauffer
> Cc: address@hidden
> Subject: Re: [Help-gsl] Performance issue with ODE solvers
> 
> 
> At Thu, 24 Jan 2008 00:53:07 -0500,
> Michael Stauffer wrote:
> > I've noticed what might be the same issue with ODE solver 
> performance. 
> > I'm porting some Matlab code to C and in Matlab I'm using 
> the "ode45" 
> > solver which is described as "based on an explicit 
> Runge-Kutta (4,5) 
> > formula, the Dormand-Prince pair. It is a one-step 
> solver.". In GSL, 
> > I'm using
> > gsl_odeiv_step_rk4: "4th order (classical) Runge-Kutta." 
> > 
> > My C code, using GSL, ends up calling my ODE function anywhere from 
> > 10-30x more often than the Matlab code does, which kills 
> most or all 
> > of the speed gain from coding in C. I'm using the same error 
> > tolerances for both. The GSL code produces fewer time steps in the 
> > end, but is calling the ODE function many more times so it 
> could be an 
> > issue with solving for too high a tolerance.
> 
> Please could you submit a bug report to address@hidden with 
> a small example program and output showing the first 5 steps 
> from both. Thanks.

Brian,

I got an email from Warren Weckesser off-list that suggested the "...rk4"
stepper algorithm I've been using is mainly of academic interest, and I
should try the "...rkf45" or "...pd8" stepper for better results. So I'll be
looking into that. I'll post my results, but it may be a bit off, my wife's
just about to have our first baby!

Cheers,
Michael





reply via email to

[Prev in Thread] Current Thread [Next in Thread]