Test parallel mpi only with openmp
authorPaul Bauer <paul.bauer.q@gmail.com>
Tue, 10 Dec 2019 10:11:26 +0000 (11:11 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 11 Dec 2019 08:56:59 +0000 (09:56 +0100)
Can time out in other conditions
Found while working on Gitlab CI

Refs #3232

Change-Id: I7cf62ed913d2bc8c88317a674b0594dbe54ba394

src/programs/mdrun/tests/CMakeLists.txt

index 685b62d672b7e6bdab3212cad03574d274fc6325..e5869b594ce151b66b8e8faa009b1e9016b48003 100644 (file)
@@ -136,9 +136,10 @@ gmx_add_gtest_executable(
     )
 target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure)
 
-# These tests are extremely slow without optimization, so only run them for
-# build types like Release or RelWithDebInfo
-if (CMAKE_BUILD_TYPE MATCHES "Rel")
+# These tests are extremely slow without optimization or OpenMP, so only run them for
+# build types like Release or RelWithDebInfo and if the build has been configured
+# with OpenMP enabled.
+if (CMAKE_BUILD_TYPE MATCHES "Rel" AND GMX_OPENMP)
     set(testname "MdrunMpiCoordinationTestsOneRank")
     gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 1 SLOW_TEST)
     set(testname "MdrunMpiCoordinationTestsTwoRanks")