Skip to content

Commit

Permalink
added re-initialization of HostsQuarantine back into InitModel() whic…
Browse files Browse the repository at this point in the history
…h fixes regression tests
  • Loading branch information
ozmorph committed Jun 25, 2020
1 parent 7124e8c commit e8f7864
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/CovidSim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2473,7 +2473,7 @@ void InitModel(int run) // passing run number so we can save run number in the i
StateT[Thread].cumInf_age_adunit [AgeGroup][Adunit] = 0;
}


std::fill(HostsQuarantine.begin(), HostsQuarantine.end(), PersonQuarantine());
#pragma omp parallel for schedule(static,1) default(none) \
shared(P, Hosts)
for (int tn = 0; tn < P.NumThreads; tn++)
Expand Down
2 changes: 1 addition & 1 deletion src/SetupModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ void SetupPopulation(std::string const& density_file, std::string const& out_den
i2 = 0;

Hosts = (Person*)Memory::xcalloc(P.PopSize, sizeof(Person));
HostsQuarantine = std::vector<PersonQuarantine>(P.PopSize);
HostsQuarantine = std::vector<PersonQuarantine>(P.PopSize, PersonQuarantine());
fprintf(stderr, "sizeof(Person)=%i\n", (int) sizeof(Person));
for (int i = 0; i < P.NCP; i++)
{
Expand Down

0 comments on commit e8f7864

Please sign in to comment.