dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #07740
Re: Linear algebra benchmarking
I did not get to test uBlas, but on my machine the assembly process
(mass matrix) in the attached script took 5.3s with PETSc and 6.1s with
Epetra.
Kent
ons, 30.04.2008 kl. 09.36 +0100, skrev Garth N. Wells:
> It looks like the necessary functions for assembly using Trilinos as a
> back end are in place, so I was wondering if anyone has had a chance to
> compare the assembly performance of the various linear algebra back ends?
>
> Garth
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
from dolfin import *
from time import time
N = 1000
mesh = UnitSquare(N,N)
element = FiniteElement("CG", "triangle", 1)
v = TestFunction(element)
u = TrialFunction(element)
a = dot(v, u)*dx
t0 = time()
backend = PETScFactory.instance()
A = assemble(a, mesh, backend=backend)
t1 = time()
print "time ", t1-t0
a = dot(v, u)*dx
t0 = time()
backend = EpetraFactory.instance()
A = assemble(a, mesh, backend=backend)
t1 = time()
print "time ", t1-t0
a = dot(v, u)*dx
t0 = time()
backend = uBlasFactory.instance()
A = assemble(a, mesh, backend=backend)
t1 = time()
print "time ", t1-t0
Follow ups
References