Skip to content

Commit

Permalink
Use Model.setAlwaysCheckFinite(True) in debug builds
Browse files Browse the repository at this point in the history
So that we automatically use the additional checks in our tests.

Closes AMICI-dev#2235
  • Loading branch information
dweindl committed Jan 6, 2024
1 parent 30ed2f0 commit 2e1c039
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/amici/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,11 @@ class Model : public AbstractModel, public ModelDimensions {
* Indicates whether the result of every call to `Model::f*` should be
* checked for finiteness
*/
#ifdef NDEBUG
bool always_check_finite_{false};
#else
bool always_check_finite_{true};
#endif

/** indicates whether sigma residuals are to be added for every datapoint */
bool sigma_res_{false};
Expand Down

0 comments on commit 2e1c039

Please sign in to comment.