From: Berk Hess Date: Wed, 30 Oct 2019 15:49:21 +0000 (+0100) Subject: Update GPU update restrictions X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=b9c466ab068f40fc6549385570d99aff10c58d66;p=alexxy%2Fgromacs.git Update GPU update restrictions 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 --- diff --git a/docs/user-guide/mdrun-performance.rst b/docs/user-guide/mdrun-performance.rst index a881336620..962752417f 100644 --- a/docs/user-guide/mdrun-performance.rst +++ b/docs/user-guide/mdrun-performance.rst @@ -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 diff --git a/src/gromacs/mdrun/md.cpp b/src/gromacs/mdrun/md.cpp index aaac01fa82..4435129be0 100644 --- a/src/gromacs/mdrun/md.cpp +++ b/src/gromacs/mdrun/md.cpp @@ -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) { diff --git a/src/gromacs/mdrun/runner.cpp b/src/gromacs/mdrun/runner.cpp index 245d6f9e50..88fa3ea8da 100644 --- a/src/gromacs/mdrun/runner.cpp +++ b/src/gromacs/mdrun/runner.cpp @@ -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; diff --git a/src/gromacs/taskassignment/decidegpuusage.cpp b/src/gromacs/taskassignment/decidegpuusage.cpp index 68a48204a1..3e481bcd75 100644 --- a/src/gromacs/taskassignment/decidegpuusage.cpp +++ b/src/gromacs/taskassignment/decidegpuusage.cpp @@ -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) diff --git a/src/gromacs/taskassignment/decidegpuusage.h b/src/gromacs/taskassignment/decidegpuusage.h index 6b8685fa3e..1170359b0a 100644 --- a/src/gromacs/taskassignment/decidegpuusage.h +++ b/src/gromacs/taskassignment/decidegpuusage.h @@ -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);