forked from easybuilders/easybuild-easyconfigs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request easybuilders#20439 from boegel/20240430110124_new_…
…pr_GROMACS20241 add patch for GROMACS 2024.1 to fix filesystem race in tests
- Loading branch information
Showing
2 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
152 changes: 152 additions & 0 deletions
152
easybuild/easyconfigs/g/GROMACS/GROMACS-2024.1_fix-tests-filesystem-race.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
diff --git a/api/gmxapi/cpp/tests/CMakeLists.txt b/api/gmxapi/cpp/tests/CMakeLists.txt | ||
index ca741dc930b4ed9cbde2ba4c84e50d4579e1adc6..7c00e390a32e92926d08b006df4ad335273143fb 100644 | ||
--- a/api/gmxapi/cpp/tests/CMakeLists.txt | ||
+++ b/api/gmxapi/cpp/tests/CMakeLists.txt | ||
@@ -107,4 +107,10 @@ if (GMX_MPI) | ||
set_tests_properties(GmxapiMpiTests PROPERTIES | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
endif () | ||
+ if (TEST GmxapiExternalInterfaceTests AND TEST GmxapiMpiTests) | ||
+ # Because the gmxapi tests depend on writing files whose names are not | ||
+ # unique across test cases, prevent CTest from running these tests | ||
+ # concurrently. See #4654 | ||
+ set_tests_properties(GmxapiMpiTests PROPERTIES DEPENDS GmxapiExternalInterfaceTests) | ||
+ endif() | ||
endif () | ||
diff --git a/src/programs/mdrun/tests/CMakeLists.txt b/src/programs/mdrun/tests/CMakeLists.txt | ||
index 23dc2840aed9660f6fb84a4d5a295a2cb36feace..e24ae102d511b735257d60ce2c59e6a1d1956400 100644 | ||
--- a/src/programs/mdrun/tests/CMakeLists.txt | ||
+++ b/src/programs/mdrun/tests/CMakeLists.txt | ||
@@ -113,6 +113,12 @@ gmx_add_gtest_executable(${exename} MPI | ||
target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure) | ||
gmx_register_gtest_test(MdrunTestsOneRank ${exename} MPI_RANKS 1 OPENMP_THREADS 2 INTEGRATION_TEST SLOW_TEST IGNORE_LEAKS SLOW_GPU_TEST) | ||
gmx_register_gtest_test(MdrunTestsTwoRanks ${exename} MPI_RANKS 2 OPENMP_THREADS 2 INTEGRATION_TEST SLOW_TEST IGNORE_LEAKS SLOW_GPU_TEST) | ||
+# Because the mdrun tests depend on writing files whose names are not | ||
+# unique across test cases, prevent CTest from running these tests | ||
+# concurrently. See #4654 | ||
+if (TEST MdrunTestsTwoRanks AND TEST MdrunTestsOneRank) | ||
+ set_tests_properties(MdrunTestsTwoRanks PROPERTIES DEPENDS MdrunTestsOneRank) | ||
+endif() | ||
|
||
# The orires test is separate, as it supports only a single MPI rank | ||
set(testname "MdrunSingleRankAlgorithmsTests") | ||
@@ -129,13 +135,31 @@ 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 SLOW_GPU_TEST) | ||
|
||
+set(exename "minimize-test") | ||
+ | ||
+gmx_add_gtest_executable(${exename} MPI | ||
+ CPP_SOURCE_FILES | ||
+ # files with code for tests | ||
+ minimize.cpp | ||
+ # pseudo-library for code for mdrun | ||
+ $<TARGET_OBJECTS:mdrun_objlib> | ||
+ ) | ||
+target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure) | ||
+gmx_register_gtest_test(Minimize1RankTests ${exename} MPI_RANKS 1 OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS QUICK_GPU_TEST) | ||
+gmx_register_gtest_test(Minimize2RankTests ${exename} MPI_RANKS 2 OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS QUICK_GPU_TEST) | ||
+# Because the minimizer tests depend on writing files whose names are not | ||
+# unique across test cases, prevent CTest from running these tests | ||
+# concurrently. See #4654 | ||
+if (TEST Minimize2RankTests AND TEST Minimize1RankTests) | ||
+ set_tests_properties(Minimize2RankTests PROPERTIES DEPENDS Minimize1RankTests) | ||
+endif() | ||
+ | ||
set(testname "MdrunNonIntegratorTests") | ||
set(exename "mdrun-non-integrator-test") | ||
|
||
gmx_add_gtest_executable(${exename} | ||
CPP_SOURCE_FILES | ||
# files with code for tests | ||
- minimize.cpp | ||
nonbonded_bench.cpp | ||
normalmodes.cpp | ||
rerun.cpp | ||
@@ -169,7 +193,6 @@ gmx_add_gtest_executable(${exename} MPI | ||
CPP_SOURCE_FILES | ||
# files with code for tests | ||
domain_decomposition.cpp | ||
- minimize.cpp | ||
mimic.cpp | ||
# pseudo-library for code for mdrun | ||
$<TARGET_OBJECTS:mdrun_objlib> | ||
@@ -177,6 +200,13 @@ gmx_add_gtest_executable(${exename} MPI | ||
target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure) | ||
gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 2 OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS QUICK_GPU_TEST) | ||
|
||
+# Because the mdrun tests depend on writing files whose names are not | ||
+# unique across test cases, prevent CTest from running these tests | ||
+# concurrently. See #4654. These test binaries both test aspects of MiMiC. | ||
+if (TEST MdrunMpiTests AND TEST MdrunModulesTests) | ||
+ set_tests_properties(MdrunMpiTests PROPERTIES DEPENDS MdrunModulesTests) | ||
+endif() | ||
+ | ||
# Multi sim only makes sense with real MPI, and ideally at least 4 ranks, | ||
# to allow for multiple simulations (>= 2 sims) each using DD (>= 2 ranks per sim) | ||
set(testname "MdrunMultiSimTests") | ||
@@ -235,6 +265,12 @@ gmx_add_gtest_executable(${exename} MPI | ||
target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure) | ||
gmx_register_gtest_test(MdrunMpi1RankPmeTests ${exename} MPI_RANKS 1 OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS SLOW_GPU_TEST) | ||
gmx_register_gtest_test(MdrunMpi2RankPmeTests ${exename} MPI_RANKS 2 OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS SLOW_GPU_TEST) | ||
+# Because the mdrun tests depend on writing files whose names are not | ||
+# unique across test cases, prevent CTest from running these tests | ||
+# concurrently. See #4654 | ||
+if (TEST MdrunMpi2RankPmeTests AND TEST MdrunMpi1RankPmeTests) | ||
+ set_tests_properties(MdrunMpi2RankPmeTests PROPERTIES DEPENDS MdrunMpi1RankPmeTests) | ||
+endif() | ||
|
||
# Slow-running tests that target testing multiple-rank coordination behaviors | ||
# These tests are extremely slow without optimization or OpenMP, so only run them for | ||
@@ -256,6 +292,12 @@ if (CMAKE_BUILD_TYPE MATCHES "Rel" AND GMX_OPENMP) | ||
gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 1 SLOW_TEST IGNORE_LEAKS QUICK_GPU_TEST) | ||
set(testname "MdrunCoordinationBasicTests2Ranks") | ||
gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 2 SLOW_TEST IGNORE_LEAKS QUICK_GPU_TEST) | ||
+ # Because the mdrun tests depend on writing files whose names are not | ||
+ # unique across test cases, prevent CTest from running these tests | ||
+ # concurrently. See #4654 | ||
+ if (TEST MdrunCoordinationBasicTests2Ranks AND TEST MdrunCoordinationBasicTests1Rank) | ||
+ set_tests_properties(MdrunCoordinationBasicTests2Ranks PROPERTIES DEPENDS MdrunCoordinationBasicTests1Rank) | ||
+ endif() | ||
endif() | ||
|
||
set(exename "mdrun-coordination-coupling-test") | ||
@@ -274,6 +316,12 @@ if (CMAKE_BUILD_TYPE MATCHES "Rel" AND GMX_OPENMP) | ||
gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 1 SLOW_TEST IGNORE_LEAKS SLOW_GPU_TEST) | ||
set(testname "MdrunCoordinationCouplingTests2Ranks") | ||
gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 2 SLOW_TEST IGNORE_LEAKS SLOW_GPU_TEST) | ||
+ # Because the mdrun tests depend on writing files whose names are not | ||
+ # unique across test cases, prevent CTest from running these tests | ||
+ # concurrently. See #4654 | ||
+ if (TEST MdrunCoordinationCouplingTests2Ranks AND TEST MdrunCoordinationCouplingTests1Rank) | ||
+ set_tests_properties(MdrunCoordinationCouplingTests2Ranks PROPERTIES DEPENDS MdrunCoordinationCouplingTests1Rank) | ||
+ endif() | ||
endif() | ||
|
||
set(exename "mdrun-coordination-constraints-test") | ||
@@ -292,6 +340,12 @@ if (CMAKE_BUILD_TYPE MATCHES "Rel" AND GMX_OPENMP) | ||
gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 1 SLOW_TEST IGNORE_LEAKS SLOW_GPU_TEST) | ||
set(testname "MdrunCoordinationConstraintsTests2Ranks") | ||
gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 2 SLOW_TEST IGNORE_LEAKS SLOW_GPU_TEST) | ||
+ # Because the mdrun tests depend on writing files whose names are not | ||
+ # unique across test cases, prevent CTest from running these tests | ||
+ # concurrently. See #4654 | ||
+ if (TEST MdrunCoordinationConstraintsTests2Ranks AND TEST MdrunCoordinationConstraintsTests1Rank) | ||
+ set_tests_properties(MdrunCoordinationConstraintsTests2Ranks PROPERTIES DEPENDS MdrunCoordinationConstraintsTests1Rank) | ||
+ endif() | ||
endif() | ||
|
||
# Keeping the FEP tests separate for now to be able to judge runtime more easily | ||
diff --git a/src/testutils/testinit.cpp b/src/testutils/testinit.cpp | ||
index ca3ed8db2c52940a128701e2e5ae4999904a2802..5db9bb1af05631eab768c259e4e4f328e0efa7ff 100644 | ||
--- a/src/testutils/testinit.cpp | ||
+++ b/src/testutils/testinit.cpp | ||
@@ -191,7 +191,7 @@ void initTestUtils(const std::filesystem::path& dataPath, | ||
{ | ||
fprintf(stderr, | ||
"NOTE: You are running %s on %d MPI ranks, " | ||
- "but it is does not contain MPI-enabled tests. " | ||
+ "but it does not contain MPI-enabled tests. " | ||
"The test will now exit.\n", | ||
context.programName(), | ||
gmx_node_num()); |