Subject: [FFC-dev] Compilation times

From: Andy Terrel <[email-masked]>
Date: Fri, 19 Jan 2007 09:17:11 -0600

Hello Guys,

So comparing some of these Stokes methods, when I use a higher order 
iterated penalty method the compile time is killing me with ffc/dolfin.  
As in it takes hours to compile and seconds to run.  What do I do to 
speed these things up?  And do things run faster using pydolfin since 
python does the whole just in time thing?

Thanks,
Andy

---

From: "Garth N. Wells" <[email-masked]>
Date: Fri, 19 Jan 2007 12:23:56 -0600

Andy Terrel wrote:
> As in it takes hours to compile and seconds to run.  

Is it taking a long time to compile the form file, or to build a DOLFIN 
executable?

What do I do to
> python does the whole just in time thing?

If the form is changing, I wouldn't expect pyDOLFIN to help.

Garth

> Thanks,
> Andy
> _______________________________________________
> DOLFIN-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>

---

From: Andy Terrel <[email-masked]>
Date: Fri, 19 Jan 2007 12:38:58 -0600

It is the DOLFIN executable that takes so long to compile.

Garth N. Wells wrote:
>> iterated penalty method the compile time is killing me with 
>> ffc/dolfin.  As in it takes hours to compile and seconds to run.  
>
> Is it taking a long time to compile the form file, or to build a 
> DOLFIN executable?
>
> What do I do to

-- 

====================
Andy Terrel
Computer Science Dept
University of Chicago
[email-masked]
---------------------

Men are equal; 
it is not birth but virtue that makes the difference.
                                            -Voltaire

---

From: Andy Terrel <[email-masked]>
Date: Sat, 20 Jan 2007 12:35:17 -0600

Okay so switching the optimization flag from -O2 to -O0 is sped the 
compilation time up by a factor of 100 but slowed the runtime by a 
factor of .1 at least for order 5+, similar things happen for lower 
orders but less dramatically so.  Which for me made many more tests 
feasible.

Thanks,
Andy

-- 

====================
Andy Terrel
Computer Science Dept
University of Chicago
[email-masked]
---------------------

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

---

From: "Garth N. Wells" <[email-masked]>
Date: Sat, 20 Jan 2007 12:44:29 -0600

When quadrature is implemented, it should help a lot. The blas output 
option did help, but it's broken at the moment.

Garth

---

From: Anders Logg <[email-masked]>
Date: Mon, 22 Jan 2007 12:02:51 +0100

This is a known problem. For higher-order forms and complicated terms,
the compile times are signifant. Just doing a wc on the generated .h
file should indicate why. It just takes long for gcc to compile a
function with tens of thousands of instructions, especially if it
tries to optimize.

As Garth points out, we are planning for FFC to be able to generate
quadrature instead of the tensor-based representation. This will help.

And there is also the option -f blas that generates less code at the
expense of a BLAS call but this is currently broken.

I'm working on a big rewrite/reorganization of FFC that will make it
simpler to maintain and add new options (like quadrature, blas etc).

/Anders