Consolidate logic for whether to use ModularSimulator.
authorM. Eric Irrgang <ericirrgang@gmail.com>
Mon, 6 Jan 2020 13:14:23 +0000 (16:14 +0300)
committerPascal Merz <pascal.merz@colorado.edu>
Mon, 9 Mar 2020 02:01:57 +0000 (03:01 +0100)
commit3aa29ff7015e1ab0ff7388111d479d43ca2aee65
tree9120a807158e2d4ef7e200524de19bf18f4296a2
parent386b2947caea0be8b8b32e0db287520412135aea
Consolidate logic for whether to use ModularSimulator.

There appeared to be inconsistent logic in runner.cpp about whether
the ModularSimulator would be used, but the apparent inconsistency was
actually just the result of equivalent logic being performed in
multiple places, and unclear ownership of an environment variable. This
change should clarify some logic in runner.cpp and simplify the behavior
of the SimulatorBuilder.

* Reference GMX_DISABLE_MODULAR_SIMULATOR environment variable in a
  single location.
* Use a single utility function to determine whether to use
  ModularSimulator, and call in Mdrunner::mdrunner().
* Refactor SimulatorBuilder to perform an action based solely on its
  arguments, rather than to override the client-provided arguments based
  on an environment variable.

Change-Id: I775ef82461f30b79b4412a473e5a1aa66270e2d5
src/gromacs/mdrun/runner.cpp
src/gromacs/mdrun/simulatorbuilder.h
src/gromacs/modularsimulator/modularsimulator.h