Move the ownership of the xUpdatedOnDevice event to update constraints
[alexxy/gromacs.git] / src / gromacs / mdrun / md.cpp
index 30f17fdf14725c9d2a07588f3551a63a4535575e..3b7466c229cc2c2d8ff49f68d5d2ce3e1bb9b9c5 100644 (file)
@@ -482,9 +482,10 @@ void gmx::LegacySimulator::do_md()
                 ekind->ngtc,
                 fr->deviceStreamManager->context(),
                 fr->deviceStreamManager->stream(gmx::DeviceStreamType::UpdateAndConstraints),
-                stateGpu->xUpdatedOnDevice(),
                 wcycle);
 
+        stateGpu->setXUpdatedOnDeviceEvent(integrator->xUpdatedOnDeviceEvent());
+
         integrator->setPbc(PbcType::Xyz, state->box);
     }