Skip to content

Commit

Permalink
fix a big issue for GMX2024 patch
Browse files Browse the repository at this point in the history
I do not know how this got lost because it renders the code
unusable
  • Loading branch information
carlocamilloni committed Sep 18, 2024
1 parent fe01b29 commit 9144f57
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
8 changes: 7 additions & 1 deletion patches/gromacs-2024.2.diff/src/gromacs/mdrun/md.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
}

Expand Down Expand Up @@ -1721,7 +1728,6 @@ void gmx::LegacySimulator::do_md()
trotter_update(ir,
step,
ekind_,
enerd_,
state_,
total_vir,
md->homenr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,6 @@ void gmx::LegacySimulator::do_md()
trotter_update(ir,
step,
ekind_,
enerd_,
state_,
total_vir,
md->homenr,
Expand Down
14 changes: 9 additions & 5 deletions patches/gromacs-2024.2.diff/src/gromacs/mdrun/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2248,11 +2248,15 @@ int Mdrunner::mdrunner()
deviceStreamManager->context(),
deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedLocal),
wcycle.get());
fr->gpuForceReduction[gmx::AtomLocality::NonLocal] =
std::make_unique<gmx::GpuForceReduction>(
deviceStreamManager->context(),
deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedNonLocal),
wcycle.get());

if (runScheduleWork.simulationWork.havePpDomainDecomposition)
{
fr->gpuForceReduction[gmx::AtomLocality::NonLocal] =
std::make_unique<gmx::GpuForceReduction>(
deviceStreamManager->context(),
deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedNonLocal),
wcycle.get());
}

if (runScheduleWork.simulationWork.useMdGpuGraph)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2234,11 +2234,15 @@ int Mdrunner::mdrunner()
deviceStreamManager->context(),
deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedLocal),
wcycle.get());
fr->gpuForceReduction[gmx::AtomLocality::NonLocal] =
std::make_unique<gmx::GpuForceReduction>(
deviceStreamManager->context(),
deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedNonLocal),
wcycle.get());

if (runScheduleWork.simulationWork.havePpDomainDecomposition)
{
fr->gpuForceReduction[gmx::AtomLocality::NonLocal] =
std::make_unique<gmx::GpuForceReduction>(
deviceStreamManager->context(),
deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedNonLocal),
wcycle.get());
}

if (runScheduleWork.simulationWork.useMdGpuGraph)
{
Expand Down

0 comments on commit 9144f57

Please sign in to comment.