Introduced Mdrunner high-level class
commit17bc2b7a39714f8cac84533baab951e89e4d04b0
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 11 Jul 2017 13:46:15 +0000 (11 15:46 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 1 Aug 2017 16:10:19 +0000 (1 18:10 +0200)
tree9b70d44f0b9389781ab4f4cb3eff46a0fb69ae08
parent6b2de303b677a76717b12ff1afa1fa13b8b47156
Introduced Mdrunner high-level class

This class does not yet conform to style, e.g. for naming of member
variables, because the immediate objective is to support refactoring
of setup code to permit evolution of seams that could be used either
from an API caller, or a test driver. Appending a lot of underscores
would cause a lot of useless work rebasing other patches that touch
this code, and would make this patch rather larger. A good future
refactoring for this setup code would be to move most of the member
variables to be set up by modules that implement the hypothetical
ICommandLineOption interface.

Further, keeping the names the same in this patch means that we can
check with -Wshadow that there are no symbols that share the same name
in a nested scope (which is an error I made when developing this
patch).

Ported the command-line filename argument storage to std::array, so
that default copy assignment (etc.) works correctly. The storage for
the C-style memory pointed at by the individual t_filenm data is still
duplicated by the same call to dup_tfn().

Now that hw_opt is a member variable, several of the uses that modify
it need to take its address, and several of the const uses of it can
take a const reference, per style. This will make it easier to see
those places where we modify a data structure that ought to contain
only the things that the user selected.

Noted some TODOs for future improvements

Change-Id: I15c308e54ee34541818854cac029998f9e5520ff
src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec.h
src/gromacs/hardware/detecthardware.cpp
src/gromacs/hardware/detecthardware.h
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/resource-division.cpp
src/programs/mdrun/resource-division.h
src/programs/mdrun/runner.cpp
src/programs/mdrun/runner.h