Revert "Tweak PME run mode checks"
authorMark Abraham <mark.j.abraham@gmail.com>
Sat, 21 Apr 2018 16:51:16 +0000 (18:51 +0200)
committerAleksei Iupinov <a.yupinov@gmail.com>
Thu, 26 Apr 2018 12:57:02 +0000 (14:57 +0200)
This reverts commit 49ca05c7a05209845609c62f122ab7313b19dd39.

Change-Id: I412172df6832eeb0d9c7e03cc0e7e26a7c10439e

src/gromacs/ewald/pme.h
src/gromacs/mdlib/sim_util.cpp

index f50e6c1e0e6f05865ed06ee46d807eeb6ea32f5b..168baaf0369932a279872e9851162db4d3fbcde9 100644 (file)
@@ -48,8 +48,6 @@
 #ifndef GMX_EWALD_PME_H
 #define GMX_EWALD_PME_H
 
-#include "config.h"
-
 #include <string>
 
 #include "gromacs/gpu_utils/gpu_macros.h"
@@ -266,7 +264,7 @@ PmeRunMode pme_run_mode(const gmx_pme_t *pme);
  */
 inline bool pme_gpu_task_enabled(const gmx_pme_t *pme)
 {
-    return (GMX_GPU != GMX_GPU_NONE) && (pme != nullptr) && (pme_run_mode(pme) != PmeRunMode::CPU);
+    return (pme != nullptr) && (pme_run_mode(pme) != PmeRunMode::CPU);
 }
 
 // The following functions are all the PME GPU entry points,
index 04e6b6e7eded7497705832608eb540b786149159..366b265a38a649b38de31c907080c8d74781e0d6 100644 (file)
@@ -1070,7 +1070,7 @@ static void do_force_cutsVERLET(FILE *fplog, const t_commrec *cr,
     bUseGPU       = fr->nbv->bUseGPU;
     bUseOrEmulGPU = bUseGPU || (fr->nbv->emulateGpu == EmulateGpuNonbonded::Yes);
 
-    const auto pmeRunMode = ((GMX_GPU == GMX_GPU_NONE) || fr->pmedata == nullptr) ? PmeRunMode::CPU : pme_run_mode(fr->pmedata);
+    const auto pmeRunMode = fr->pmedata ? pme_run_mode(fr->pmedata) : PmeRunMode::CPU;
     // TODO slim this conditional down - inputrec and duty checks should mean the same in proper code!
     const bool useGpuPme  = EEL_PME(fr->ic->eeltype) && thisRankHasDuty(cr, DUTY_PME) &&
         ((pmeRunMode == PmeRunMode::GPU) || (pmeRunMode == PmeRunMode::Mixed));