Further improve getDDGridSetup
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 17 Sep 2019 10:38:05 +0000 (12:38 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 19 Sep 2019 16:20:18 +0000 (18:20 +0200)
commite5a4840711eff8e05496224f1bcd546f8ad7cd6e
tree573688a3fe8b36b425eceb5059c4c65273af116b
parente63d349fadbe80785223c14b917747634eccc281
Further improve getDDGridSetup

Merged and simplified two similar setup functions that were sharing
the setting up of the number of PME-only ranks and the DD grid used on
the PP ranks. No functionality changes here, although some user
messages are slightly improved.

This helps create the seam that GPU halo exchange setup will need in
order to do a good job of triggering that communication path, namely
that there is a clear point when the number of PP ranks is known, so
that the search for a DD cell decomposition can be made in a way that
might suit GPU halo exchange.

It also permits more of the DD setup routines to be called without
leading to a fatal error or output confusing to a user, which will also
be needed when introducing support for GPU halo exchange.

Functions called in init_domain_decomposition no longer look up the
total number of ranks from cr, but instead accept an integer
parameter. This will enable thread-MPI checking for various
possibilities to work smoothly if we ever do that.

Used better variable naming, IVec and more const
correctness to improve readability, and improved comments.

Noted TODOs for further work at some future time.

Improved havePPDomainDecomposition (and some of its users) so
that we are less likely to erroneously use it before we have
initialized DD.

Change-Id: I65e285cc10d946c7c5bf298d7ff08c81ba05f3d8
src/gromacs/domdec/dlbtiming.h
src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec_internal.h
src/gromacs/domdec/domdec_setup.cpp
src/gromacs/domdec/domdec_setup.h
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/mdlib/perf_est.cpp
src/gromacs/mdlib/perf_est.h
src/gromacs/mdtypes/commrec.h
src/gromacs/tools/tune_pme.cpp