Benchmark various different solver/preconditioner combinations automatically

Asked by Simon Funke

I am wondering if there is a build-in functionality to benchmark the available solver/preconditioners automatically.

Basically, what I am thinking of is a dolfin.parameter switch that, if activated, solves each linear problem with a whole bunch of solver/preconditioner combinations and reports which one was the fastest.

(I am aware that this could be coded up quite easily every time, however it seems like a useful thing to have in particular because some solvers are only available in certain linear algebra backends.)

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Simon Funke
Solved:
Last query:
Last reply:
Revision history for this message
Kent-Andre Mardal (kent-and) said :
#1

On 29 March 2012 18:06, Simon Funke <email address hidden>wrote:

> New question #192062 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/192062
>
> I am wondering if there is a build-in functionality to benchmark the
> available solver/preconditioners automatically.
>
> Basically, what I am thinking of is a dolfin.parameter switch that, if
> activated, solves each linear problem with a whole bunch of
> solver/preconditioner combinations and reports which one was the fastest.
>

We don´t have this. But it could be a useful utitilty.

Kent

>
> (I am aware that this could be coded up quite easily every time, however
> it seems like a useful thing to have in particular because some solvers are
> only available in certain linear algebra backends.)
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>

Revision history for this message
Anders Logg (logg) said :
#2

B1;2802;0cOn Fri, Mar 30, 2012 at 05:45:44AM -0000, Kent-Andre Mardal wrote:
> Question #192062 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/192062
>
> Status: Open => Answered
>
> Kent-Andre Mardal proposed the following answer:
> On 29 March 2012 18:06, Simon Funke
> <email address hidden>wrote:
>
> > New question #192062 on DOLFIN:
> > https://answers.launchpad.net/dolfin/+question/192062
> >
> > I am wondering if there is a build-in functionality to benchmark the
> > available solver/preconditioners automatically.
> >
> > Basically, what I am thinking of is a dolfin.parameter switch that, if
> > activated, solves each linear problem with a whole bunch of
> > solver/preconditioner combinations and reports which one was the fastest.
>
> We don´t have this. But it could be a useful utitilty.

We have something like this here:

  bench/fem/assembly

--
Anders

Revision history for this message
Simon Funke (simon-funke) said :
#3

I created a little Python module that does runs various solver/preconditioner combinations.
It works by overwriting and extending the dolfin.solve routine.
The source and an example can be downloaded at:

https://github.com/funsim/DOLFIN_benchmark

Revision history for this message
Anders Logg (logg) said :
#4

On Sun, Apr 01, 2012 at 07:25:52PM -0000, Simon Funke wrote:
> Question #192062 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/192062
>
> Status: Answered => Solved
>
> Simon Funke confirmed that the question is solved:
> I created a little Python module that does runs various solver/preconditioner combinations.
> It works by overwriting and extending the dolfin.solve routine.
> The source and an example can be downloaded at:
>
> https://github.com/funsim/DOLFIN_benchmark

Nice. Can you post some results (tables or plots)? It would be
interesting to see some numbers.

--
Anders

Revision history for this message
Anders Logg (logg) said :
#5

On Sun, Apr 01, 2012 at 07:25:52PM -0000, Simon Funke wrote:
> Question #192062 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/192062
>
> Status: Answered => Solved
>
> Simon Funke confirmed that the question is solved:
> I created a little Python module that does runs various solver/preconditioner combinations.
> It works by overwriting and extending the dolfin.solve routine.
> The source and an example can be downloaded at:
>
> https://github.com/funsim/DOLFIN_benchmark

Post the numbers to the DOLFIN mailing list.

--
Anders