Add separate constructor to StatePropagatorDataGpu for PME-only rank / PME tests
[alexxy/gromacs.git] / src / gromacs / ewald / pme_only.cpp
index 6cefcb8f32f9af6bf9fcf2d5f23cd8aaa06ad6f7..10ceb2ce3b8be2e2890c67d1af8681885374285d 100644 (file)
@@ -559,10 +559,9 @@ int gmx_pmeonly(struct gmx_pme_t *pme,
     std::unique_ptr<gmx::StatePropagatorDataGpu> stateGpu;
     if (useGpuForPme)
     {
-        // TODO: The local and non-local nonbonded streams are passed as nullptrs, since they will be not used for the GPU buffer
-        //       management in PME only ranks. Make the constructor safer.
-        stateGpu = std::make_unique<gmx::StatePropagatorDataGpu>(commandStream, nullptr, nullptr,
-                                                                 deviceContext, GpuApiCallBehavior::Async, paddingSize);
+        // TODO: Special PME-only constructor is used here. There is no mechanism to prevent from using the other constructor here.
+        //       This should be made safer.
+        stateGpu = std::make_unique<gmx::StatePropagatorDataGpu>(commandStream, deviceContext, GpuApiCallBehavior::Async, paddingSize);
     }