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

Test and fix lifetimes of transform_mpi values #1321

Merged
merged 14 commits into from
Nov 14, 2024

Conversation

msimberg
Copy link
Contributor

@msimberg msimberg commented Nov 6, 2024

The transform_mpi sender adaptor was not ensuring that the references passed to user-provided MPI callables are kept alive until the MPI request completes. This fixes that by adding an explicit let_value around the helper adaptors of transform_mpi. This PR also adds a number of new tests that trigger the issue if the let_value is not in place.

@msimberg msimberg self-assigned this Nov 6, 2024
Copy link

codacy-production bot commented Nov 6, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.06% (target: -1.00%) 100.00% (target: 90.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (22d5654) 18263 13782 75.46%
Head commit (18b0162) 18272 (+9) 13800 (+18) 75.53% (+0.06%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1321) 9 9 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@msimberg msimberg force-pushed the transform-mpi-lifetimes branch 2 times, most recently from 8f0b003 to 71901d1 Compare November 13, 2024 19:43
@msimberg msimberg marked this pull request as ready for review November 13, 2024 19:45
@biddisco
Copy link
Contributor

Nice. Thanks. much cleaner

Copy link
Contributor

@aurianer aurianer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

@msimberg
Copy link
Contributor Author

Increasing the number of test repetitions for sanitizers/valgrind and more aggressively resetting operation states passed tests just fine on 0e6cac7. I'll go ahead and try to merge this.

@msimberg msimberg added this pull request to the merge queue Nov 14, 2024
@msimberg msimberg removed this pull request from the merge queue due to a manual request Nov 14, 2024
@msimberg msimberg merged commit 6c9fdf1 into pika-org:main Nov 14, 2024
37 checks passed
@msimberg msimberg deleted the transform-mpi-lifetimes branch November 14, 2024 15:39
msimberg added a commit that referenced this pull request Nov 18, 2024
      Test and fix lifetimes of `transform_mpi` values
msimberg added a commit to msimberg/pika that referenced this pull request Nov 18, 2024
…lifetimes"

This reverts commit 6c9fdf1, reversing
changes made to 22d5654.
@msimberg msimberg added this to the 0.30.1 milestone Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants