-
Notifications
You must be signed in to change notification settings - Fork 1
Reproducible TrackId values when running on the same simulation. #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This change makes the TrackId of re-runs of HBT-HERONS on the same simulation reproducible at the TrackId level (as long as the FoF catalogue is unchanged).
I find the fact that there are two definitions stored in a single variable name cumbersome.
|
Here is an example debug print of how this works for the first snapshot of the COLIBRE test box: |
|
Seems to be working as intended. I have run two HBT-HERONS re-runs using this new branch on the COLIBRE test box. Running the following code confirms that we do not change On the other hand, re-running twice with the master version does result in mismatches: |
|
Latest commit implements one of the changes of #16, but I use the Before the latest commit, |
|
Examining the first subhalo where there is a difference between runs, it is actually due to loss of precision in |
|
In short, when fixing the seed and finding all subhaloes that differ in their Nbound, we have I though subhalo sinking may play a role because of the order in which overlap is evaluated, and hence the resulting ordering of the |
robjmcgibbon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I agree that the subhalo_unbind.cpp changes would be better in another PR though
This reverts commit 5c66f63.




The value of
TrackIdof the same subhaloes can change across HBT-HERONS re-runs, even when running on the same simulation and FoF group catalogue. This is because the values are assigned based on the index location of the new subhaloes in thestd::vector<Subhalo_t>position local to each MPI rank. This means that the value can change randomly across runs if the number of MPI ranks are changed, and even unchanged because of different random ordering.At best, it is annoying to compare how subhalo properties change across re-runs because you need to match subhalos. At worst, it can mean having to re-run a whole HBT-HERONS analysis if you accidentally overwrite early outputs. The new
TrackIdvalues are no longer reflective of those used in the original outputs, and hence the merger trees become a nightmare.This PR changes the assignment procedure to be based on the global ranking of the
HostHaloIdof new subhaloes. The change will ensure reproducibility because ordering ofstd::vector<Subhalo_t>and MPI decomposition no longer play a role in settingTrackId.Hence, if you re-run on the same simulation and FoF group catalogue, you will obtain the same
TrackIdfor the same subhaloes across re-runs. Of course, if you change the FoF group catalogue the values will change (asHostHaloIdwill generally change), but in those cases you want to re-run HBT-HERONS anyway.