The local pull groups were constructed before instead of after
constructing the local atom sets, which were needed for setting
the relative atom weights and with more than 32 DD PP-ranks.
Fixes #3750
Fixes where mdrun could behave incorrectly
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixes where mdrun could behave incorrectly
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Fixed bugs with COM pulling and domain decompostion with weight or >32 ranks
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+When using COM pulling and domain decomposition, the results would be
+incorrect when using relative weights per atom or when using more than
+32 DD MPI ranks. This would usually lead to crashes or obviously wrong
+results.
+
+:issue:`3750`
+
Fixes for ``gmx`` tools
^^^^^^^^^^^^^^^^^^^^^^^
Fixes for ``gmx`` tools
^^^^^^^^^^^^^^^^^^^^^^^
/*
* This file is part of the GROMACS molecular simulation package.
*
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020, 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.
* 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.
mdatoms->sigmaB, dd_pme_maxshift_x(dd), dd_pme_maxshift_y(dd));
}
mdatoms->sigmaB, dd_pme_maxshift_x(dd), dd_pme_maxshift_y(dd));
}
- if (ir->bPull)
- {
- /* Update the local pull groups */
- dd_make_local_pull_groups(cr, pull_work);
- }
-
if (dd->atomSets != nullptr)
{
/* Update the local atom sets */
dd->atomSets->setIndicesInDomainDecomposition(*(dd->ga2la));
}
if (dd->atomSets != nullptr)
{
/* Update the local atom sets */
dd->atomSets->setIndicesInDomainDecomposition(*(dd->ga2la));
}
+ // The pull group construction can need the atom sets updated above
+ if (ir->bPull)
+ {
+ /* Update the local pull groups */
+ dd_make_local_pull_groups(cr, pull_work);
+ }
+
/* Update the local atoms to be communicated via the IMD protocol if bIMD is TRUE. */
imdSession->dd_make_local_IMD_atoms(dd);
/* Update the local atoms to be communicated via the IMD protocol if bIMD is TRUE. */
imdSession->dd_make_local_IMD_atoms(dd);