Fix _sendrecv_get_destinations todo: loop only over neighbours - #350
Conversation
…olumn-major-fix-of-apply-markers-bc
…stinations-loop-only-over-neighbours
spossann
left a comment
There was a problem hiding this comment.
Thanks for this. For testing, it would make a lot of sense to run the unit tests on 1, 2, 3 and 4 ranks, to test different topologies. However:
- Some tests would probably have to be adapted, maybe even the default params file.
- Would it be too costly to run the unit tests four times?
Good questions, I'm worried that there will not be a big difference for 1-4 ranks since the number or ranks vs number of neighbours are the same. But I can try to come up with a benchmark. |
I was thinking more about topology: with 3 ranks you get one interior rank (without domain boundary), with 4 ranks you get a 2x2 square. Maybe such tests could be useful, however not specific to the neighbours. Anyhow this would be for a different PR. |
Ah ok! Yes this could easily be done with |
Indeed, I would like to see all unit tests in |
Like this? 6559d2d |
I think we need a new mark on the tests in |
…s' of github.com:struphy-hub/struphy into fix-_sendrecv_get_destinations-loop-only-over-neighbours
4241e02 to
88734aa
Compare
_compute_neighbor_ranks(), computed once at__init___sendrecv_get_destinationsnow checks neighbor ranks first, and only falls back to checking the rest if some markers remain unmatchedself.markers[send_inds]andself._sorting_etas[send_inds]are now gathered once (seecandidates,etas_to_send) instead of being re-gathered on every rank-loop iteration.Improvements (
Np=4,000,000):Merge after #348