From: Alan Gray Date: Fri, 16 Oct 2020 11:15:41 +0000 (+0000) Subject: Fix for force copy dependency of GPU force reduction X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=0814bac423739a592d5cb7d8b8e4aea846c50eaf;p=alexxy%2Fgromacs.git Fix for force copy dependency of GPU force reduction Fixes issue #3729 --- diff --git a/src/gromacs/mdlib/sim_util.cpp b/src/gromacs/mdlib/sim_util.cpp index 47b6baac1b..e788c6b66b 100644 --- a/src/gromacs/mdlib/sim_util.cpp +++ b/src/gromacs/mdlib/sim_util.cpp @@ -1089,8 +1089,10 @@ static void setupGpuForceReductions(gmx::MdrunScheduleWorkload* runScheduleWork, if ((runScheduleWork->domainWork.haveCpuLocalForceWork || havePPDomainDecomposition(cr)) && !runScheduleWork->simulationWork.useGpuHaloExchange) { + auto forcesReadyLocality = havePPDomainDecomposition(cr) ? AtomLocality::Local : AtomLocality::All; + const bool useGpuForceBufferOps = true; fr->gpuForceReduction[gmx::AtomLocality::Local]->addDependency( - stateGpu->getForcesReadyOnDeviceEvent(AtomLocality::Local, true)); + stateGpu->getForcesReadyOnDeviceEvent(forcesReadyLocality, useGpuForceBufferOps)); } if (runScheduleWork->simulationWork.useGpuHaloExchange)