Skip to content
Snippets Groups Projects

Set debugMode to true by default.

Merged Podhorszki, Norbert requested to merge github/fork/pnorbert/debugmode-default-true into master

Created by: pnorbert

Let sophisticated users turn off the debugMode flag off. This change causes that examples/basics/value and examples/basics/globalArray to throw an exception. The examples are correct. The library needs to be fixed to handle the dimension definition API correctly to make the examples work again.

Merge request reports

Approval is optional

Merged by avatar (Mar 28, 2025 4:57pm UTC)

Merge details

  • Changes merged into master with d061f44c.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: chuckatkins

    What do you think about this being able to be set by an environment variable? Something like:

    ADIOS(const std::string configFile, const bool debugMode = CheckEnvVarBoolWithDefault<true>("ADIOS2_DEBUG_MODE"));

    Or to keep it out of the interface, to instead get rid of the default prameter:

    // Header
    ADIOS(const std::string configFile);
    ADIOS(const std::string configFile, const bool debugMode);
    
    // Implementation
    ADIOS(const std::string configFile)
    : ADIOS(configFile, CheckEnvVarBoolWithDefault<true>("ADIOS2_DEBUG_MODE"))
    { }

    where CheckEnvVarBoolWithDefault would need to be implemented as well. That would allow users to not have to change thier code, just an environment varibale, to switch debug mode on or off.

  • I like it…

    g

    On Jul 31, 2017, at 9:23 AM, Chuck Atkins notifications@github.com wrote:

    What do you think about this being able to be set by an environment variable? Something like:

    ADIOS(const std::string configFile, const bool debugMode = CheckEnvVarBoolWithDefault("ADIOS2_DEBUG_MODE")); where CheckEnvVarBoolWithDefault would need to be implemented as well. That would allow users to not have to change thier code, just an environment varibale, to switch debug mode on or off.

    — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ornladios/ADIOS2/pull/221#issuecomment-319065738, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5fmTZC67jRTNDt8Djz211K8l3HsVFNks5sTdVdgaJpZM4OoXhj.

  • Created by: williamfgc

    +1

  • Created by: williamfgc

    @chuckatkins let's make that part of a separate PR....I like the idea as it changes debug mode at runtime using the cheapest available way (a const bool).

Please register or sign in to reply
Loading