← Back to team overview

dolfin team mailing list archive

Re: ProjectionLibrary compile problem

 

On Wed, Mar 26, 2008 at 12:34:55PM +0100, Johan Jansson wrote:
> Garth N. Wells wrote:
> > Ola Skavhaug wrote:
> >   
> >> I'm just barely able to compile dolfin on my computer
> >> due to memory requirements during compilation of ProjectionLibrary. Almost 60%
> >> of my memory was in use at peak. The consequence is that I cannot use scons
> >> -j4 (or similar) to speed up compilation. 
> >>
> >> $ cat /proc/meminfo  | grep MemTotal
> >> MemTotal:      2063108 kB
> >>
> >> Is this something we really want?
> >>
> >>     
> >
> >
> > I also noticed a big slow down in compilation.
> >
> > I don't think we need ProjectionLibrary. A user can create the files 
> > they need using FFC. We discussed some time ago also removing 
> > ElementLibrary because user could create their own elements, but kept it 
> > so that Functions could be read from file. This reasoning doesn't hold 
> > for projections.
> >
> > Garth
> >   
> I think you're throwing out the baby with the bathwater here. The idea 
> with having a projection library is to be able to have a C++ interface 
> for projections. If you have to:
> 
> 1. Write projection forms (which always look the same except the element).
> 2. Construct the form objects.
> 3. Solve the discrete system.
> 
> This is not a high-level projection interface.
> 
> The analogous Function read interface would be to:
> 
> 1. Write the FFC description of the element.
> 2. Read the vector of degrees of freedom.
> 3. Construct the function object.
> 
> A much simpler fix is to remove some of the elements in the library. 
> Currently the library (ElementLibrary and ProjectionLibrary have the 
> same elements) consists of these elements:
> 
> """
> FiniteElement("Lagrange", "triangle", 1)
> FiniteElement("Lagrange", "triangle", 2)
> FiniteElement("Lagrange", "triangle", 3)
> FiniteElement("Lagrange", "tetrahedron", 1)
> FiniteElement("Lagrange", "tetrahedron", 2)
> FiniteElement("Lagrange", "tetrahedron", 3)
> FiniteElement("Discontinuous Lagrange", "triangle", 0)
> FiniteElement("Discontinuous Lagrange", "triangle", 1)
> FiniteElement("Discontinuous Lagrange", "triangle", 2)
> FiniteElement("Discontinuous Lagrange", "tetrahedron", 0)
> FiniteElement("Discontinuous Lagrange", "tetrahedron", 1)
> FiniteElement("Discontinuous Lagrange", "tetrahedron", 2)
> FiniteElement("Discontinuous Lagrange", "tetrahedron", 3)
> VectorElement("Lagrange", "triangle", 1)
> VectorElement("Lagrange", "triangle", 2)
> VectorElement("Lagrange", "triangle", 3)
> VectorElement("Lagrange", "tetrahedron", 1)
> VectorElement("Lagrange", "tetrahedron", 2)
> VectorElement("Lagrange", "tetrahedron", 3)
> VectorElement("Discontinuous Lagrange", "triangle", 0)
> VectorElement("Discontinuous Lagrange", "triangle", 1)
> VectorElement("Discontinuous Lagrange", "triangle", 2)
> VectorElement("Discontinuous Lagrange", "tetrahedron", 0)
> VectorElement("Discontinuous Lagrange", "tetrahedron", 1)
> VectorElement("Discontinuous Lagrange", "tetrahedron", 2)
> VectorElement("Discontinuous Lagrange", "tetrahedron", 3)
> FiniteElement("Brezzi-Douglas-Marini", "triangle", 1)
> """
> 
> I propose the reduced list:
> 
> 
> """
> FiniteElement("Lagrange", "triangle", 1)
> FiniteElement("Lagrange", "triangle", 2)
> FiniteElement("Lagrange", "tetrahedron", 1)
> FiniteElement("Lagrange", "tetrahedron", 2)
> FiniteElement("Discontinuous Lagrange", "triangle", 0)
> FiniteElement("Discontinuous Lagrange", "triangle", 1)
> FiniteElement("Discontinuous Lagrange", "triangle", 2)
> FiniteElement("Discontinuous Lagrange", "tetrahedron", 0)
> FiniteElement("Discontinuous Lagrange", "tetrahedron", 1)
> FiniteElement("Discontinuous Lagrange", "tetrahedron", 2)
> VectorElement("Lagrange", "triangle", 1)
> VectorElement("Lagrange", "triangle", 2)
> VectorElement("Lagrange", "tetrahedron", 1)
> VectorElement("Lagrange", "tetrahedron", 2)
> VectorElement("Discontinuous Lagrange", "triangle", 0)
> VectorElement("Discontinuous Lagrange", "triangle", 1)
> VectorElement("Discontinuous Lagrange", "triangle", 2)
> VectorElement("Discontinuous Lagrange", "tetrahedron", 0)
> VectorElement("Discontinuous Lagrange", "tetrahedron", 1)
> VectorElement("Discontinuous Lagrange", "tetrahedron", 2)
> FiniteElement("Brezzi-Douglas-Marini", "triangle", 1)
> """
> 
> This cuts compilation and memory size by about half.
> 
> Current list:
> 
> user    2m43.682s
> 
> Reduced list:
> 
> user    1m11.344s
> 
> What do you think?
> 
>   Johan

Sounds good. Let's start with this and see if it's acceptable.

-- 
Anders


References