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

From: [email-masked] (FFC)
Date: Tue, 24 Feb 2009 18:03:01 +0100 (CET)

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 <[email-masked]>"
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.

changeset:   1333:f7218841ca27c90762c8cda9c1d5001348dff2f0
user:        Anders Logg <[email-masked]>
date:        Tue Feb 24 17:23:05 2009 +0100
files:       ffc/jit/jit.py
description:
Bug fix in JIT compiler

changeset:   1332:81c8d5784afa9613b9019c1ac29113e86ccccbd2
parent:      1331:ca05912025f07905de435b89a632a6776ae27ba9
parent:      1330:ae864edc38e416006882cd837d521bce2a59072e
user:        Anders Logg <[email-masked]>
date:        Tue Feb 24 17:21:21 2009 +0100
files:       
description:
merge

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/ffc

---

From: Kristian Oelgaard <[email-masked]>
Date: Tue, 24 Feb 2009 18:12:55 +0100

> 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

> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev
>

---

From: Anders Logg <[email-masked]>
Date: Tue, 24 Feb 2009 22:01:02 +0100

> and passing the jit_object to extract_form(), but this resulted in the

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