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

Fix GPU memory transfer + EwaldInit race condition #159

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

spencerw
Copy link
Member

@spencerw spencerw commented Jan 5, 2024

This fixes a race condition where serializeLocal can sometimes be invoked before EwaldInit finishes. An EwaldMsg object is now passed to EwaldGPU, which tells whether EwaldInit, or the callback from the GPU memory transfer invoked it.

Note that the EwaldMsg only contains a single field here. EwaldMsg is used more extensively after the WorkRequest code has been removed from ChaNGa. These changes are contained in a separate pull request.

EwaldGPU is now passed a message which tells whether it was invoked from serializeLocalTree or EwaldInit
Copy link
Member

@trquinn trquinn left a comment

Choose a reason for hiding this comment

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

See code comments. I'm still testing this out.

DataManager.cpp Outdated Show resolved Hide resolved
Ewald.cpp Outdated Show resolved Hide resolved
ParallelGravity.h Outdated Show resolved Hide resolved
Remove CkMcastBaseMsg inheritance for EwaldMsg
@spencerw
Copy link
Member Author

I can confirm that the 'testcosmo' case passes after these changes have been made to the code.

@trquinn trquinn merged commit 496440a into N-BodyShop:master Jan 18, 2024
2 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.

2 participants