Skip to content

Fix caching mechanism for neighbor particle mask#5080

Open
atmyers wants to merge 1 commit intoAMReX-Codes:developmentfrom
atmyers:nbor_mask_cache
Open

Fix caching mechanism for neighbor particle mask#5080
atmyers wants to merge 1 commit intoAMReX-Codes:developmentfrom
atmyers:nbor_mask_cache

Conversation

@atmyers
Copy link
Member

@atmyers atmyers commented Feb 25, 2026

Closes #5057.

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@atmyers atmyers requested a review from WeiqunZhang February 25, 2026 21:35
Gpu::streamSynchronize();
}

Gpu::streamSynchronize();
Copy link
Member

Choose a reason for hiding this comment

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

This is not needed because MFIter does sync already.

Gpu::copyAsync(Gpu::hostToDevice, h_isec_boxes.begin(), h_isec_boxes.end(),
m_isec_boxes[grid].begin());

Gpu::streamSynchronize();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we can remove this streamSynchronize. It's here to protect against the destruction of the two host vectors defined inside the MFIter loop.

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.

GPU neighbor-mask rebuild path never stabilizes cache and over-synchronizes

2 participants