Skip to content
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

Merged
merged 1 commit into from
Jan 7, 2022
Merged

Conversation

hzhou
Copy link
Contributor

@hzhou hzhou commented Jan 6, 2022

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

  • Provide Description
    Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
  • Commits Follow Good Practice
    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.
  • Passes All Tests
    Whitespace checker. Warnings test. Additional tests via comments.
  • Contribution Agreement
    For non-Argonne authors, check contribution agreement.
    If necessary, request an explicit comment from your companies PR approval manager.

@hzhou
Copy link
Contributor Author

hzhou commented Jan 6, 2022

test:mpich/ch3/tcp ✔️

@hzhou hzhou requested a review from raffenet January 6, 2022 23:30
Copy link
Contributor

@raffenet raffenet left a 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.

@raffenet
Copy link
Contributor

raffenet commented Jan 7, 2022

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.

@hzhou
Copy link
Contributor Author

hzhou commented Jan 7, 2022

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.
Separately, since the prototype now differs from the standard, it is probably worth a discussion in the forum.

@raffenet
Copy link
Contributor

raffenet commented Jan 7, 2022

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. Separately, since the prototype now differs from the standard, it is probably worth a discussion in the forum.

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.
@hzhou hzhou merged commit 5ee3ea3 into pmodels:main Jan 7, 2022
@hzhou hzhou deleted the 2201_statuses branch January 7, 2022 17:58
tim-griesbach added a commit to tim-griesbach/p4est that referenced this pull request Sep 29, 2022
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.
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.

misc: warnings on MPI_STATUS_IGNORE etc with gcc-11.2.1
2 participants