I tried to run the code against the dev versions of FEniCS and got the
following error after successfully finishing the FFC part:
Traceback (most recent call last):
File "demo.py", line 15, in<module>
V = FunctionSpace(mesh, "CG", 1)
File "/home/oelgaard/software/fenics/dolfin/local/lib/python2.6/site-packages/dolfin/function/functionspace.py",
line 230, in __init__
FunctionSpaceBase.__init__(self, mesh, element)
File "/home/oelgaard/software/fenics/dolfin/local/lib/python2.6/site-packages/dolfin/function/functionspace.py",
line 44, in __init__
ufc_element, ufc_dofmap = jit(self._ufl_element)
File "/home/oelgaard/software/fenics/dolfin/local/lib/python2.6/site-packages/dolfin/compilemodules/jit.py",
line 44, in mpi_jit
return local_jit(*args, **kwargs)
File "/home/oelgaard/software/fenics/dolfin/local/lib/python2.6/site-packages/dolfin/compilemodules/jit.py",
line 87, in jit
p = form_compiler.default_parameters()
AttributeError: 'module' object has no attribute 'default_parameters'
Kristian
On 21 June 2010 15:42,<kent-and@xxxxxxxxx> wrote:
Hi, just portet SFC to dolfin-dev and ufl-dev and made some simple
comparisons with FFC. I
don't know exactly how representative these are, but I thought I'd try to
compare
them for fun.
I have used the following code:
from dolfin import *
import time
for compiler in ["ffc", "sfc"]:
for N in [200, 400, 800]:
parameters["form_compiler"]["name"]=compiler
if compiler == "ffc":
parameters["form_compiler"]["optimize"] = True
parameters ["form_compiler"]["cpp_optimize"] = True
mesh = UnitSquare(N, N)
V = FunctionSpace(mesh, "CG", 1)
P=6
U = Function(V)
energy = U**6*(U*U + inner(grad(U), grad(U)))*dx
v = TestFunction(V)
u = TrialFunction(V)
F = derivative(energy, U, v)
J = derivative(F, U, u)
print ""
print "First time"
print ""
t0 = time.time()
A = assemble(J)
t1 = time.time()
print "First time for ", compiler, " was ", t1 - t0
print ""
print "Second time"
print ""
t0 = time.time()
A = assemble(J)
t1 = time.time()
print "Second time for ", compiler, " was ", t1 - t0
With these options SFC is about 3 times faster than FFC. How should I
optimize FFC ?
Kent
_______________________________________________
Mailing list: https://launchpad.net/~ffc
Post to : ffc@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~ffc
More help : https://help.launchpad.net/ListHelp