Skip to content

Commit

Permalink
Env Variable: AMREX_DEBUG
Browse files Browse the repository at this point in the history
Introduce control of backtrace handling and exception throwing via
the environment variable `AMREX_DEBUG`.

This is very handly when running CI/CD and IDE workflows to quickly
debug a failing test without overwriting default init parameters.
  • Loading branch information
ax3l committed Sep 23, 2024
1 parent 84c7ade commit d33c36a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Docs/sphinx_documentation/source/Debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ The following runtime options need to be set in order to prevent AMReX from catc

This default behavior can also be modified by applications, see for example `this custom application initializer <https://github.com/Exawind/amr-wind/blob/84f81a990152f4f748c1ab0fa17c8c663e51df86/amr-wind/main.cpp#L21>`__.

The above default can also be achieve by setting the environment variable ``AMREX_DEBUG``:
Alternatively, set the environment variable ``AMREX_DEBUG`` to change the defaults in the same way:

.. highlight:: console

::
.. code-block: console
export AMREX_DEBUG=1
Note that input and command line arguments always have precedence over environment variables.


.. _sec:gpu:debugging:

Expand Down
2 changes: 0 additions & 2 deletions Src/Base/AMReX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@ amrex::Initialize (int& argc, char**& argv, bool build_parm_parse,
system::exename.clear();
// system::verbose = 0;
system::regtest_reduction = false;


system::signal_handling = !amrex_debug;
system::handle_sigsegv = true;
system::handle_sigterm = false;
Expand Down

0 comments on commit d33c36a

Please sign in to comment.