Make the wait on nonbonded GPU results conditional
authorSzilárd Páll <pall.szilard@gmail.com>
Fri, 27 Sep 2019 17:21:01 +0000 (19:21 +0200)
committerPaul Bauer <paul.bauer.q@gmail.com>
Wed, 16 Oct 2019 06:50:09 +0000 (08:50 +0200)
commit1b346f03a1fcd2c73e0b0c0982585fc6f852e6f8
treecf1880b655e9e25f2c1ae02e149043b8202b0b44
parentf310be38d375b49f4312c6ee0bd6cd62729174cf
Make the wait on nonbonded GPU results conditional

When the force reduction is done on the GPU and there are no energy or
shift force results required, there is no need to block and wait on the
CPU until the GPU nonbonded kernels complete.
This change makes the wait conditional on whether there are nonbonded
force, energy or shift force outputs so the blocking wait is now skipped
with GPU buffer ops on force-only steps.

Also removed the now unnecessary boolean argument passed to
gpu_launch_cpyback().

Refs #3128

Change-Id: Ic1285f5a00ac910cd1d6c4358f41f2c7c41dea4c
src/gromacs/mdlib/sim_util.cpp
src/gromacs/nbnxm/cuda/nbnxm_cuda.cu
src/gromacs/nbnxm/gpu_common.h
src/gromacs/nbnxm/nbnxm_gpu.h
src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp