Skip to content

[newton][bugfix] Correct faulty exception handler

Timo Koch requested to merge fix/newton-exception-handler into master

What this MR does / why does DuMux need it:

Avoids a deadlock on the Dumux side in case of parallel runs. If one process throws, we make sure to catch the error and only set converged to false. Then, we check if all processes converged and throw on all processes.

Unfortunately, there can still be deadlocks if there is global communication (in Dune) after a process throws (in Dune) within some Dune function (e.g. in the solver). In that case, we cannot easily handle this in Dumux, because the communicating processes are stuck in the Dune function, and only the throwing process makes it back to Dumux. Therefore, we cannot recover (we could terminate after a timeout). See https://arxiv.org/abs/1804.04481 for a discussion of the general problem.

  • Add parallel unit test for newton where the assembler or linear solvers throw on one process (test failed before this bugfix)

Before you request a review from someone, make sure to revise the following points:

  • does the new code follow the style guide?
  • do the test pipelines pass? (see guide on how to run pipelines for a merge request)
  • does your change affect public interfaces or behavior, or, does it introduce a new feature? If so, document the change in CHANGELOG.md.
  • is the list of the header includes complete? ("include what you use")
  • all files have to end with a \n character. Make sure there is no \ No newline at end of file comment in "Changes" of this MR.

Fixes #1171 (closed)

Edited by Timo Koch

Merge request reports