Default setting for CMAKE_BUILD_TYPE

Issue #174 resolved
Patrick Shriwise created an issue

Currently, this value is left unset in CMake and can result in serious performance degradation. I’ve gotten reports from new DAGMC/MOAB users that without setting this flag performance can be nearly 10 times slower. I think it would be beneficial to the project’s optics to select a default value for this variable. I’ll suggest DebWithRelInfo as the default as it provides most of the optimization as Releasewhile allowing one to debug the binaries.

@Vijay M You’ll likely want data to support this, I’ll see if I can get you some particle tracking rates in OpenMC using DAGMC geometry, but in the meantime I think it being a matter of good practice to set this variable may be motivation enough?

Comments (2)

  1. Vijay M

    I think this should be fine. My recommendation is to use RelWithDebInfo as you suggest as this by default will build with optimizations with debugging information. It is not the best for actually debugging the code as the optimizations can mess up stepping through the code or variable introspection. However, for users who just want to build MOAB, this will help.

    The autotools workflow also has --enable-debug and --enable-optimize by default. So I am not against any of this. Please submit a PR.

  2. Log in to comment