Subject: [Ffc] [[email-masked]: [Branch ~ffc-core/ffc/main] Rev 1520: See if -O2 flag makes buildbot happy]

From: Anders Logg <[email-masked]>
Date: Sat, 4 Sep 2010 12:56:09 +0200

-O2 also makes more sense.

There's a risk -O3 might hit very hard on complex forms.

--
Anders

Subject: [Branch ~ffc-core/ffc/main] Rev 1520: See if -O2 flag makes buildbot happy
From: [email-masked]
To: Anders Logg <[email-masked]>
Date: Sat, 04 Sep 2010 10:48:25 -0000

------------------------------------------------------------
revno: 1520
committer: Garth N. Wells <[email-masked]>
branch nick: ffc
timestamp: Sat 2010-09-04 11:46:51 +0100
message:
  See if -O2 flag makes buildbot happy
modified:
  ffc/parameters.py

--
lp:ffc
https://code.launchpad.net/~ffc-core/ffc/main

Your team FFC Core Team is subscribed to branch lp:ffc.
To unsubscribe from this branch go to https://code.launchpad.net/~ffc-core/ffc/main/+edit-subscription
=== modified file 'ffc/parameters.py'
--- ffc/parameters.py	2010-09-04 10:31:42 +0000
+++ ffc/parameters.py	2010-09-04 10:46:51 +0000
@@ -29,7 +29,7 @@
   "output_dir":                     ".",     # output directory for generated
                                              # code
   "cpp_optimize":                   False,   # optimization for the JIT compiler
-  "cpp_optimize_flags":             "-O3",   # optimization flags for the JIT compiler
+  "cpp_optimize_flags":             "-O2",   # optimization flags for the JIT compiler
   "optimize":                       False,   # optimise the code generation
   "log_level":                      INFO,    # log level, displaying only
                                              # messages with level >= log_level

---

From: "Garth N. Wells" <[email-masked]>
Date: Sat, 04 Sep 2010 12:02:19 +0100

Seems to be something wrong with the buildbot - I can't see why it's 
complaining.

Garth

On 04/09/10 11:56, Anders Logg wrote:
> _______________________________________________
> Mailing list: https://launchpad.net/~ffc
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~ffc
> More help   : https://help.launchpad.net/ListHelp

---

From: Anders Logg <[email-masked]>
Date: Sat, 4 Sep 2010 14:03:04 +0200

All of the problems seem to come from the Python tests and demos with
std::bad_cast. Perhaps something with the SWIG layer?

--
Anders

--
Anders

---

From: Johan Hake <[email-masked]>
Date: Sat, 4 Sep 2010 08:49:43 -0700

> 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 -O3

Johan

---

From: Anders Logg <[email-masked]>
Date: Sat, 4 Sep 2010 17:55:42 +0200

> compile the wrapper code with -O3

Isn'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?

I 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

---

From: Johan Hake <[email-masked]>
Date: Sat, 4 Sep 2010 09:20:46 -0700

> compiler runs out of memory or takes a very long time to compute the

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. 
 
Johan

---

From: "Garth N. Wells" <[email-masked]>
Date: Sat, 04 Sep 2010 22:54:27 +0100

> 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

---

From: Anders Logg <[email-masked]>
Date: Sun, 5 Sep 2010 16:32:20 +0200

On Sat, Sep 04, 2010 at 10:54:27PM +0100, Garth N. Wells wrote:
> 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.

Perpaps. It would be relatively easy to make unrolling optional.

--
Anders