← Back to team overview

ffc team mailing list archive

Re: ffc compiler error

 

Andrey wrote:
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.

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
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev



References