Custom updater fails after ~160 steps on GPU #2263
-
|
Hi everyone, I’ve implemented a custom updater to remove drift in absolute coordinates from a subset of particles. The CPU version behaves as expected, but the GPU version only works for ~160 steps before particle positions become corrupted. No runtime error is thrown; my logged potential energy values simply become nonsensical. I’m looking for suggestions on where to focus my debugging. For context, I’ve included my reference position setter below. I exposed ParticleGroup.m_member_tags as a constant reference and pass it to the kernel as d_group_tags. On subsequent triggers:
I tried checking if any of the rebuilds in ParticleGroup corresponded with the breakdown, but I didn't find any clear correlation. Any ideas on what might be going wrong or what I should check next would be greatly appreciated. I am happy to provide more details if needed. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Have you run with |
Beta Was this translation helpful? Give feedback.
Thank you for your debugging suggestions -- they helped me track down the issue.
I tried the high-level checks first, but none revealed anything. After closer inspection, I found that the box data was being corrupted inside the kernel after ~160 steps. The fix was to pass the box by value to the kernels:
const BoxDim box)