SWIFTSIM / HBTplus

HBTplus halo finder adapted for the FLAMINGO and COLIBRE simulations
0 stars 0 forks source link

Small fixes and unit tests for MyAllToAll() #28

Closed jchelly closed 1 month ago

jchelly commented 2 months ago

There are two things in MyAllToAll which looked like they could be a problem if we're really unlucky:

Overflow is probably unlikely given that the send counts are limited to 1024*1024, but we have a large count alltoallv implementation in the code already so there's no reason not to use that and use HBTInt for the counts and offsets.

I've also added unit tests for the alltoallv operations.

jchelly commented 2 months ago

I've added a chunk size parameter to the alltoallv calls so that the unit tests can test the chunking logic without needing very large test datasets.

jchelly commented 1 month ago

I've resolved conflicts with master but I'm not going to run the formatter on everything here because master needs formatting too and it will introduce lots of irrelevant changes to this pull request. It would probably be best to always run the formatter before commits (maybe everyone else already does that, but I haven't and it's made a bit of a mess!)

VictorForouhar commented 1 month ago

Thanks for making the changes! Happy for it to be merged into master :)