-
Notifications
You must be signed in to change notification settings - Fork 33
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
BugFix: memory error incollective effects circular buffers #771
Conversation
Just for future reference, this bug is a bit strange. While debugging some mpi scripts sent in by some new users, we found a specific configuration of parameters that returned segmentation faults. For example (I omit many lines of code here), if the following code:
is launched with We get a segmentation fault. Increasing the nparts_per_bunch solves the problem. Also changing Nslice from 50 to 51 solves the problem. I have verified that the bug fixed proposed here solves the problem...but I'm not sure I fully understand the details. |
In line 176 of atimplib.c there is the line
which should be replaced by
|
You may take a look at this: https://en.wikipedia.org/wiki/Undefined_behavior |
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.
example files are running as normal and the bug is fixed
I add @simoneliuzzo as reviewer because neither me or @lcarver can approve this PR |
This PR fixes a bug in the collective effects implementation. Circular buffers are used to store the slice information and some parameters history. These buffers where shifted even when their size was equal to 1.
In the new implementation, when the size of these buffers is equal to 1 they are simply overwritten.