From: Andrey Alekseenko Date: Tue, 10 Nov 2020 15:21:45 +0000 (+0100) Subject: Fix "GMX_CUDA|OCL_NB_EWALD_TWINCUT is disabling twin cut-off" X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=8b0cd85a8681bc29b681c497e41337fecf84b31f;p=alexxy%2Fgromacs.git Fix "GMX_CUDA|OCL_NB_EWALD_TWINCUT is disabling twin cut-off" --- diff --git a/src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp b/src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp index 6e0d94ca2b..0c3586f7d6 100644 --- a/src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp +++ b/src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp @@ -119,6 +119,8 @@ int nbnxn_gpu_pick_ewald_kernel_type(const interaction_const_t& ic) (getenv("GMX_GPU_NB_ANA_EWALD") != nullptr) || forceAnalyticalEwaldLegacy; const bool forceTabulatedEwald = (getenv("GMX_GPU_NB_TAB_EWALD") != nullptr) || forceTabulatedEwaldLegacy; + const bool forceTwinCutoffEwald = + (getenv("GMX_GPU_NB_EWALD_TWINCUT") != nullptr) || forceTwinCutoffEwaldLegacy; if (forceAnalyticalEwald && forceTabulatedEwald) { @@ -151,7 +153,7 @@ int nbnxn_gpu_pick_ewald_kernel_type(const interaction_const_t& ic) /* Use twin cut-off kernels if requested by bTwinCut or the env. var. forces it (use it for debugging/benchmarking only). */ - if (!bTwinCut && ((getenv("GMX_GPU_NB_EWALD_TWINCUT") == nullptr) || forceTwinCutoffEwaldLegacy)) + if (!bTwinCut && !forceTwinCutoffEwald) { kernel_type = bUseAnalyticalEwald ? eelTypeEWALD_ANA : eelTypeEWALD_TAB; }