Uninitialized energy and virial contributions with PME on GPU on PME-only rank - Redmine #3120
The struct passing data from a PME-only rank is unitialized with PME on
a GPU, which can give non-zero LJ reciprocal energy and virial
contributions, which are added to the potential energy and virial.
Up till now we only observed non-zero contributions with the clang
compiler for the CPU side code and only with release builds.
The “random” energy and virial contributions likely don’t go unnoticed
and with pressure coupling we would expect a run to crash after a few
steps.
(from redmine: issue id 3120, created on 2019-10-04 by berkhess, closed on 2019-11-20)
- Relations:
- duplicates #3396 (closed)
- Changesets:
- Revision 41bcf87d by Berk Hess on 2019-10-04T10:55:10Z:
Fix random energy and virial with PME on GPU on a PME-only rank
Missing zero initialization of never computed LJ PME energy and virial
terms with PME on the GPU could lead to random energy, virial and
pressure numbers.
The effect of this bug was that the potential and total energy could
be off (not the Coulomb mesh energy). This didn't affect sampling.
The pressure could be off, which would affect sampling when pressure
coupling is used, but likely the simulation would explode after
a few steps.
Fixes #3120
Change-Id: I309dde958f1b73e7f71f87f4f5ad016d16f8d16b
- Revision 54898ee5 by Berk Hess on 2019-10-09T08:26:39Z:
Fix random energy and virial with PME on GPU on a PME-only rank
Missing zero initialization of never computed LJ PME energy and virial
terms with PME on the GPU could lead to random energy, virial and
pressure numbers.
The effect of this bug was that the potential and total energy could
be off (not the Coulomb mesh energy). This didn't affect sampling.
The pressure could be off, which would affect sampling when pressure
coupling is used, but likely the simulation would explode after
a few steps.
Fixes #3120
Change-Id: I309dde958f1b73e7f71f87f4f5ad016d16f8d16b