← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 4824: Add new benchmark bench/common/progress. Johannes, please backport.

 

On Tue, Jun 29, 2010 at 11:16 AM, Anders Logg <logg@xxxxxxxxx> wrote:
> On Tue, Jun 29, 2010 at 11:09:47AM +0200, Johannes Ring wrote:
>> I backported this benchmark to 0.9.7 and it ran for over 17 minutes.
>
> !
>
> That's quite a good speedup. :-)
>
>> On DOLFIN-dev it run for about 55 seconds. Maybe we should reduce
>> the
>> problem size somewhat before I backport further?
>
> Sure, but not too much. I think we can improve it further (by a factor
> 10 or so) and then it might run too quickly. I also suspect DOLFIN
> 0.9.7 to be the slowest (or one of the slowest).
>
> Try reducing SIZE by a factor 2 or so.

That reduced the runtime to just under nine minutes for 0.9.7 and 33
seconds for bzr tip. I also tried DOLFIN 0.7.3 and it is as slow as
0.9.7.

Johannes

> --
> Anders
>
>
>> Johannes
>>
>> On Tue, Jun 29, 2010 at 9:56 AM,  <noreply@xxxxxxxxxxxxx> wrote:
>> > ------------------------------------------------------------
>> > revno: 4824
>> > committer: Anders Logg <logg@xxxxxxxxx>
>> > branch nick: dolfin-dev
>> > timestamp: Tue 2010-06-29 09:54:04 +0200
>> > message:
>> >  Add new benchmark bench/common/progress. Johannes, please backport.
>> > added:
>> >  bench/common/
>> >  bench/common/progress/
>> >  bench/common/progress/cpp/
>> >  bench/common/progress/cpp/SConstruct
>> >  bench/common/progress/cpp/main.cpp
>> >
>> >
>> >
>> > Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
>> > To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription
>> >
>> > === added directory 'bench/common'
>> > === added directory 'bench/common/progress'
>> > === added directory 'bench/common/progress/cpp'
>> > === added file 'bench/common/progress/cpp/SConstruct'
>> > --- bench/common/progress/cpp/SConstruct        1970-01-01 00:00:00 +0000
>> > +++ bench/common/progress/cpp/SConstruct        2010-06-29 07:54:04 +0000
>> > @@ -0,0 +1,14 @@
>> > +import os, commands
>> > +
>> > +# Get compiler from pkg-config
>> > +compiler = commands.getoutput('pkg-config --variable=compiler dolfin')
>> > +
>> > +# Create a SCons Environment based on the main os environment
>> > +env = Environment(ENV=os.environ, CXX=compiler)
>> > +
>> > +# Get compiler flags from pkg-config
>> > +env.ParseConfig('pkg-config --cflags --libs dolfin')
>> > +
>> > +# Program name
>> > +env.Program('bench', 'main.cpp')
>> > +
>> >
>> > === added file 'bench/common/progress/cpp/main.cpp'
>> > --- bench/common/progress/cpp/main.cpp  1970-01-01 00:00:00 +0000
>> > +++ bench/common/progress/cpp/main.cpp  2010-06-29 07:54:04 +0000
>> > @@ -0,0 +1,32 @@
>> > +// Copyright (C) 22010 Anders Logg.
>> > +// Licensed under the GNU LGPL Version 2.1.
>> > +//
>> > +// First added:  2010-06-29
>> > +// Last changed: 2010-06-29
>> > +
>> > +#include <dolfin.h>
>> > +
>> > +using namespace dolfin;
>> > +
>> > +#define NUM_REPS 5
>> > +#define SIZE 1000000000
>> > +
>> > +int main(int argc, char* argv[])
>> > +{
>> > +  info("Creating progress bar with %d steps (%d repetitions)",
>> > +       SIZE, NUM_REPS);
>> > +
>> > +  for (int i = 0; i < NUM_REPS; i++)
>> > +  {
>> > +    Progress p("Stepping", SIZE);
>> > +    double sum = 0.0;
>> > +    for (int j = 0; j < SIZE; j++)
>> > +    {
>> > +      sum += 0.1;
>> > +      p++;
>> > +    }
>> > +    dolfin::cout << "sum = " << sum << dolfin::endl;
>> > +  }
>> > +
>> > +  return 0;
>> > +}
>> >
>> >
>> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkwpugAACgkQTuwUCDsYZdHZ4gCfSD8z2tDA+PGLOibSVtqPyDCK
> XgcAn14JpK9s1/di+vQwN8kQtUru+xfK
> =wVnm
> -----END PGP SIGNATURE-----
>
>



Follow ups

References