Strange results in JIT compilation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
FFC |
Fix Released
|
Critical
|
Martin Sandve Alnæs | ||
UFL |
Fix Released
|
Critical
|
Martin Sandve Alnæs |
Bug Description
There seems to be something seriously wrong with either DOLFIN-FFC jit
compilation or caching or instant.
To reproduce, for instance consider the following code snippet and do
the following
(1): Run instant-clean
(2): Run script unmodified.
Output is:
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling DOLFIN just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Solving linear system of size 1089 x 1089 (PETSc Krylov solver).
40.4757877531
(3) Uncomment commented lines and run.
Output is:
Solving linear system of size 1089 x 1089 (PETSc Krylov solver).
40.4757877531
Solving linear system of size 1089 x 1089 (PETSc Krylov solver).
40.4757877531 (*)
(4) Run instant-clean, comment out lines defining f, g, and 1st print. Run.
Output is
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling DOLFIN just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Solving linear system of size 1089 x 1089 (PETSc Krylov solver).
40.490263582 (**)
Problem: The last two floats, tagged by (*) and (**), should be the
same: they are not.
Code snippet:
--
from dolfin import *
mesh = UnitSquareMesh(
V = FunctionSpace(mesh, 'CG', 2)
f = Expression(
g = project(f, V)
print g.vector(
#f2 = Expression(
#g2 = project(f2, V)
#print g2.vector(
--
Changed in dolfin: | |
milestone: | none → 1.2.0 |
Changed in dolfin: | |
status: | In Progress → Fix Committed |
Changed in ufl: | |
status: | In Progress → Fix Committed |
Changed in ffc: | |
status: | New → Fix Committed |
Changed in dolfin: | |
status: | Fix Committed → Invalid |
Changed in ffc: | |
importance: | Undecided → Critical |
assignee: | nobody → Martin Sandve Alnæs (martinal) |
milestone: | none → 1.2.0 |
no longer affects: | dolfin |
Changed in ufl: | |
status: | Fix Committed → Fix Released |
Changed in ffc: | |
status: | Fix Committed → Fix Released |
Works fine with 1.1.x, but not with 1.2.x or trunk.