X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=blobdiff_plain;f=src%2Fgromacs%2Fmdrun%2Fmd.cpp;fp=src%2Fgromacs%2Fmdrun%2Fmd.cpp;h=d982767751b471ddaa13fb05500e19a8aa37202a;hp=735b5daa06cb44b98a31a7c6b572de0668bb4578;hb=8e4184a2387fb1b36361b07c9c3df40076d0250d;hpb=4ab77f8b8162e37a89f7bdbd89709528326d7c26 diff --git a/src/gromacs/mdrun/md.cpp b/src/gromacs/mdrun/md.cpp index 735b5daa06..d982767751 100644 --- a/src/gromacs/mdrun/md.cpp +++ b/src/gromacs/mdrun/md.cpp @@ -338,7 +338,6 @@ void gmx::LegacySimulator::do_md() const auto& simulationWork = runScheduleWork->simulationWork; const bool useGpuForPme = simulationWork.useGpuPme; const bool useGpuForNonbonded = simulationWork.useGpuNonbonded; - const bool useGpuForBufferOps = simulationWork.useGpuBufferOps; const bool useGpuForUpdate = simulationWork.useGpuUpdate; /* Check for polarizable models and flexible constraints */ @@ -360,9 +359,8 @@ void gmx::LegacySimulator::do_md() ObservablesReducer observablesReducer = observablesReducerBuilder->build(); ForceBuffers f(simulationWork.useMts, - ((useGpuForNonbonded && useGpuForBufferOps) || useGpuForUpdate) - ? PinningPolicy::PinnedIfSupported - : PinningPolicy::CannotBePinned); + (simulationWork.useGpuFBufferOps || useGpuForUpdate) ? PinningPolicy::PinnedIfSupported + : PinningPolicy::CannotBePinned); const t_mdatoms* md = mdAtoms->mdatoms(); if (haveDDAtomOrdering(*cr)) { @@ -431,7 +429,7 @@ void gmx::LegacySimulator::do_md() GMX_RELEASE_ASSERT(ir->eConstrAlg != ConstraintAlgorithm::Shake || constr == nullptr || constr->numConstraintsTotal() == 0, "SHAKE is not supported with GPU update."); - GMX_RELEASE_ASSERT(useGpuForPme || (useGpuForNonbonded && simulationWork.useGpuBufferOps), + GMX_RELEASE_ASSERT(useGpuForPme || (useGpuForNonbonded && simulationWork.useGpuXBufferOps), "Either PME or short-ranged non-bonded interaction tasks must run on " "the GPU to use GPU update.\n"); GMX_RELEASE_ASSERT(ir->eI == IntegrationAlgorithm::MD, @@ -488,7 +486,7 @@ void gmx::LegacySimulator::do_md() integrator->setPbc(PbcType::Xyz, state->box); } - if (useGpuForPme || (useGpuForNonbonded && useGpuForBufferOps) || useGpuForUpdate) + if (useGpuForPme || simulationWork.useGpuXBufferOps || useGpuForUpdate) { changePinningPolicy(&state->x, PinningPolicy::PinnedIfSupported); }