From da5bc372d12a6952651f018d4910aa332c584766 Mon Sep 17 00:00:00 2001 From: Andrey Alekseenko Date: Wed, 24 Mar 2021 13:52:51 +0300 Subject: [PATCH] Add missing GMX_ASSERT(haveCopiedXFromGpu) We make this assertion every time we call stateGpu->waitCoordinatesReadyOnHost(AtomLocality::Local) in the do_force function. This does not fix any bugs, just makes the code a bit more consistent in how it checks self-consistency. Refs #3988. --- src/gromacs/mdlib/sim_util.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gromacs/mdlib/sim_util.cpp b/src/gromacs/mdlib/sim_util.cpp index 8850f06ac6..6f42594ed0 100644 --- a/src/gromacs/mdlib/sim_util.cpp +++ b/src/gromacs/mdlib/sim_util.cpp @@ -1298,6 +1298,8 @@ void do_force(FILE* fplog, /* Send particle coordinates to the pme nodes */ if (!stepWork.doNeighborSearch && simulationWork.useGpuUpdate) { + GMX_ASSERT(haveCopiedXFromGpu, + "a wait should only be triggered if copy has been scheduled"); stateGpu->waitCoordinatesReadyOnHost(AtomLocality::Local); } -- 2.22.0