-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
class::bugBugs found in the softwareBugs found in the software
Description
Bug description
Summary
The TestMobilityRules.hospital test in the ABM module fails in the test-cpp-gcc-openmp CI job, even though the ABM code has not been modified in my PR. The error appears to be non-deterministic. Rerunning the CI job resolves the issue.
Error Output
[ RUN ] TestMobilityRules.hospital
[warning] Using RNG with seeds: 2224242119, 3829650121, 3420097603, 3118483604, 4246163161, 2108093968.
/home/runner/work/memilio/memilio/cpp/tests/test_abm_mobility_rules.cpp:496: Failure
Expected equality of these values:
mio::abm::go_to_hospital(rng_car, p_car, t, dt, mio::abm::Parameters(num_age_groups))
Which is: 4-byte object <05-00 00-00>
mio::abm::LocationType::Home
Which is: 4-byte object <00-00 00-00>
[ FAILED ] TestMobilityRules.hospital (0 ms)
Test Code Snippet
TEST_F(TestMobilityRules, hospital)
{
mio::abm::Location home(mio::abm::LocationType::Home, 0, num_age_groups);
auto t = mio::abm::TimePoint(12346);
auto dt = mio::abm::hours(1);
auto p_inf =
make_test_person(this->get_rng(), home, age_group_15_to_34, mio::abm::InfectionState::InfectedSevere, t);
auto rng_inf = mio::abm::PersonalRandomNumberGenerator(p_inf);
EXPECT_EQ(mio::abm::go_to_hospital(rng_inf, p_inf, t, dt, mio::abm::Parameters(num_age_groups)),
mio::abm::LocationType::Hospital);
auto p_car =
make_test_person(this->get_rng(), home, age_group_15_to_34, mio::abm::InfectionState::InfectedSymptoms);
auto rng_car = mio::abm::PersonalRandomNumberGenerator(p_car);
EXPECT_EQ(mio::abm::go_to_hospital(rng_car, p_car, t, dt, mio::abm::Parameters(num_age_groups)),
mio::abm::LocationType::Home);
}
Version
Linux
To reproduce
Bug appeared in the CI of #1421.
Relevant log output
Add any relevant information, e.g. used compiler, screenshots.
Checklist
- Attached labels, especially loc:: or model:: labels.
- Linked to project
Metadata
Metadata
Assignees
Labels
class::bugBugs found in the softwareBugs found in the software