} /* end of MASTER only section */
- if (PAR(cr))
+ if (haveDDAtomOrdering(*cr))
{
- /* Broadcast the essential dynamics / flooding data to all nodes */
+ /* Broadcast the essential dynamics / flooding data to all nodes.
+ * In a single-rank case, only the necessary memory allocation is done. */
broadcast_ed_data(cr, ed);
}
else
{
- /* In the single-CPU case, point the local atom numbers pointers to the global
+ /* In the non-DD case, point the local atom numbers pointers to the global
* one, so that we can use the same notation in serial and parallel case: */
/* Loop over all ED data sets (usually only one, though) */
for (auto edi = ed->edpar.begin(); edi != ed->edpar.end(); ++edi)
int coll_ind[]) /* OUT (opt): Where is this position found in the collective array? */
{
GMX_ASSERT(ga2la, "We need a valid ga2la object");
+ GMX_RELEASE_ASSERT(anrs != *anrs_loc, "Can not update indices in-place");
/* Loop over all the atom indices of the group to check
* which ones are on the local node */