From: Andrey Alekseenko Date: Wed, 24 Mar 2021 10:52:51 +0000 (+0300) Subject: Add missing GMX_ASSERT(haveCopiedXFromGpu) X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=da5bc372d12a6952651f018d4910aa332c584766;p=alexxy%2Fgromacs.git 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. --- 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); }