← Back to team overview

ffc team mailing list archive

Re: [HG FFC] Fix JIT unit test. But JIT can no longer compiler UFL forms.

 

On Tue, Feb 24, 2009 at 06:12:55PM +0100, Kristian Oelgaard wrote:
> Quoting FFC <ffc@xxxxxxxxxx>:
> 
> > One or more new changesets pushed to the primary ffc repository.
> > A short summary of the last three changesets is included below.
> > 
> > changeset:   1334:322cc20ca0351eba26ff7541c2fe216b19b34d58
> > tag:         tip
> > user:        "Kristian Oelgaard <k.b.oelgaard@xxxxxxxxxx>"
> > date:        Tue Feb 24 18:02:46 2009 +0100
> > files:       ffc/jit/jit.py ffc/jit/jitobject.py test/verify_tensors/test.py
> > description:
> > Fix JIT unit test. But JIT can no longer compiler UFL forms.
> 
> The unit tests work and I assume the buildbots are happy too.
> The problem now is the line:
> 
> self.form.form_data = self.form_data
> 
> in jitobject.py
> 
> UFL Form doesn't have form_data which breaks the compilation of UFL forms.
> 
>     (compiled_form, module, form_data) = jit(form, opt)
>   File "/home/oelgaard/fenics/ffc/ffc/jit/jit.py", line 61, in jit
>     return jit_form(object, options)
>   File "/home/oelgaard/fenics/ffc/ffc/jit/jit.py", line 83, in jit_form
>     module = instant.import_module(jit_object, cache_dir=options["cache_dir"])
>   File "/home/oelgaard/fenics/instant/src/instant/cache.py", line 140, in
> import_module
>     module, moduleids = check_memory_cache(moduleid)
>   File "/home/oelgaard/fenics/instant/src/instant/cache.py", line 81, in
> check_memory_cache
>     moduleid = moduleid.signature()
>   File "/home/oelgaard/fenics/ffc/ffc/jit/jitobject.py", line 76, in signature
>     self.form.form_data = self.form_data
> AttributeError: 'Form' object has no attribute 'form_data'
> 
> I tried to circumvent this by using the form_data from the jit_object instead
> and passing the jit_object to extract_form(), but this resulted in the
> performance drop.
> 
> Kristian

I found a way around this by explicitly caching form data in jit.py.

It would be good if we could avoid this. I'll send a separate not to
ufl-dev.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


References