← Back to team overview

ffc team mailing list archive

Re: Restructure computation of reference tensor to use less memory. [...]

 

"Garth N. Wells" <g.n.wells@xxxxxxxxxxxxxxx> writes:

> Quoting Johan Hoffman <jhoffman@xxxxxxxxxxx>:
>
>> Looks great!
>> 
>> A question regarding Numeric: I hear that Numeric has been replaced by
>> Numarray in Python? Does that change anything in the installation and
>> usage of FIAT/FFC?
>
> Seems like Numarray is also going to cease in favour of SciPy.

  Yes, I believe the Numeric 3.0 PEP will be accepted.

       Matt

> Garth
>
>> 
>> /Johan
>> 
>> 
>> > Commit from logg (2005-12-05 18:26 CET)
>> > ----------------
>> >
>> > Restructure computation of reference tensor to use less memory.
>> >
>> > As a side effect, the speed of the computation was actually improved...
>> >
>> > Here are some results for compiling the nonlinear term of Navier-Stokes
>> for quadratics on tets:
>> >
>> >          | FFC 0.2.2  | FFC 0.2.3 | Current CVS
>> > --------------------------------------------------
>> > CPU time | 167 s      | 21 s      | 15 s
>> > Memory   | 22 MB      | 489 MB    | 27 MB
>> >
>> > The memory usage is actually around 22 MB during most of the
>> computation.
>> > The 27 MB is only during a short peak (while copying some values from
>> one tensor to another).
>> >
>> > FFC 0.2.2 used an old loop-based approach, while FFC 0.2.3 worked
>> through Numeric. The current CVS works similarly to version 0.2.3, but
>> instead of building a giant tensor and then doing contractions on that
>> tensor, there are now loops over the dimensions to be contracted so that
>> we don't build any tensors larger than the final reference tensor.
>> >
>> > Also note that it now takes about 1 second to compile the nonlinear term
>> of
>> > Navier-Stokes for linears. This is a good speedup compared to the
>> initial
>> > 130 seconds with FFC version 0.1.4...
>> >
>> >   ffc  ChangeLog                                1.104
>> >   ffc  src/ffc/compiler/monomialintegration.py  1.4
>> >   ffc  src/ffc/compiler/referencetensor.py      1.19
>> >   ffc  src/reference/Elasticity.h               1.32
>> >   ffc  src/reference/EnergyNorm.h               1.10
>> >   ffc  src/reference/Mass.h                     1.18
>> >   ffc  src/reference/NavierStokes.h             1.30
>> >   ffc  src/reference/Projection.h               1.7
>> >   ffc  src/reference/Stokes.h                   1.15
>> >
>> > _______________________________________________
>> > FFC-dev mailing list
>> > FFC-dev@xxxxxxxxxx
>> > http://www.fenics.org/cgi-bin/mailman/listinfo/ffc-dev
>> >
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> FFC-dev mailing list
>> FFC-dev@xxxxxxxxxx
>> http://www.fenics.org/cgi-bin/mailman/listinfo/ffc-dev
>> 
>
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/ffc-dev
>
>
>

-- 
"Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness



References