Skip to content

Commit

Permalink
Fix duplicated log messages (#2542)
Browse files Browse the repository at this point in the history
We need to remove the default error handler, otherwise sundials error message will be printed twice.
  • Loading branch information
dweindl authored Oct 12, 2024
1 parent ca01930 commit 919de0e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ void Solver::initializeNonLinearSolverSens(Model const* model) const {
}

void Solver::setErrHandlerFn() const {
SUNContext_ClearErrHandlers(sunctx_);
auto sunerr = SUNContext_PushErrHandler(
sunctx_, wrapErrHandlerFn,
reinterpret_cast<void*>(const_cast<Solver*>(this))
Expand Down

0 comments on commit 919de0e

Please sign in to comment.