Remove support for Intel classic compiler
[alexxy/gromacs.git] / src / gromacs / utility / gmxomp.cpp
index fb943100eeeda15f473ba3f4aba3a5f43d04255f..d606c5b489efb60a349f2586153273185254fe58 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 2012,2013,2014,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
@@ -104,7 +104,7 @@ gmx_bool gmx_omp_check_thread_affinity(char** message)
     /* We assume that the affinity setting is available on all platforms
      * gcc supports. Even if this is not the case (e.g. Mac OS) the user
      * will only get a warning. */
-#    if defined(__GNUC__) || defined(__INTEL_COMPILER)
+#    if defined(__GNUC__)
     const char* programName;
     try
     {
@@ -132,31 +132,7 @@ gmx_bool gmx_omp_check_thread_affinity(char** message)
         GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR
         shouldSetAffinity = false;
     }
-#    endif /* __GNUC__ || __INTEL_COMPILER */
-
-#    if defined(__INTEL_COMPILER)
-    const char* const kmp_env         = getenv("KMP_AFFINITY");
-    const bool        bKmpAffinitySet = (kmp_env != NULL);
-
-    // turn off internal pinning if KMP_AFFINITY is set but does not contain
-    // the settings 'disabled' or 'none'.
-    if (bKmpAffinitySet && (strstr(kmp_env, "disabled") == NULL) && (strstr(kmp_env, "none") == NULL))
-    {
-        try
-        {
-            std::string buf = gmx::formatString(
-                    "NOTE: KMP_AFFINITY set, will turn off %s internal affinity\n"
-                    "      setting as the two can conflict and cause performance degradation.\n"
-                    "      To keep using the %s internal affinity setting, unset the\n"
-                    "      KMP_AFFINITY environment variable or set it to 'none' or 'disabled'.",
-                    programName,
-                    programName);
-            *message = gmx_strdup(buf.c_str());
-        }
-        GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
-        shouldSetAffinity = false;
-    }
-#    endif /* __INTEL_COMPILER */
+#    endif /* __GNUC__ */
 
 #endif /* GMX_OPENMP */
     return shouldSetAffinity;