Disable GPU update in the presence of frozen atoms
[alexxy/gromacs.git] / src / gromacs / taskassignment / decidegpuusage.cpp
index a2dd4b5d211afca81adedc37f6f9286e7012a31a..ba2e3563c8149dbd15ee08fe010608737041634c 100644 (file)
@@ -544,6 +544,7 @@ bool decideWhetherToUseGpuForUpdate(const bool                     isDomainDecom
                                     const bool                     useEssentialDynamics,
                                     const bool                     doOrientationRestraints,
                                     const bool                     useReplicaExchange,
+                                    const bool                     haveFrozenAtoms,
                                     const bool                     doRerun,
                                     const DevelopmentFeatureFlags& devFlags,
                                     const gmx::MDLogger&           mdlog)
@@ -686,6 +687,11 @@ bool decideWhetherToUseGpuForUpdate(const bool                     isDomainDecom
                 "The number of coupled constraints is higher than supported in the GPU LINCS "
                 "code.\n";
     }
+    if (haveFrozenAtoms)
+    {
+        // There is a known bug with frozen atoms and GPU update, see Issue #3920.
+        errorMessage += "Frozen atoms not supported.\n";
+    }
 
     if (!errorMessage.empty())
     {