Remove excessive H2D and D2H copies of velocities when update is offloaded
authorArtem Zhmurov <zhmurov@gmail.com>
Wed, 16 Oct 2019 11:33:18 +0000 (13:33 +0200)
committerBerk Hess <hess@kth.se>
Fri, 18 Oct 2019 09:14:08 +0000 (11:14 +0200)
commitcaf637d92d107917a0d985bfaf70f358d0d6dd73
tree803ecc82b129c153b58938400ec1539441c11a31
parentd907b19e331eeaed924cc224c7b4a67c82fa12f5
Remove excessive H2D and D2H copies of velocities when update is offloaded

If update is offloaded:

The H2D copy of velocities is done:
1. At the search step after the device buffers were reinitialized.

The D2H copy is done:
1. In the beginning of the step on search steps (to back up before the
   device buffers are reinitialized).
2. In the beginning of the velocity output step.
3. After update when globals are computed.
4. After update when temperature is needed for the next step.

The Local locality is used for the copies when update is offloaded in
anticipation of the multi GPU case.

The REMD simulations are now not supported when update is offloaded.

Change-Id: Ifbb9636cafba8980a4a781d942420c5c2c1bcdfd
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/taskassignment/decidegpuusage.cpp
src/gromacs/taskassignment/decidegpuusage.h