FFC

Possibly costly hidden cache in ffc?

Bug #1108732 reported by Martin Sandve Alnæs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
FFC
New
Undecided
Unassigned

Bug Description

In ffc/tensor/monomialextraction.py, there is a global _cache dict in which ufl integrands and monomial integrands are stored when analysed. This looks to me like it will cause memory leaks in two cases

1) Large forms can consume quite a bit of memory
2) Pydolfin forms typically hold references to functions

I haven't tested this, just letting you know so someone who has a better overview here can consider it.

(but please don't make any big changes to ffc right now, both Anders and I have merges coming up that will be complex enough as it is...)

Revision history for this message
Anders Logg (logg) wrote : Re: [Bug 1108732] [NEW] Possibly costly hidden cache in ffc?

On Tue, Jan 29, 2013 at 09:52:53AM -0000, Martin Sandve Alnæs wrote:
> Public bug reported:
>
> In ffc/tensor/monomialextraction.py, there is a global _cache dict in
> which ufl integrands and monomial integrands are stored when analysed.
> This looks to me like it will cause memory leaks in two cases
>
> 1) Large forms can consume quite a bit of memory
> 2) Pydolfin forms typically hold references to functions
>
> I haven't tested this, just letting you know so someone who has a better
> overview here can consider it.
>
> (but please don't make any big changes to ffc right now, both Anders and
> I have merges coming up that will be complex enough as it is...)
>
> ** Affects: ffc
> Importance: Undecided
> Status: New

Strange. The higher level cache should take care of this. When someone
has time (me or someone else) it would be fairly simple to just
comment out the caching and see if it has any negative impact on
performance. If not, the caching can be removed.

--
Anders

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.