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
Correct errors in slicing of node collections #3132
base: master
Are you sure you want to change the base?
Conversation
…me; first version passing all tests
…ad of filtering according to slicing in a second step.
This reverts commit 33fa658.
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.
Thank you for this contribution 👍. Looks good to me.
07a9890
to
26c96b7
Compare
26c96b7
to
82d25d2
Compare
@gtrensch @jstapmanns @diesmann After much hard work, I believe I have solved all problems now and that the testsuite is broad enough to cover all eventualities. Kindly review the new version of the PR. I suggest you start with the documentation near the beginning of |
8b3578a
to
2619c3f
Compare
7123538
to
abeb018
Compare
…ithub Linux runners due to performance issues; the tests are run under macOS
abeb018
to
e0b5ed4
Compare
…thub now is macOS 14 and only 3.10 and later are available
@gtrensch @jstapmanns Ping! |
The author of the original model with which the problem was originally discovered has reported that the full model now works perfectly! |
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.
Thank you, @heplesser, for implementing these slicing algorithms. In general, I'm pretty confident they do what they are supposed to do, but I still have a question about the example given in the description (which I find very helpful to understand the implementation).
* All thr 2 * | * * | ||
* All thr 3 * | * * | ||
* ----------------------------------------------------------------- | ||
* [::3] 1stInPt # | # |
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.
I have two questions regarding this example.
- To my understanding,
[::3] 1stInPt
should point to the object withGID = 9
because
n_pe = 1 + ( cumul_abs_size_[ part_idx_ - 1 ] - 1 - first_elem_ ) / stride = 1 + (5-1-0)/3 = 2
, so thatnext_abs_idx = first_elem_ + n_pe * stride_ = 0 + 2*3 = 6
, and finally
next_loc_idx = next_abs_idx - cumul_abs_size_[ part_idx_ - 1 ] = 6 - 5 = 1
. - I think I do not completely understand the behavior of the local iterators. Shouldn't
[::3] thr 2
yield every third element that is local to thread 2? In this case, objects withGID=[2, 10, 14]
are on thread 2, which would mean[::3] thr 2 = [2]
. Similarly for thread 3, whereGID=[3, 14, 15]
.
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.
Thank you for this contribution 👍. Approved!
This PR fixes #3108 by providing correct
NodeCollection::{rank,thread}_local_begin(()
implementations for composite node collections.To do:
slice_positions_if_sliced_nc()
code to more suitable locationI removed the ConnBuilder refactoring (see #3106) from this PR to reduce complexity and ensure we can integrate this bug-fixing PR asap. The refactoring can then following in a later PR.