gandalfcode / gandalf

GANDALF (Graphical Astrophysics code for N-body Dynamics And Lagrangian Fluids)
GNU General Public License v2.0
44 stars 12 forks source link

Set default values in the makefile #99

Open giovanni-rosotti opened 7 years ago

giovanni-rosotti commented 7 years ago

What we have now is probably already very close to optimal. I guess we want to set DEBUG_LEVEL=0? This removes the asserts, which are there for us rather than for the generic user. We can force Travis to build and run with them anyway. We probably don't want to do it at this stage though as we are still developing stuff - I am creating the issue so that we can remember to do it at a later stage.

giovanni-rosotti commented 7 years ago

See discussion about this in #121 . Currently we have DEBUG_LEVEL=1 in the makefile. My position on the topic is: -the default for the user (so in the makefile) should be DEBUG_LEVEL=0 -travis should run with DEBUG_LEVEL=1. That's the entire point of a testing system, it's that it should run as many tests as possible! -I don't want to support a DEBUG_LEVEL=2 setting. Experience clearly shows that we are never going to use it (who has even tried it in the last 6 months?) and that something that it is not used will not be maintained (the code does not even compile with DEBUG_LEVEL=2 atm!). If we want to add validation, it either needs to be able to run on the fly with a reasonable performance hit, or it should not end up in the master branch.

For the record, this has nothing to do with FAST/DEBUG, which is the compiler setting for switching on optmizations (we currently already default to FAST).

rbooth200 commented 7 years ago

I agree with all of this.

In fact DEBUG_LEVEL=2 has never worked since I started using gandalf. The nose tests are going a great job of catching errors so far.

dhubber commented 7 years ago

ok, I believe DEBUG_LEVEL is still not set to 0 by default. We should fix this asap I reckon since it can in principle have a big effect on performance and scaling!

rbooth200 commented 7 years ago

I've added this to the improve_openmp2 branch now so I think we can close this. I think we should probably still run travis with DEBUG_LEVEL=1 though. How does one do this?

giovanni-rosotti commented 7 years ago

Just add DEBUG_LEVEL=1 on the same line on which you invoke make in .travis.yml (you'll see also other variables set there)

rbooth200 commented 7 years ago

Ok, done