AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
506 stars 337 forks source link

Fix offset in recv buffer of single precision particle communication #3896

Closed WeiqunZhang closed 3 months ago

WeiqunZhang commented 3 months ago

A similar bug was fixed in #3758 for the particle send buffer. But we did not notice the issue in the receive buffer at the time. The offset for the ith buffer might be aligned for the ith buffer's communication data type, not the previous buffer.

The reason the bug only appears for large single precision runs is because for double precision the particle size is aligned with the size of unsigned long long used in communication, whereas for single precision this is not the case.