Fix missing coordinate D2H copy with GPU update and CPU forces
authorArtem Zhmurov <zhmurov@gmail.com>
Tue, 22 Oct 2019 06:17:01 +0000 (08:17 +0200)
committerSzilárd Páll <pall.szilard@gmail.com>
Mon, 28 Oct 2019 21:22:40 +0000 (22:22 +0100)
commitfb8ae6adfab277187d81517a3c8befb2b745a4e0
tree7d0e70333c0906b781252ac0ea159a15f7608476
parent6ecc09b00ff348aeafb9a230ad0b694907de4902
Fix missing coordinate D2H copy with GPU update and CPU forces

When update is offloaded to the GPU, but not all forces are offloaded,
the coordinates needed to be copied D2H on the beginning of every step.
This was not done for some cases, e.g. for CPU PME, which lead to
wrong coordinates used for force evaluaion.

The D2H copy call is now split and corresponding calls are moved closer
to the consumers for clarity. The conditional on D2H copy for center of
mass motion removal is made more strict.

Bug was introduced in a73c3ec2dd9dd64f0c728b7b1d90ac5bcfb246cc

Change-Id: Iebb184dc2e0b5fb68b4a627314d2373391c6ebf9
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdrun/md.cpp