Subject: Re: [FFC-dev] ffc compiler error

From: Andrey <[email-masked]>
Date: Mon, 10 Sep 2007 02:31:35 +0400

Hello again!

Now I have another issue.
I created a small project in order to use FFC and Dolfin:

1) ChorinTemamFenics.form (this is a part of evolution
Navier - Stokes equations solver, in cylindrical coordinates
with axial symmetry) 
2) main.cpp (this is only the sample to check how compiler
will work with generated .h file and Dolfin headers)
3) Makefile and dolfin.conf (standard from Dolfin installation
directory)

The result is following:
1) Generated with “ffc -l dolfin ChorinTemamFenics.form” .h file
has size 26Mb and there are some lines in the code with length 290Kb.
2) Compilation with “make” of main.cpp and .h takes more then 3 hours
and then gcc finishes with “out of memory” message.

Best regards,
Andrey

---

From: Anders Logg <[email-masked]>
Date: Mon, 10 Sep 2007 01:00:32 +0200

> and then gcc finishes with “out of memory” message.

Yes, sometimes the default code generation strategy of FFC can generate 
quite a few lines of code. The generated code is completely unrolled so 
  this is natural.

There are a few things you can try:

1. Compile without optimization (g++ -O0) which gives g++ an easier job.

2. Avoid multiplications (if possible). If you have two coefficients f 
and g that appear in your form as f*g, then consider replacing them by h 
= f*g.

3. Use the (experimental) quadrature mode of FFC: ffc -r quadrature. 
This will use a different code generation strategy that should result in 
a much smaller code size (but possibly not as efficient).

There are a few other options but these are currently broken:

1. BLAS mode: ffc -f blas.

2. Project coefficients down to piecewise constants.

Both the BLAS mode and projections are currently broken.

/Anders

> Best regards,
> Andrey
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev