Skip to content

Commit

Permalink
Document using PETSc's option -fp_trap for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ckhroulev committed Nov 19, 2021
1 parent 53b742a commit 254216f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/sphinx/contributing/development-workflow.rst
Expand Up @@ -182,6 +182,18 @@ errors are often caused by these). Consider using Valgrind_ to detect them.
Your code will run much, much slower when using Valgrind, so it is important to find
a small test case reproducing the error.

Floating point exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~

Run PISM like this

.. code-block:: bash
pismr -fp_trap -on_error_attach_debugger [other options]
to catch floating point exceptions (division by zero, operations with a not-a-number or
infinity, square root of a negative number, etc).

Issues visible in parallel runs only
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 254216f

Please sign in to comment.