amusecode / SeBa

3 stars 10 forks source link

optimisation coded, but not used #23

Open silviatoonen opened 1 year ago

silviatoonen commented 1 year ago

The Makefiles of SeBa include the optimisation flag -O through CFLAGS += -O However CFLAGS is not used.

My suggestion: add a flag: CXXFLAGS += -O (or -O2)

Any objections of why not to do this?

silviatoonen commented 1 year ago

credit to Evert!

silviatoonen commented 1 year ago

from some preliminary tests, using the optimisation flags speeds up SeBa by a factor 2-3.

rieder commented 1 year ago

I have no objections, provided the tests on the AMUSE side don’t fail on this. Probably they won’t. Btw, is this for standalone SeBa or also the version in AMUSE (which inherits some settings from config.mk)?

silviatoonen commented 1 year ago

It would be for both. It seems that this optimisation was intended to be included, but for some time it has not been the case.

@spzwart do you remember if for some reason it was switched of? otherwise I'll switch it back on. A factor 2-3 improvement is always nice.

spzwart commented 1 year ago

Yes, I think that we had done problems with the convergence in teaching RLOF. but lets them out back on, and test the code, see what happens.