Ensure coordinates are copied for dipole moment calculation
authorAndrey Alekseenko <al42and@gmail.com>
Thu, 1 Apr 2021 13:40:30 +0000 (15:40 +0200)
committerArtem Zhmurov <zhmurov@gmail.com>
Fri, 2 Apr 2021 13:53:50 +0000 (13:53 +0000)
commitce9de9e9b7da31b9da238d141ffd2256148555c0
tree3fca056c5f317506360bb2af3df12e97ffa5ea90
parent8ea568f03a49f6f04fb54d8b4e07241c17e466aa
Ensure coordinates are copied for dipole moment calculation

With GPU update, we should wait for the coordinates to be copied to host
before using them for calculating the dipole moment.

This did not seem to cause any issues with CUDA but was causing a unit
test failure with SYCL (with !1329):

    SYCL_BE=PI_OPENCL GMX_USE_GPU_BUFFER_OPS=1 GMX_FORCE_UPDATE_DEFAULT_GPU=1 ./bin/mdrun-test --gtest_filter=EwaldSurfaceTerm/EwaldSurfaceTermTest.WithinTolerances/0

Refs #3930, #3932
src/gromacs/mdlib/sim_util.cpp