Move responsibility for checking bondeds in reverse topology
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 30 Mar 2021 09:44:29 +0000 (09:44 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Tue, 30 Mar 2021 09:44:29 +0000 (09:44 +0000)
commitf1c0599ca0a471930ad680dafdcf846104c0b63e
tree097b7cd779f0d1b25a68763d16eb64cee4e3bd34
parent6c3cdb08865124fa37dfac4b6424d4afac8597ab
Move responsibility for checking bondeds in reverse topology

The reverse topology is a data structure distributed across all
domains that should refer exactly once to all bonded interactions
present in the global topology. We check that this is true at run
time, but need a complex implementation to avoid doing extra
collective communication that supports running what is effectively an
assertion that the reverse topology construction is correct.

Past attempts to improve this (e.g. 8b6c99a1) left the code in an
intermediate state where the responsibility for this check was mostly
implemented in do_md rather than compute_globals. That gave the
impression of compute_globals() returning an integer
parameter. However as above it's really an implementation detail of a
check of the reverse topology, and so the logic and memory for that
check should be in the domain decomposition module and object.

This change move the details of that check to the rest of the code
that handles the reverse topology. It renames several variables and
adds documentation for them.

This simplifies parts of the implementation of the modular simulator,
and prepares for implementing the proposal for #3887 by making all
outputs from global reduction local to the module that consumes them.

Refs #3421
Refs #3887
20 files changed:
src/gromacs/domdec/domdec.h
src/gromacs/domdec/domdec_struct.h
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/domdec/partition.cpp
src/gromacs/domdec/partition.h
src/gromacs/mdlib/md_support.cpp
src/gromacs/mdlib/md_support.h
src/gromacs/mdlib/stat.cpp
src/gromacs/mdlib/stat.h
src/gromacs/mdlib/update_vv.cpp
src/gromacs/mdlib/update_vv.h
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/mimic.cpp
src/gromacs/mdrun/minimize.cpp
src/gromacs/mdrun/rerun.cpp
src/gromacs/modularsimulator/computeglobalselement.cpp
src/gromacs/modularsimulator/domdechelper.cpp
src/gromacs/modularsimulator/domdechelper.h
src/gromacs/modularsimulator/simulatoralgorithm.cpp
src/gromacs/modularsimulator/simulatoralgorithm.h