← Back to team overview

dolfin team mailing list archive

Re: [Bug 612579] Re: Huge performance problem in Python interface

 

On Monday August 2 2010 12:05:38 Garth Wells wrote:
> On Mon, 2010-08-02 at 18:28 +0000, Anders Logg wrote:
> > On Mon, Aug 02, 2010 at 04:15:54PM -0000, Johan Hake wrote:
> > > It looks like there is something fishy with the cashing. I can have
> > > look at it
> > > 
> > > Johan
> > 
> > There have been some regressions in the speed of caching, probably as
> > 
> > a result of the FFC rewrite earlier this year. See fem-jit-python here:
> >    http://www.fenics.org/bench/
> > 
> > I haven't bothered to examine it in detail since I thought it was
> > "good enough" but apparently not.

Yes the problem is probably not in DOLFIN, but who knows. Looking at the code 
that is provided I saw that commenting out the creation of the DOLFIN Form 
within the assemble routine and instead wrapping the Form before calling 
assemble made the difference that is reported. So I thought I have a look at 
that first.

> It probably is "good enough" in practice. There may be some issues
> following the fix of some memory leaks in Instant earlier this year.

Yes I hope I do not have to go that far. But we'll see.

Johan

> Garth
> 
> > It would be very welcome if you had a look at it. If you need my help
> > I can jump in.
> > 
> > --
> > Anders

-- 
Huge performance problem in Python interface
https://bugs.launchpad.net/bugs/612579
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.

Status in DOLFIN: New

Bug description:
In my Python Code I need to evaluate a nonlinear functional many times. This was rather slow and after a profile run, I've noticed that 90% of the time was spent in the __init__ routine of form.py to compile the form. As far as I can survey the code, this should be necessary only once. 

I have attached a simple example that illustrates the effect. In my test, the second code is roughly 40 times faster.





Follow ups

References