It appears the R one is right and the C++ one is subtly wrong somewhere, despite the NAT calculations being consistent between the two. What I should do is to run a simulation for some number of timesteps using the R version (with vaccinations and everything). Then set up functions for the R and C++ infection processes and run those for a subsequent timestep to figure out exactly where the divergence is occurring. Do it on a small population and use the same RNG seed.
Might be due to inplace bitset updates of the susceptible bset in the C++ vs. not inplace (yet) for the R version. Check this and adjust if discrepancy.
See https://github.com/mrc-ide/safir/pull/82#issuecomment-1694754627
It appears the R one is right and the C++ one is subtly wrong somewhere, despite the NAT calculations being consistent between the two. What I should do is to run a simulation for some number of timesteps using the R version (with vaccinations and everything). Then set up functions for the R and C++ infection processes and run those for a subsequent timestep to figure out exactly where the divergence is occurring. Do it on a small population and use the same RNG seed.