Skip to content

ompi/request: fix loop conditional #1766

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

Merged
merged 1 commit into from
Jun 7, 2016
Merged

Conversation

hjelmn
Copy link
Member

@hjelmn hjelmn commented Jun 7, 2016

This commit fixes a bug in waitany that causes the code to go past the
beginning of the request array. The loop conditional i >= 0 is invalid
since i is unsigned. Changed to loop to check (i+1) > 0.

Signed-off-by: Nathan Hjelm [email protected]

This commit fixes a bug in waitany that causes the code to go past the
beginning of the request array. The loop conditional i >= 0 is invalid
since i is unsigned. Changed to loop to check (i+1) > 0.

Signed-off-by: Nathan Hjelm <[email protected]>
@hjelmn
Copy link
Member Author

hjelmn commented Jun 7, 2016

@jsquyres @sjeaugey @bosilca Fixes failures identified by MTT.

@sjeaugey
Copy link
Member

sjeaugey commented Jun 7, 2016

It fixes the issue on my side. Tried MPI_Waitany_c and MPI_Waitany_f.

👍

@hjelmn hjelmn merged commit 97c1643 into open-mpi:master Jun 7, 2016
@bosilca
Copy link
Member

bosilca commented Jun 7, 2016

i shouldn't be unsigned. I noticed you kept changing it to size_t, but I fail to see any valid reason.

@hjelmn
Copy link
Member Author

hjelmn commented Jun 7, 2016

Because count is unsigned. Changed it because of warnings from the compiler. Simple enough to just check i+1.

@sjeaugey sjeaugey mentioned this pull request Jun 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants