Add a note to the log file when -update gpu was set with DD
authorArtem Zhmurov <zhmurov@gmail.com>
Fri, 20 Dec 2019 13:08:36 +0000 (14:08 +0100)
committerPaul Bauer <paul.bauer.q@gmail.com>
Fri, 27 Dec 2019 14:47:31 +0000 (15:47 +0100)
GPU update with DD is not enabled with DD even if '-update gpu'
is requested. The only way to enable it is to set
GMX_FORCE_UPDATE_DEFAULT_GPU environment variable. This patch
adds a note to the output, expaining that. Also, extra warning
note is added when the environment variable is set.

Fixes #3259.

Change-Id: I480dd8e734ff60156e117cc80b1cd9af6a161791

src/gromacs/mdrun/runner.cpp
src/gromacs/taskassignment/decidegpuusage.cpp

index 3909523e1482d713a4a8703acbc57a287e638d9d..477ae85b44ce8e03bbe4d2e0f4c193c0510eb924 100644 (file)
@@ -234,7 +234,8 @@ static DevelopmentFeatureFlags manageDevelopmentFeatures(const gmx::MDLogger& md
                 .asParagraph()
                 .appendTextFormatted(
                         "This run will default to '-update gpu' as requested by the "
-                        "GMX_FORCE_UPDATE_DEFAULT_GPU environment variable.");
+                        "GMX_FORCE_UPDATE_DEFAULT_GPU environment variable. GPU update with domain "
+                        "decomposition lacks substantial testing and should be used with caution.");
     }
 
     if (devFlags.enableGpuHaloExchange)
index fc1f4faf605b6916d07d80ae417b7800db5a418f..adda067bfadb5aa61aafaf44df584209f96c5674 100644 (file)
@@ -513,12 +513,20 @@ bool decideWhetherToUseGpuForUpdate(const bool        forceGpuUpdateDefaultWithD
 
     std::string errorMessage;
 
-    if (isDomainDecomposition && hasAnyConstraints && !useUpdateGroups)
+    if (isDomainDecomposition)
     {
-        errorMessage +=
-                "Domain decomposition is only supported with constraints when update groups are "
-                "used. This means constraining all bonds is not supported, except for small "
-                "molecules, and box sizes close to half the pair-list cutoff are not supported.\n ";
+        if (!forceGpuUpdateDefaultWithDD)
+        {
+            errorMessage += "Domain decomposition is not supported.\n ";
+        }
+        else if (hasAnyConstraints && !useUpdateGroups)
+        {
+            errorMessage +=
+                    "Domain decomposition is only supported with constraints when update groups "
+                    "are used. This means constraining all bonds is not supported, except for "
+                    "small molecules, and box sizes close to half the pair-list cutoff are not "
+                    "supported.\n ";
+        }
     }
     if (inputrec.eConstrAlg == econtSHAKE && hasAnyConstraints && gmx_mtop_ftype_count(mtop, F_CONSTR) > 0)
     {