SciCompMod / memilio

Modular spatio-temporal models for epidemic and pandemic simulations
https://scicompmod.github.io/memilio/
Apache License 2.0
51 stars 15 forks source link

Error in ModelTestOdeSeir.compareWithPreviousRun with M1 machine #1011

Open khoanguyen-dev opened 2 months ago

khoanguyen-dev commented 2 months ago

Bug description

Compile and run the current test suit on an M1 Machine produce an error on ModelTestOdeSeir.compareWithPreviousRun.

Version

M1

To reproduce

  1. Compile the code with cmake --build .
  2. run memilio-test

Relevant log output

test_odeseir.cpp:106: Failure
The difference between t and result.get_times()[irow] is 1.0594192190183094e-11, which exceeds 1e-11, where t evaluates to 32.532039624056416, result.get_times()[irow] evaluates to 32.532039624045822, and 1e-11 evaluates to 9.9999999999999994e-12. at row 29

Add any relevant information, e.g. used compiler, screenshots.

I'm able to fix it with the reduced accuracy: At test_odeseir.cpp:106: ASSERT_NEAR(t, result.get_times()[irow], 1e-10) << "at row " << irow;

Checklist