Repository navigation
Conversation
…ultiple ranks would result in incomplete sums being calculated with MPI
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3125 +/- ##
==========================================
- Coverage 84.12% 84.10% -0.03%
==========================================
Files 260 260
Lines 59671 59692 +21
Branches 5036 5036
==========================================
+ Hits 50200 50201 +1
- Misses 8634 8653 +19
- Partials 837 838 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| self._comm.Alltoallv([data, rcount, rdisp, self._mpitype], | ||
| [gathered, scount, sdisp, self._mpitype]) | ||
|
|
||
| # A point is sent to every rank its support touches, but a rank only |
There was a problem hiding this comment.
I get what it does but i feel it's not the right way to do it. Ideally this wouldn't be needed if the scatter was aware if it's for and interp or inject to avoid this case alltogether. But it's quite a bit more work so i think this is fine for now but would be good to open an issue about it pointing at this as potential improvement.
There was a problem hiding this comment.
further, not sure if relevant, it seems like some of this work could be cached once and for all
There was a problem hiding this comment.
and bonus, with such a _dist_data_<find_a_good_suffix> cached property, you'd be able to have a proper docstring with an illustrative example
Still needs some refinement. The bug occurs when an interpolation stencil grazes a rank boundary. On the grazed rank, not all of the points are within the data present on the rank (owned + halo), so a partial sum of the interpolation is calculated on these ranks. When gathering the interpolated result, the last rank was selected (which may not have had access to all the points in the footprint) rather than the rank that owns the sparse point (which always has access to all the required data). Note this was only an issue with sinc interp - linear doesn't have a big enough footprint to trigger it.