Separate simulator comparison tests
authorPascal Merz <pascal.merz@me.com>
Wed, 2 Dec 2020 00:30:34 +0000 (17:30 -0700)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 2 Dec 2020 09:17:24 +0000 (09:17 +0000)
The simulator comparison tests ensure that legacy and modular
simulator code paths don't diverge while both exist. They are
currently part of the mdrun tests. Separating them has two
advantages:

* As the feature set of modular simulator grew, the run time
  of these tests became the largest contributor to the run time of
  mdrun-test. Keeping it separate makes it easy to keep the
  run time in check and to disable the tests if necessary.
* It is useful to run the simulator comparison tests on
  multiple ranks (at least locally). Not all other tests
  in mdrun-test support more than one rank. Having a separate
  binary simplifies running it with different parallelization schemes.

src/programs/mdrun/tests/CMakeLists.txt

index b051068c0670184835bd4dda10d283a2b7e00d10..34f05ebfb5bfa5f749b75bca8c1f4a0f2e84424e 100644 (file)
@@ -106,7 +106,6 @@ gmx_add_gtest_executable(${exename}
         ewaldsurfaceterm.cpp
         multiple_time_stepping.cpp
         orires.cpp
-        simulator.cpp
         swapcoords.cpp
         tabulated_bonded_interactions.cpp
         # pseudo-library for code for mdrun
@@ -231,3 +230,17 @@ gmx_add_gtest_executable(${exename}
 )
 target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure)
 gmx_register_gtest_test(${testname} ${exename} OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS)
+
+# End-to-end tests comparing different simulator code paths
+set(testname "MdrunSimulatorComparison")
+set(exename "mdrun-simulator-comparison-test")
+
+gmx_add_gtest_executable(${exename}
+        CPP_SOURCE_FILES
+        # files with code for tests
+        simulator.cpp
+        # pseudo-library for code for mdrun
+        $<TARGET_OBJECTS:mdrun_objlib>
+        )
+target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure)
+gmx_register_gtest_test(${testname} ${exename} OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS)