Remove deprecated env. vars GMX_OCL_NB_ANA_EWALD etc
authorAndrey Alekseenko <al42and@gmail.com>
Tue, 2 Feb 2021 13:33:20 +0000 (14:33 +0100)
committerAndrey Alekseenko <al42and@gmail.com>
Tue, 2 Feb 2021 13:33:20 +0000 (14:33 +0100)
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

docs/release-notes/2022/major/removed-functionality.rst
src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp

index 70ac8ac1ee19fbb9423dcb419f2d4ca82f34df1b..95d7cc20e88be1471207a5dc6cb84ee6e9dc623a 100644 (file)
@@ -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`
index ba869da29a8611ea7d6ad6e7203bbbea96d0467c..114d758353a5a9c3231416001910520ef45ac0b2 100644 (file)
@@ -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)
     {