Remove single-dimension limitation from GPU halo exchange
[alexxy/gromacs.git] / src / gromacs / mdlib / sim_util.cpp
index 11da2a775dead945da991e0b0010687d05b816cb..f8befd3ab784c3ee78ed8a81a9be5044c99338c9 100644 (file)
@@ -1150,7 +1150,7 @@ void do_force(FILE*                               fplog,
     // operations were checked before construction, so here we can
     // just use it and assert upon any conditions.
     const bool ddUsesGpuDirectCommunication =
-            ((cr->dd != nullptr) && (!cr->dd->gpuHaloExchange.empty()));
+            ((cr->dd != nullptr) && (!cr->dd->gpuHaloExchange[0].empty()));
     GMX_ASSERT(!ddUsesGpuDirectCommunication || stepWork.useGpuXBufferOps,
                "Must use coordinate buffer ops with GPU halo exchange");
     const bool useGpuForcesHaloExchange = ddUsesGpuDirectCommunication && stepWork.useGpuFBufferOps;
@@ -1886,7 +1886,7 @@ void do_force(FILE*                               fplog,
             }
             if (useGpuForcesHaloExchange)
             {
-                dependencyList.push_back(cr->dd->gpuHaloExchange[0]->getForcesReadyOnDeviceEvent());
+                dependencyList.push_back(cr->dd->gpuHaloExchange[0][0]->getForcesReadyOnDeviceEvent());
             }
             nbv->atomdata_add_nbat_f_to_f_gpu(AtomLocality::Local, stateGpu->getForces(), pmeForcePtr,
                                               dependencyList, stepWork.useGpuPmeFReduction,