Disable GPU update/constraints when neither PME nor buffer ops are offloaded.
authorArtem Zhmurov <zhmurov@gmail.com>
Mon, 16 Sep 2019 14:23:48 +0000 (16:23 +0200)
committerArtem Zhmurov <zhmurov@gmail.com>
Sun, 22 Sep 2019 09:15:26 +0000 (11:15 +0200)
commit9b6824791cb7422f16b1b9f0129336febda0e6c0
tree991c6d8b650379fadb4f97d9b101ca8d33be757e
parent6ea18a3d1c26c188858957f498f711add69c5794
Disable GPU update/constraints when neither PME nor buffer ops are offloaded.

Using the GPU-version of update makes sense if forces are already on the GPU,
i.e. if at least:
1. PME is on the GPU (there should be a copy of coordinates on a GPU in rvec
   format for PME spread).
2. Non-bonded interactions and buffer ops are on the GPU.

This is temporary solution, needed because the buffer ops offload switch is
operated by the environment variable. More favorable behavior would be to
switch on the GPU buffer ops in the second case rather then disabling the
GPU update.

Refs. #2816.

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