-
-
Notifications
You must be signed in to change notification settings - Fork 35
Fixes Edge Cases with #167 #169
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
Conversation
Maybe a direct test on |
Okay I've added in an edge case as a test and it seems to work. Any idea why the OSX builds all fail during the subdarray conversion test? Not sure how what I've done could affect that or why it's OSX only. |
Odd #170 also shows mac-specific behaviour. |
So I've had some time to investigate this and it appears to not be OS specific but actually number of processes specific, at least as far as I can tell. Specifically in When I manually index, i.e. test This suggest to me that there is actually a bug in An additional concern is why the previous distribution did not produce this error since it seems independent of that, unless maybe it only errors when the length 1 index is |
Ok thanks for debugging that, if you have a test-case that is independent of the number of processors that would help greatly. I will look into this, but it will take me some time. |
For a number of processors independent way to reproduce the bug you should be able to use the following (note that while reproducing the bug I discovered that this only occurs for an odd number of workers, I can't rationalize why that matters though)
|
So I finally got the tests to pass, there was an issue that only occured for small arrays on a small number of processes but it has been fixed now. I believe this should be good to merge. |
The previous solution (#167 ) was incorrect when the range resulted in a whole number output.
For example a length 50 array being split over 4 was resulting in 13,12,13,12.
The new solution is less elegant, but doesn't rely on using range so has no issues with rounding being inconsistent.
I am unsure how to actually write a test for this as all the ways I can think to do so depend on me indexing OTHERIDS which seems to throw an exception.