Stop testing that hwloc cache-size detection works properly
authorMark Abraham <mark.j.abraham@gmail.com>
Sat, 16 Nov 2019 20:04:30 +0000 (21:04 +0100)
committerPaul Bauer <paul.bauer.q@gmail.com>
Sat, 16 Nov 2019 21:47:17 +0000 (22:47 +0100)
This was never a unit test of whether GROMACS HardwareTopology can
detect cache line size, because it requires both that hwloc works
correctly on the execution hardware, and that GROMACS code uses its
results correctly. So we should stop running such tests.

Refs #3205

Change-Id: I4d13e39620335b235f9969e5e09299fb9b41b1a0

src/gromacs/hardware/tests/hardwaretopology.cpp

index f8bebdd2e66514c16326665d623ebd65df070a4f..537807bd65180a139c4040f00d95754cad318349 100644 (file)
@@ -205,12 +205,18 @@ TEST(HardwareTopologyTest, NumaCacheSelfconsistency)
             }
         }
 
-        // Check cache. The hwloc cache detection is fragile and can report
-        // 0 for line size or associativity (=unknown), so we just check the size.
-        for (auto& c : hwTop.machine().caches)
-        {
-            EXPECT_GT(c.size, 0);
-        }
+        // We don't check cache fields because these tests depend both
+        // on whether hwloc can detect things correctly, and then
+        // whether GROMACS code packages the results correctly. The
+        // hwloc cache detection is fragile and can report 0 for cache
+        // size, line size or associativity (=unknown), so GROMACS
+        // doesn't test anything related to it.
+        //
+        // TODO Use proper unit tests on mock hardware to test that
+        // HardwareTopology construction is doing its job, rather than
+        // brittle tests that require that hwloc works correctly on
+        // the user's hardware even when GROMACS is barely using the
+        // values returned by hwloc.
     }
 }