Fix incorrect GPU update task assignment fallback
authorSzilárd Páll <pall.szilard@gmail.com>
Mon, 10 Feb 2020 18:30:22 +0000 (19:30 +0100)
committerSzilárd Páll <pall.szilard@gmail.com>
Tue, 11 Feb 2020 15:10:52 +0000 (16:10 +0100)
This change fixes the incorrect fallback condition in the GPU update
task assignment. This also eliminates the assertion trigerred in do_md()
where the correct form of the check is asserted on.
Since the fallback path only triggers when the GPU update would be used by
default this only affected runs with GMX_FORCE_UPDATE_DEFAULT_GPU.

Change-Id: I8b2b506fa998b6ed5e6d6d8ae4b78e27006df199

src/gromacs/taskassignment/decidegpuusage.cpp

index 9e6a069a1969028a87b95eae014c7dafc8f4d9aa..fdb741421275ac190a3121d1803ff3a652314165 100644 (file)
@@ -567,9 +567,9 @@ bool decideWhetherToUseGpuForUpdate(const bool           forceGpuUpdateDefault,
         errorMessage += "SHAKE constraints are not supported.\n";
     }
     // Using the GPU-version of update if:
-    // 1. PME is on the GPU (there should be a copy of coordinates on GPU for PME spread), or
+    // 1. PME is on the GPU (there should be a copy of coordinates on GPU for PME spread) or inactive, or
     // 2. Non-bonded interactions are on the GPU.
-    if (pmeRunMode == PmeRunMode::CPU && !useGpuForNonbonded)
+    if ((pmeRunMode == PmeRunMode::CPU || pmeRunMode == PmeRunMode::None) && !useGpuForNonbonded)
     {
         errorMessage +=
                 "Either PME or short-ranged non-bonded interaction tasks must run on the GPU.\n";