From f334e790c53d8cbbc2169d5f1922f3312d1d3dfb Mon Sep 17 00:00:00 2001 From: Andrey Alekseenko Date: Tue, 2 Feb 2021 14:33:20 +0100 Subject: [PATCH] Remove deprecated env. vars GMX_OCL_NB_ANA_EWALD etc The following environment variables were deprecated in 2021, and are being removed: GMX_CUDA_NB_ANA_EWALD GMX_OCL_NB_ANA_EWALD GMX_CUDA_NB_TAB_EWALD GMX_OCL_NB_TAB_EWALD GMX_CUDA_NB_EWALD_TWINCUT GMX_OCL_NB_EWALD_TWINCUT Closes #3803 --- .../2022/major/removed-functionality.rst | 12 +++++++ src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp | 36 ++----------------- 2 files changed, 15 insertions(+), 33 deletions(-) diff --git a/docs/release-notes/2022/major/removed-functionality.rst b/docs/release-notes/2022/major/removed-functionality.rst index 70ac8ac1ee..95d7cc20e8 100644 --- a/docs/release-notes/2022/major/removed-functionality.rst +++ b/docs/release-notes/2022/major/removed-functionality.rst @@ -31,3 +31,15 @@ This platform is nearly dead and is no longer supported. The KNL platform is unaffected by this change. :issue:`3891` + +Removed deprecated environment variables +"""""""""""""""""""""""""""""""""""""""" + +The following environment variables were removed after being deprecated +in favor of better-named alternatives: + +* ``GMX_CUDA_NB_ANA_EWALD`` and ``GMX_OCL_NB_ANA_EWALD`` (use ``GMX_GPU_NB_ANA_EWALD``) +* ``GMX_CUDA_NB_TAB_EWALD`` and ``GMX_OCL_NB_TAB_EWALD`` (use ``GMX_GPU_NB_TAB_EWALD``) +* ``GMX_CUDA_NB_EWALD_TWINCUT`` and ``GMX_OCL_NB_EWALD_TWINCUT`` (use ``GMX_GPU_NB_EWALD_TWINCUT``) + +:issue:`3803` diff --git a/src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp b/src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp index ba869da29a..114d758353 100644 --- a/src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp +++ b/src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp @@ -84,20 +84,6 @@ void init_ewald_coulomb_force_table(const EwaldCorrectionTables& tables, &nbp->coulomb_tab, &nbp->coulomb_tab_texobj, tables.tableF.data(), tables.tableF.size(), deviceContext); } -void inline printEnvironmentVariableDeprecationMessage(bool isEnvironmentVariableSet, - const std::string& environmentVariableSuffix) -{ - if (isEnvironmentVariableSet) - { - fprintf(stderr, - "Environment variables GMX_CUDA_%s and GMX_OCL_%s are deprecated and will be\n" - "removed in release 2022, please use GMX_GPU_%s instead.", - environmentVariableSuffix.c_str(), - environmentVariableSuffix.c_str(), - environmentVariableSuffix.c_str()); - } -} - enum ElecType nbnxn_gpu_pick_ewald_kernel_type(const interaction_const_t& ic, const DeviceInformation gmx_unused& deviceInfo) { @@ -105,25 +91,9 @@ enum ElecType nbnxn_gpu_pick_ewald_kernel_type(const interaction_const_t& ic, /* Benchmarking/development environment variables to force the use of analytical or tabulated Ewald kernel. */ - - // Remove these when old environment variables are deprecated - const bool forceAnalyticalEwaldLegacy = (getenv("GMX_CUDA_NB_ANA_EWALD") != nullptr) - || (getenv("GMX_OCL_NB_ANA_EWALD") != nullptr); - const bool forceTabulatedEwaldLegacy = (getenv("GMX_CUDA_NB_TAB_EWALD") != nullptr) - || (getenv("GMX_OCL_NB_TAB_EWALD") != nullptr); - const bool forceTwinCutoffEwaldLegacy = (getenv("GMX_CUDA_NB_EWALD_TWINCUT") != nullptr) - || (getenv("GMX_OCL_NB_EWALD_TWINCUT") != nullptr); - - printEnvironmentVariableDeprecationMessage(forceAnalyticalEwaldLegacy, "NB_ANA_EWALD"); - printEnvironmentVariableDeprecationMessage(forceTabulatedEwaldLegacy, "NB_TAB_EWALD"); - printEnvironmentVariableDeprecationMessage(forceTwinCutoffEwaldLegacy, "NB_EWALD_TWINCUT"); - - const bool forceAnalyticalEwald = - (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; + const bool forceAnalyticalEwald = (getenv("GMX_GPU_NB_ANA_EWALD") != nullptr); + const bool forceTabulatedEwald = (getenv("GMX_GPU_NB_TAB_EWALD") != nullptr); + const bool forceTwinCutoffEwald = (getenv("GMX_GPU_NB_EWALD_TWINCUT") != nullptr); if (forceAnalyticalEwald && forceTabulatedEwald) { -- 2.22.0