← Back to team overview

instant team mailing list archive

Re: Slow memory cache?

 

On Thu, Sep 11, 2008 at 06:53:22PM +0200, Martin Sandve Alnæs wrote:
> You're calling jitobject.signature() in extract_form.

Thanks! I did this since I needed to know the name of the form to
extract from the module, but it worked fine to use module.__name__.

It works fine now. Here are timings with and without the FFC cache:

  Disk cache:      0.552545070648
  In-memory cache: 0.00687968730927

  Disk cache:      0.555771112442
  In-memory cache: 0.00716300010681

The difference is 4% and the time is less than 0.01 seconds so I'm
removing the FFC cache. Some of the difference is extra calls needed
in the JIT compiler to extract the form from the module so Instant
accounts only for part of the difference, I don't know how much.

In conclusion, FFC and Instant work fine now and the JIT code in FFC
is short and neat.

-- 
Anders


> 2008/9/11 Martin Sandve Alnæs <martinal@xxxxxxxxx>:
> > It's not Instant that uses this time, you have some other bug:
> >
> > --- Calling FFC JIT compiler ---
> > instant.import_module time: 0.330512046814
> > Assembling matrix over cells (finished).
> > TIME IS 0.335214853287
> > Assembly # 0
> >
> > --- Calling FFC JIT compiler ---
> > instant.import_module time: 0.000116109848022
> > Assembling matrix over cells (finished).
> > TIME IS 0.333696126938
> > Assembly # 1
> >
> > --- Calling FFC JIT compiler ---
> > instant.import_module time: 0.0001220703125
> > Assembling matrix over cells (finished).
> > TIME IS 0.331577062607
> >
> >
> >
> >
> > 2008/9/11 Anders Logg <logg@xxxxxxxxx>:
> >> I'm still struggling with getting good performance from the in-memory
> >> cache in Instant.
> >>
> >> Below are the results for the JIT benchmark in bench/fem/jit in DOLFIN.
> >>
> >> When using only the caching provided by Instant, the results are
> >>
> >>  Disk cache:      0.552037000656
> >>  In-memory cache: 0.551201319695
> >>
> >> But when I turn on the internal FFC cache, I get
> >>
> >>  Disk cache:      0.556658029556
> >>  In-memory cache: 0.00709209442139
> >>
> >> The speedup is a factor 80. To run the benchmark with or without the
> >> FFC cache, change the variable use_ffc_cache in jit.py in FFC.
> >>
> >> I have printed out some debugging in cache.py in Instant and it seems
> >> that the in-memory cache is being used (not the disk cache).
> >>
> >>
> >> -----BEGIN PGP SIGNATURE-----
> >> Version: GnuPG v1.4.6 (GNU/Linux)
> >>
> >> iD8DBQFIySAoTuwUCDsYZdERAm6dAJ9lRJinzVE8S2ywfTvXHwUYFcx/6wCfdr8B
> >> 1n19Q3HHv1jU/65njM0R39A=
> >> =PXoq
> >> -----END PGP SIGNATURE-----
> >>
> >> _______________________________________________
> >> Instant-dev mailing list
> >> Instant-dev@xxxxxxxxxx
> >> http://fenics.org/mailman/listinfo/instant-dev
> >>
> >>
> >
> 
> 
> 

Attachment: signature.asc
Description: Digital signature


Follow ups

References