Avoid enqueueing the same event multiple times in nbnxn_atomdata_x_to_nbat_x_gpu
authorAndrey Alekseenko <al42and@gmail.com>
Sat, 27 Mar 2021 19:24:34 +0000 (19:24 +0000)
committerArtem Zhmurov <zhmurov@gmail.com>
Sat, 27 Mar 2021 19:24:34 +0000 (19:24 +0000)
commitbb1b27365020938cee7836ba48bfb693eadaf685
tree7cdaeb183c58482befef6f3121532e1b7a7931c0
parentd8f269b41e49e0a132bff754631f54ad75d3af75
Avoid enqueueing the same event multiple times in nbnxn_atomdata_x_to_nbat_x_gpu

With several non-local grids, we were calling
nbnxnInsertNonlocalGpuDependency(nb, NonLocal) in nbnxn_gpu_x_to_nbat_x
after enqueueing the transformation kernel for each one.

Now, we only call it once after submitting all kernels for
given locality (marking the event for Local, enqueueing the wait for it
for NonLocal).

Refs #3988.
src/gromacs/nbnxm/atomdata.cpp
src/gromacs/nbnxm/cuda/nbnxm_cuda.cu
src/gromacs/nbnxm/nbnxm_gpu.h