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

Bugfix for sparse communication #986

Merged
merged 2 commits into from
Dec 14, 2023
Merged

Conversation

lroberts36
Copy link
Collaborator

@lroberts36 lroberts36 commented Dec 14, 2023

PR Summary

If a variable was deallocated at the end of one step and reallocated during the next call to ReceiveBoundBufs, it would appear to SetBounds that the BndInfo cache was not stale (since the field was allocated on subsequent calls to SetBounds) even though the variable itself contained newly allocated memory. This is fixed by checking the value of Variable::GetAllocationStatus() in CheckSendBufferCacheForRebuild andCheckReceiveBufferCacheForRebuild against the value that is now store in BndInfo. GetAllocationStatus() returns zero if the variable is deallocated and the number of times the variable has been allocated over the simulation otherwise.

This should not have any impact on codes that do not use sparse variables.

PR Checklist

  • Code passes cpplint
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • CI has been triggered on Darwin for performance regression tests.
  • (@lanl.gov employees) Update copyright on changed files

Copy link
Collaborator

@jdolence jdolence 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 for the fix!

Copy link
Collaborator

@pdmullen pdmullen left a comment

Choose a reason for hiding this comment

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

LGTM

@jdolence jdolence merged commit 8cc9cba into develop Dec 14, 2023
49 checks passed
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