-
Notifications
You must be signed in to change notification settings - Fork 280
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
mpi: use pointers for array_of_statuses #5749
Conversation
test:mpich/ch3/tcp ✔️ |
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.
Glad we can resolve this without much intrusion.
This probably needs to be picked back to 4.0.x then since users are bound to see it. |
Sure. |
Yeah, good point. In that case let me leave 4.0.x as-is until we have some more discussion. Plus we still may see the compiler behavior revert at some later release. |
Apparently some compilers -- gcc-11.2 -- will differentiate between MPI_Status array_of_statuses[] and MPI_Status *array_of_statuses and warns if we pass MPI_STATUSES_IGNORE to the former. Note: the standard uses the latter form.
GCC 11.2 differentiates between TYPE* abc and TYPE abc[] (cf. pmodels/mpich#5749). Therefore, we use the explicit pointer declaration to silence string overread warnings for GCC 11.2.
Pull Request Description
Apparently some compilers -- gcc-11.2 -- will differentiate between
MPI_Status array_of_statuses[]
and
MPI_Status *array_of_statuses
and warns if we pass MPI_STATUSES_IGNORE to the former.
Note: the standard uses the former form.
Fixes #5687
[skip warnings]
Author Checklist
Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
Commits are self-contained and do not do two things at once.
Commit message is of the form:
module: short description
Commit message explains what's in the commit.
Whitespace checker. Warnings test. Additional tests via comments.
For non-Argonne authors, check contribution agreement.
If necessary, request an explicit comment from your companies PR approval manager.