Thread Previous • Date Previous • Date Next • Thread Next |
On 04/09/10 17:20, Johan Hake wrote:
On Saturday September 4 2010 08:55:42 Anders Logg wrote:On Sat, Sep 04, 2010 at 08:49:43AM -0700, Johan Hake wrote:On Saturday September 4 2010 05:03:04 Anders Logg wrote:All of the problems seem to come from the Python tests and demos with std::bad_cast. Perhaps something with the SWIG layer?Yes I have noitced this before. Not sure why but I have not been able to compile the wrapper code with -O3Isn't it just that the wrapper code (like the form files) can be very large (very many lines of code in a single function or file) so the compiler runs out of memory or takes a very long time to compute the optimizations?It might be that the dolfin wrapper file it too large. But I have tried compiling the a much smaller wrapper code and it also bailed out for -O3.
I've never had a problem with -O3 when using the quadrature representation. It can be a problem for the tensor contraction, but by the time you run into this limitation the quadrature code is much faster anyway. Why I am seeing now for a particular problem is that Kristian's FFC optimisations so good that -O3 and -O0 make no difference because insertion is dominating.
The tensor contraction would be more compiler friendly (and most likely efficient) if it didn't unroll loops, but used fixed size loops and let the compiler do tricks on those.
Garth
JohanI changed to -O2 for the same reason in the Dorsal PETSc package file. I think -O3 is ok for PETSc but I think of -O2 as optimize and -O3 as try even harder. -- Anders
Thread Previous • Date Previous • Date Next • Thread Next |