Gromacs
2024.4
|
#include <programs/mdrun/tests/multisimtest.h>
Test fixture for multi-sim functionality.
This is intended to be re-used also for tests of functionality that are derived from multi-sim, e.g. REMD.
Public Member Functions | |
bool | mpiSetupValid () const |
Check whether the MPI setup is valid. More... | |
void | organizeMdpFile (SimulationRunner *runner, IntegrationAlgorithm integrator, TemperatureCoupling tcoupl, PressureCoupling pcoupl, int numSteps, bool doRegression) const |
Organize the .mdp file for this rank. More... | |
void | runGrompp (SimulationRunner *runner, int numSteps=2, bool doRegression=false, int maxWarnings=0) const |
Run grompp on the ranks that need to run it. More... | |
void | runExitsNormallyTest () |
Test that a basic simulation works. | |
void | runMaxhTest () |
Test that mdrun -maxh and restart works. | |
Public Attributes | |
int | size_ |
Number of MPI ranks. | |
int | rank_ |
MPI rank of this process. | |
int | numRanksPerSimulation_ |
Number of ranks per simulation. | |
int | simulationNumber_ |
The simulation this rank belongs to (equal to int( rank_ / numRanksPerSimulation_) ) | |
CommandLinePointer | mdrunCaller_ |
Object for building the mdrun command line. | |
TestFileManager | fileManager_ |
Manages temporary files during the test. | |
Additional Inherited Members | |
Static Public Member Functions inherited from gmx::test::MdrunTestFixtureBase | |
static void | SetUpTestSuite () |
Per-test-case setup for lengthy processes that need run only once. | |
static void | TearDownTestSuite () |
Per-test-case tear down. | |
Static Public Attributes inherited from gmx::test::MdrunTestFixtureBase | |
static MPI_Comm | s_communicator = MPI_COMM_NULL |
Communicator over which the test fixture works. | |
static std::unique_ptr < gmx_hw_info_t > | s_hwinfo |
Hardware information object. More... | |
bool gmx::test::MultiSimTest::mpiSetupValid | ( | ) | const |
Check whether the MPI setup is valid.
Excludes MPI setups which are not supported by multi-sim
void gmx::test::MultiSimTest::organizeMdpFile | ( | SimulationRunner * | runner, |
IntegrationAlgorithm | integrator, | ||
TemperatureCoupling | tcoupl, | ||
PressureCoupling | pcoupl, | ||
int | numSteps, | ||
bool | doRegression | ||
) | const |
Organize the .mdp file for this rank.
For testing multi-simulation, this .mdp file is more complicated than it needs to be, but it does little harm, and doing it this way allows this function to be re-used for testing replica-exchange.
The mdp options, specifically the temperature and pressure coupling, allow parameterization to work with T, P or (later) lambda as the control variable, by passing a string with a value for the respective mdp option such that different paths in init_replica_exchange() are followed.
runner | The simulation runner that uses the mdp file that is organized. |
integrator | Value for the mdp option integrator |
tcoupl | Value for the mdp option tcoupl |
pcoupl | Value for the mdp option pcoupl |
numSteps | Number of MD steps to perform. |
doRegression | Whether the mdp file will be used for regression tests, request use of reproducible parameters |
void gmx::test::MultiSimTest::runGrompp | ( | SimulationRunner * | runner, |
int | numSteps = 2 , |
||
bool | doRegression = false , |
||
int | maxWarnings = 0 |
||
) | const |
Run grompp on the ranks that need to run it.
Adds an MPI barrier to ensure that all ranks have written before returning
runner | The simulation runner to run grompp on |
numSteps | Number of MD steps to perform |
doRegression | Whether to write trajectories during the simulation |
maxWarnings | Number of grompp warning tolerated |