diff --git a/patches/gromacs-2024.2.diff/src/gromacs/mdrun/md.cpp b/patches/gromacs-2024.2.diff/src/gromacs/mdrun/md.cpp index 18f0bb0ce1..93a608d00e 100644 --- a/patches/gromacs-2024.2.diff/src/gromacs/mdrun/md.cpp +++ b/patches/gromacs-2024.2.diff/src/gromacs/mdrun/md.cpp @@ -1089,6 +1089,13 @@ void gmx::LegacySimulator::do_md() do_verbose && !bPMETunePrinting); upd.updateAfterPartition(state_->numAtoms(), md->cFREEZE, md->cTC, md->cACC); fr_->longRangeNonbondeds->updateAfterPartition(*md); + /* PLUMED */ + if(plumedswitch){ + int nat_home = dd_numHomeAtoms(*cr_->dd); + plumed_cmd(plumedmain,"setAtomsNlocal",&nat_home); + plumed_cmd(plumedmain,"setAtomsGatindex",cr_->dd->globalAtomIndices.data()); + } + /* END PLUMED */ } } @@ -1721,7 +1728,6 @@ void gmx::LegacySimulator::do_md() trotter_update(ir, step, ekind_, - enerd_, state_, total_vir, md->homenr, diff --git a/patches/gromacs-2024.2.diff/src/gromacs/mdrun/md.cpp.preplumed b/patches/gromacs-2024.2.diff/src/gromacs/mdrun/md.cpp.preplumed index ed25c89fd8..167f7c6018 100644 --- a/patches/gromacs-2024.2.diff/src/gromacs/mdrun/md.cpp.preplumed +++ b/patches/gromacs-2024.2.diff/src/gromacs/mdrun/md.cpp.preplumed @@ -1480,7 +1480,6 @@ void gmx::LegacySimulator::do_md() trotter_update(ir, step, ekind_, - enerd_, state_, total_vir, md->homenr, diff --git a/patches/gromacs-2024.2.diff/src/gromacs/mdrun/runner.cpp b/patches/gromacs-2024.2.diff/src/gromacs/mdrun/runner.cpp index 7dc23d2fe2..572d09fc69 100644 --- a/patches/gromacs-2024.2.diff/src/gromacs/mdrun/runner.cpp +++ b/patches/gromacs-2024.2.diff/src/gromacs/mdrun/runner.cpp @@ -2248,11 +2248,15 @@ int Mdrunner::mdrunner() deviceStreamManager->context(), deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedLocal), wcycle.get()); - fr->gpuForceReduction[gmx::AtomLocality::NonLocal] = - std::make_unique( - deviceStreamManager->context(), - deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedNonLocal), - wcycle.get()); + + if (runScheduleWork.simulationWork.havePpDomainDecomposition) + { + fr->gpuForceReduction[gmx::AtomLocality::NonLocal] = + std::make_unique( + deviceStreamManager->context(), + deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedNonLocal), + wcycle.get()); + } if (runScheduleWork.simulationWork.useMdGpuGraph) { diff --git a/patches/gromacs-2024.2.diff/src/gromacs/mdrun/runner.cpp.preplumed b/patches/gromacs-2024.2.diff/src/gromacs/mdrun/runner.cpp.preplumed index 2e3f56c232..0ff3341b01 100644 --- a/patches/gromacs-2024.2.diff/src/gromacs/mdrun/runner.cpp.preplumed +++ b/patches/gromacs-2024.2.diff/src/gromacs/mdrun/runner.cpp.preplumed @@ -2234,11 +2234,15 @@ int Mdrunner::mdrunner() deviceStreamManager->context(), deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedLocal), wcycle.get()); - fr->gpuForceReduction[gmx::AtomLocality::NonLocal] = - std::make_unique( - deviceStreamManager->context(), - deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedNonLocal), - wcycle.get()); + + if (runScheduleWork.simulationWork.havePpDomainDecomposition) + { + fr->gpuForceReduction[gmx::AtomLocality::NonLocal] = + std::make_unique( + deviceStreamManager->context(), + deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedNonLocal), + wcycle.get()); + } if (runScheduleWork.simulationWork.useMdGpuGraph) {