Improved diagnostics when PME cannot run on GPUs
[alexxy/gromacs.git] / src / programs / mdrun / tests / pmetest.cpp
index c2c734c53d049c2f4be81f49cb83dca96739eeab..960ccbf276b7cae493b6d6f9cab372dac221f9e0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -147,7 +147,9 @@ void PmeTest::runTest(const RunModesList &runModes)
             continue;
         }
         auto modeTargetsPmeOnGpus = (mode.first.find("PmeOnGpu") != std::string::npos);
-        if (modeTargetsPmeOnGpus && !pme_gpu_supports_build(*hardwareInfo_, nullptr))
+        if (modeTargetsPmeOnGpus &&
+            !(pme_gpu_supports_build(nullptr) &&
+              pme_gpu_supports_hardware(*hardwareInfo_, nullptr)))
         {
             // This run mode will cause a fatal error from mdrun when
             // it finds an unsuitable device, which is not something