Update GPU update restrictions
authorBerk Hess <hess@kth.se>
Wed, 30 Oct 2019 15:49:21 +0000 (16:49 +0100)
committerSzilárd Páll <pall.szilard@gmail.com>
Thu, 31 Oct 2019 01:06:52 +0000 (02:06 +0100)
Ewald surface correction does not work and distance restraints do.
The graph can not be used, which is now asserted on.
Updated the user guide for these changes and missing restrictions.

Change-Id: Ica477462d55c047c8ae07284bbe20fba6f332f6b

docs/user-guide/mdrun-performance.rst
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/taskassignment/decidegpuusage.cpp
src/gromacs/taskassignment/decidegpuusage.h

index a8813366201c432bdb2ad97c16095f64d5d761f2..962752417f6e783cc7a5caaa537985e94008d40d 100644 (file)
@@ -531,8 +531,8 @@ behavior.
     Setting "gpu" requires that a compatible CUDA GPU is available.
     Update and constraints on a GPU is currently not supported
     with pressure coupling, free-energy, domain decomposition, virtual sites,
-    replica exchange, the pull code, distance and orientation restraints
-    and computational electrophysiology.
+    Ewald surface correction, replica exchange, the pull code,
+    orientation restraints and computational electrophysiology.
 
 ``-gpu_id``
     A string that specifies the ID numbers of the GPUs that
index aaac01fa822e5463e15bd81e53658ca027480bf6..4435129be071c08533776f5dab71ae398ed26f96 100644 (file)
@@ -353,8 +353,8 @@ void gmx::LegacySimulator::do_md()
         GMX_RELEASE_ASSERT(ed == nullptr, "Essential dynamics is not supported with the GPU update.\n");
         GMX_RELEASE_ASSERT(!ir->bPull && !ir->pull, "Pulling is not supported with the GPU update.\n");
         GMX_RELEASE_ASSERT(fcd->orires.nr == 0, "Orientation restraints are not supported with the GPU update.\n");
-        GMX_RELEASE_ASSERT(fcd->disres.npair  == 0, "Distance restraints are not supported with the GPU update.\n");
         GMX_RELEASE_ASSERT(ir->efep == efepNO, "Free energy perturbations are not supported with the GPU update.");
+        GMX_RELEASE_ASSERT(graph == nullptr, "The graph is not supported with GPU update.");
 
         if (constr != nullptr && constr->numConstraintsTotal() > 0)
         {
index 245d6f9e50e838de17edd51e33221e399b5caf93..88fa3ea8dacccdb905ba1571324d6dceeff2afa0 100644 (file)
@@ -900,7 +900,6 @@ int Mdrunner::mdrunner()
                                                          gmx_mtop_interaction_count(mtop, IF_VSITE) > 0,
                                                          doEssentialDynamics,
                                                          gmx_mtop_ftype_count(mtop, F_ORIRES) > 0,
-                                                         gmx_mtop_ftype_count(mtop, F_DISRES) > 0,
                                                          replExParams.exchangeInterval > 0);
     }
     GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
index 68a48204a179d4eab9c8ee9949b572a0fab1c384..3e481bcd75c3a92a390fd2104320e4e4edfc794a 100644 (file)
@@ -500,7 +500,6 @@ bool decideWhetherToUseGpuForUpdate(const bool        forceGpuUpdateDefaultOn,
                                     const bool        haveVSites,
                                     const bool        useEssentialDynamics,
                                     const bool        doOrientationRestraints,
-                                    const bool        doDistanceRestraints,
                                     const bool        useReplicaExchange)
 {
 
@@ -543,6 +542,11 @@ bool decideWhetherToUseGpuForUpdate(const bool        forceGpuUpdateDefaultOn,
         // Coordinate D2H and H2d are missing as well as PBC reinitialization
         errorMessage += "Pressure coupling is not supported.\n";
     }
+    if (EEL_PME_EWALD(inputrec.coulombtype) && inputrec.epsilon_surface != 0)
+    {
+        // The graph is needed, but not supported
+        errorMessage += "Ewald surface correction is not supported.\n";
+    }
     if (haveVSites)
     {
         errorMessage += "Virtual sites are not supported.\n";
@@ -553,18 +557,17 @@ bool decideWhetherToUseGpuForUpdate(const bool        forceGpuUpdateDefaultOn,
     }
     if (inputrec.bPull || inputrec.pull)
     {
+        // Pull potentials are actually supported, but constraint pulling is not
         errorMessage += "Pulling is not supported.\n";
     }
     if (doOrientationRestraints)
     {
+        // The graph is needed, but not supported
         errorMessage += "Orientation restraints are not supported.\n";
     }
-    if (doDistanceRestraints)
-    {
-        errorMessage += "Distance restraints are not supported.\n";
-    }
     if (inputrec.efep != efepNO)
     {
+        // Actually all free-energy options except for mass and constraint perturbation are supported
         errorMessage += "Free energy perturbations are not supported.\n";
     }
     if (useReplicaExchange)
index 6b8685fa3e1f886e029915a959e6143d798840c7..1170359b0a5368cf2378c43a1ce471b0d061ae19 100644 (file)
@@ -241,7 +241,6 @@ bool decideWhetherToUseGpusForBonded(bool       useGpuForNonbonded,
  * \param[in]  haveVSites                If there are virtual sites in the system.
  * \param[in]  useEssentialDynamics      If essential dynamics is active.
  * \param[in]  doOrientationRestraints   If orientation restraints are enabled.
- * \param[in]  doDistanceRestraints      If distance restraints are enabled.
  * \param[in]  useReplicaExchange        If this is a REMD simulation.
  *
  * \returns    Whether complete simulation can be run on GPU.
@@ -258,7 +257,6 @@ bool decideWhetherToUseGpuForUpdate(bool              forceGpuUpdateDefaultOn,
                                     bool              haveVSites,
                                     bool              useEssentialDynamics,
                                     bool              doOrientationRestraints,
-                                    bool              doDistanceRestraints,
                                     bool              useReplicaExchange);