Comments (4)
I think it is OK to keep this option. However, the original policy of Athena++ is minimizing use of #ifdef. The problem of #ifdef is codes within the #ifdef - #endif block are not compiled and therefore not error checked (This is of course necessary for external library calls). Modern compilers should be able to optimize C++ if statements if they can be determined at the time of compilation. So I prefer to keep this policy, and encourage developers to use if instead of #ifdef as much as possible.
from athena.
Oh but to do so, we need to change
#define DEBUG
to #define DEBUG 1
from athena.
@tomidakn I agree that if (DEBUG) { ...}
is highly preferred to #ifdef DEBUG
. But I wonder if we shouldn't also be very strict about how many if (DEBUG) { ...}
sections get merged to master
. And also, the switch might make more sense to be decoupled from compiling with -g
. Sometimes you will want the debug symbols in your executable without a bunch of your verbose DEBUG
code running. Although I guess in that case you can manually add the --cflag=-g
instead of -debug
convenience flag for configure.py
from athena.
This is a good point. Indeed, I agree that we should separate the debugger (-g) option and the DEBUG flag. Possibly, it may be better to have a separate DEBUG flag for each module. I also understand that it is better to reduce DEBUG codes as much as possible in the master.
I am not sure if this is the best yet, but one possibility is separating "debug" = less optimization and "verbose" = more diagnosis messages?
from athena.
Related Issues (20)
- Fix convergence errors on AWS EC2 Graviton instances HOT 5
- Reduce cost of 4th order hydro EOS and flux calculations HOT 1
- Resurrect Princeton Jenkins server HOT 7
- Convert Travis CI jobs into GitHub Actions
- Fix unsafe SIMD in relativistic Riemann solvers HOT 2
- Is this pdata->pnext supposed to be pnew->pnext here?
- Merge GR radiation transport
- Use a uniform convention for boundary condition input parameters HOT 4
- Errors of linear Alfven wave for RK3+PPM (xorder=3) are much smaller than those in Athena++ paper
- Leftovers from merge non-relativistic radiation transport: add more output switches, derive IMRadTaskList, etc. HOT 7
- Timestep is incorrect for some GR metrics HOT 4
- Leftover chemistry fixes HOT 2
- Inconsistency in documentation of user-defined source terms? HOT 5
- Remove extraneous DeleteAthenaArray() calls HOT 3
- Access ParameterInput instance from user boundary conditions HOT 2
- Array indexing errors in llf_mhd_rel_no_transform.cpp HOT 2
- Leftover cosmic ray transport and diffusion changes HOT 1
- MHD shearing box has artifacts with SMR HOT 3
- athena_read allocates unnecessarily large amount of memory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from athena.