Skip to content

Commit 67676db

Browse files
committed
Tests: Fix CUDAEnesemble verbosity tests in multi-gpu-arch systems with compute capability errors.
Closes #1278
1 parent ef24bc8 commit 67676db

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

tests/python/simulation/test_cuda_ensemble.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ def test_ensemble_verbosity_verbose(self):
649649
assert "CUDAEnsemble progress" in captured.out
650650
assert "CUDAEnsemble completed" in captured.out
651651
assert "Ensemble time elapsed" in captured.out
652-
assert captured.err == ""
652+
assert captured.err == "" or "FLAMEGPU2 has not been built with an appropriate compute capability for device" in captured.errr
653653

654654
@pytest.fixture(autouse=True)
655655
def capsys(self, capsys):

tests/test_cases/simulation/test_cuda_ensemble.cu

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ TEST(TestCUDAEnsemble, verbosity) {
426426
EXPECT_TRUE(output.find("CUDAEnsemble progress") != std::string::npos); // E.g. CUDAEnsemble progress: 1/2
427427
EXPECT_TRUE(output.find("CUDAEnsemble completed") != std::string::npos); // E.g. CUDAEnsemble completed 2 runs successfully!
428428
EXPECT_TRUE(output.find("Ensemble time elapsed") == std::string::npos); // E.g. Ensemble time elapsed: 0.006000s
429-
EXPECT_TRUE(errors.empty());
429+
// Errors should be empty but may contain compute capability warnings in mixed-architecture multi-GPU systems depending on compute capability options.
430+
EXPECT_TRUE(errors.empty() || output.find("FLAMEGPU2 has not been built with an appropriate compute capability for device"));
430431
}
431432
// Verbosity::Verbose
432433
{
@@ -444,7 +445,8 @@ TEST(TestCUDAEnsemble, verbosity) {
444445
EXPECT_TRUE(output.find("CUDAEnsemble progress") != std::string::npos); // E.g. CUDAEnsemble progress: 1/2
445446
EXPECT_TRUE(output.find("CUDAEnsemble completed") != std::string::npos); // E.g. CUDAEnsemble completed 2 runs successfully!
446447
EXPECT_TRUE(output.find("Ensemble time elapsed") != std::string::npos); // E.g. Ensemble time elapsed: 0.006000s
447-
EXPECT_TRUE(errors.empty());
448+
// Errors should be empty but may contain compute capability warnings in mixed-architecture multi-GPU systems depending on compute capability options.
449+
EXPECT_TRUE(errors.empty() || output.find("FLAMEGPU2 has not been built with an appropriate compute capability for device"));
448450
}
449451
}
450452
// Logging is more thoroughly tested in Logging. Here just make sure the methods work

0 commit comments

Comments
 (0)