From: Andrey Alekseenko Date: Wed, 10 Mar 2021 05:55:30 +0000 (+0000) Subject: Disable GPU update in the presence of frozen atoms X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=9550c3e8564068c86a0f34baee0f578e8ce6d5a9;p=alexxy%2Fgromacs.git Disable GPU update in the presence of frozen atoms There is a known bug (Issue #3920) affecting GPU update when frozen atoms are present. While the bug is being resolved, we mark such configuration as not allowed. Refs #3920 --- diff --git a/src/gromacs/mdrun/runner.cpp b/src/gromacs/mdrun/runner.cpp index 5d37389670..725165f59e 100644 --- a/src/gromacs/mdrun/runner.cpp +++ b/src/gromacs/mdrun/runner.cpp @@ -1373,6 +1373,7 @@ int Mdrunner::mdrunner() doEssentialDynamics, gmx_mtop_ftype_count(mtop, F_ORIRES) > 0, replExParams.exchangeInterval > 0, + inputrec->opts.nFreeze != nullptr, doRerun, devFlags, mdlog); diff --git a/src/gromacs/taskassignment/decidegpuusage.cpp b/src/gromacs/taskassignment/decidegpuusage.cpp index a2dd4b5d21..ba2e3563c8 100644 --- a/src/gromacs/taskassignment/decidegpuusage.cpp +++ b/src/gromacs/taskassignment/decidegpuusage.cpp @@ -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()) { diff --git a/src/gromacs/taskassignment/decidegpuusage.h b/src/gromacs/taskassignment/decidegpuusage.h index b5fd83907f..765636c448 100644 --- a/src/gromacs/taskassignment/decidegpuusage.h +++ b/src/gromacs/taskassignment/decidegpuusage.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2017,2018,2019,2020,2021, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -278,6 +278,7 @@ bool decideWhetherToUseGpusForBonded(bool useGpuForNonbonded, * \param[in] useEssentialDynamics If essential dynamics is active. * \param[in] doOrientationRestraints If orientation restraints are enabled. * \param[in] useReplicaExchange If this is a REMD simulation. + * \param[in] haveFrozenAtoms If this simulation has frozen atoms (see Issue #3920). * \param[in] doRerun It this is a rerun. * \param[in] devFlags GPU development / experimental feature flags. * \param[in] mdlog MD logger. @@ -298,6 +299,7 @@ bool decideWhetherToUseGpuForUpdate(bool isDomainDecom bool useEssentialDynamics, bool doOrientationRestraints, bool useReplicaExchange, + bool haveFrozenAtoms, bool doRerun, const DevelopmentFeatureFlags& devFlags, const gmx::MDLogger& mdlog);