Disable GPU update when coordinates swapping is enabled
authorArtem Zhmurov <zhmurov@gmail.com>
Mon, 28 Oct 2019 15:29:13 +0000 (16:29 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 29 Oct 2019 18:13:05 +0000 (19:13 +0100)
The coordinates swap is done on the CPU, which would require
additional D2H and H2D copies if the update is offloaded.

Change-Id: I27574fd6b9a3e653b44053dc8bf3f9a8a9501ed2

src/gromacs/taskassignment/decidegpuusage.cpp

index 991397ad9e4c90cc9ad89b773e7e1b3cde1a0cfd..68a48204a179d4eab9c8ee9949b572a0fab1c384 100644 (file)
@@ -571,6 +571,10 @@ bool decideWhetherToUseGpuForUpdate(const bool        forceGpuUpdateDefaultOn,
     {
         errorMessage += "Replica exchange simulations are not supported.\n";
     }
+    if (inputrec.eSwapCoords != eswapNO)
+    {
+        errorMessage += "Swapping the coordinates is not supported.\n";
+    }
     if (!errorMessage.empty())
     {
         if (updateTarget == TaskTarget::Gpu)