LIHPC-Computational-Geometry / coupe

the concurrent partitioner
https://LIHPC-Computational-Geometry.github.io/coupe/
Apache License 2.0
13 stars 3 forks source link

weighted_quantiles: fix splits "tearing" #253

Closed hhirtz closed 2 years ago

hhirtz commented 2 years ago

Previously, weighted_quantiles would modify "splits" in place. While no actual bug or imbalance violations have been observed, this caused "splits" and "part_weights" to go out of sync. Later iterations of the inner for loop would use the newer splits with the former values of part_weights.

The split update is not done in parallel, because the overhead of rayon becomes too costly with high core counts.

It seems that this version also scales a bit better than master's, maybe because the for loop has been replaced with a closure and leads to better behavior wrt. the instruction cache? We'll never know.

hilbert wt

codecov[bot] commented 2 years ago

Codecov Report

Base: 51.64% // Head: 51.75% // Increases project coverage by +0.10% :tada:

Coverage data is based on head (0df0225) compared to base (59882a9). Patch coverage: 30.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #253 +/- ## ========================================== + Coverage 51.64% 51.75% +0.10% ========================================== Files 36 36 Lines 6930 6941 +11 ========================================== + Hits 3579 3592 +13 + Misses 3351 3349 -2 ``` | [Impacted Files](https://codecov.io/gh/LIHPC-Computational-Geometry/coupe/pull/253?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LIHPC-Computational-Geometry) | Coverage Δ | | |---|---|---| | [src/algorithms/hilbert\_curve.rs](https://codecov.io/gh/LIHPC-Computational-Geometry/coupe/pull/253/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LIHPC-Computational-Geometry#diff-c3JjL2FsZ29yaXRobXMvaGlsYmVydF9jdXJ2ZS5ycw==) | `57.80% <30.00%> (+0.82%)` | :arrow_up: | | [src/algorithms/vn/first.rs](https://codecov.io/gh/LIHPC-Computational-Geometry/coupe/pull/253/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LIHPC-Computational-Geometry#diff-c3JjL2FsZ29yaXRobXMvdm4vZmlyc3QucnM=) | `93.85% <0.00%> (+2.63%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LIHPC-Computational-Geometry). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LIHPC-Computational-Geometry)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.