Remove support for Intel classic compiler
authorMark Abraham <mark.j.abraham@gmail.com>
Wed, 3 Feb 2021 10:44:20 +0000 (10:44 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Wed, 3 Feb 2021 10:44:20 +0000 (10:44 +0000)
This compiler has sometimes generated the fastest code, but also most
often generated the wrong code of any supported compiler. Since Intel
now has another clang-based compiler that they are targetting for GPU
support in oneAPI, we've chosen to support it. Our resources are
limited so something else has to go.

Minor improvements to the install guide while I was there.

Added a fatal error to CMake as otherwise we will get bug reports that
icc doesn't work.

Added release notes

Fixes #3893

38 files changed:
admin/containers/scripted_gmx_docker_builds.py
admin/containers/utility.py
admin/gitlab-ci/global.gitlab-ci.yml
admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml
admin/gitlab-ci/gromacs.matrix/gromacs.icc-2021.1.gitlab-ci.yml [deleted file]
api/CMakeLists.txt
api/legacy/include/gromacs/utility/basedefinitions.h
api/legacy/include/gromacs/utility/current_function.h
cmake/FindLibStdCpp.cmake
cmake/Platform/XeonPhi.cmake [deleted file]
cmake/gmxCFlags.cmake
cmake/gmxManageFFTLibraries.cmake
cmake/gmxManageLinearAlgebraLibraries.cmake
cmake/gmxManageSimd.cmake
cmake/gmxSimdFlags.cmake
cmake/gmxTestCompilerProblems.cmake
docs/install-guide/index.rst
docs/release-notes/2022/major/portability.rst
docs/user-guide/mdrun-performance.rst
src/gromacs/compat/pointers.h
src/gromacs/compat/tests/pointers.cpp
src/gromacs/ewald/tests/pmetestcommon.cpp
src/gromacs/gmxana/nsfactor.cpp
src/gromacs/hardware/prepare_detection.cpp
src/gromacs/listed_forces/tests/bonded.cpp
src/gromacs/mdlib/ebin.cpp
src/gromacs/mdlib/update.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/nbnxm/opencl/nbnxm_ocl_kernel_utils.clh
src/gromacs/nbnxm/pairlist.cpp
src/gromacs/pulling/pullutil.cpp
src/gromacs/random/gammadistribution.h
src/gromacs/selection/scanner.cpp
src/gromacs/selection/scanner.l
src/gromacs/simd/tests/simd_floatingpoint_util.cpp
src/gromacs/timing/wallcycle.cpp
src/gromacs/utility/gmxomp.cpp
src/testutils/testinit.cpp

index 2e3bb6a1e26fedb20314bd816a23c8d9b834fda7..8909402507095578823dbb3252b487e5a7371fd7 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2020, by the GROMACS development team, led by
+# Copyright (c) 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.
@@ -207,9 +207,6 @@ def get_opencl_packages(args) -> typing.Iterable[str]:
 
 def get_compiler(args, compiler_build_stage: hpccm.Stage = None) -> bb_base:
     # Compiler
-    if args.icc is not None:
-        raise RuntimeError('Intel compiler toolchain recipe not implemented yet')
-
     if args.llvm is not None:
         # Build our own version instead to get TSAN + OMP
         if args.tsan is not None:
@@ -226,8 +223,8 @@ def get_compiler(args, compiler_build_stage: hpccm.Stage = None) -> bb_base:
             compiler = compiler_build_stage.runtime(_from='oneapi')
             # Prepare the toolchain (needed only for builds done within the Dockerfile, e.g.
             # OpenMPI builds, which don't currently work for other reasons)
-            oneapi_toolchain = hpccm.toolchain(CC='/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icc',
-                                               CXX='/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icpc')
+            oneapi_toolchain = hpccm.toolchain(CC='/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icx',
+                                               CXX='/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icpx')
             setattr(compiler, 'toolchain', oneapi_toolchain)
 
         else:
@@ -330,9 +327,6 @@ def add_oneapi_compiler_build_stage(input_args, output_stages: typing.Mapping[st
     This stage is isolated so that its installed components are minimized in the
     final image (chiefly /opt/intel) and its environment setup script can be
     sourced. This also helps with rebuild time and final image size.
-
-    Note that the ICC compiler inside oneAPI on linux also needs
-    gcc to build other components and provide libstdc++.
     """
     if not isinstance(output_stages, collections.abc.MutableMapping):
         raise RuntimeError('Need output_stages container.')
@@ -347,7 +341,7 @@ def add_oneapi_compiler_build_stage(input_args, output_stages: typing.Mapping[st
         apt_keys=['https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB'],
         apt_repositories=['deb https://apt.repos.intel.com/oneapi all main'],
         # Add minimal packages (not the whole HPC toolkit!)
-        ospackages=['intel-oneapi-dpcpp-cpp-{}'.format(version),
+        ospackages=['intel-oneapi-dpcpp-{}'.format(version),
             'intel-oneapi-openmp-{}'.format(version),
             'intel-oneapi-mkl-{}'.format(version),
             'intel-oneapi-mkl-devel-{}'.format(version)]
index 47e943e0526090040f307b5603a8bdd4347e5392..5f5a79ca42a9b8af1f2beb1a028cec972c4a3c88 100644 (file)
@@ -96,9 +96,6 @@ compiler_group.add_argument('--gcc', type=int, nargs='?', const=7, default=7,
 compiler_group.add_argument('--llvm', type=str, nargs='?', const='7', default=None,
                             help='Select LLVM compiler tool chain. '
                                  'Some checking is implemented to avoid incompatible combinations')
-compiler_group.add_argument('--icc', type=int, nargs='?', const=19, default=None,
-                            help='Select Intel compiler tool chain. '
-                                 'Some checking is implemented to avoid incompatible combinations')
 # TODO currently the installation merely gets the latest beta version of oneAPI,
 # not a specific version. GROMACS probably doesn't need to address that until
 # oneAPI makes an official release. Also, the resulting container is a mix
@@ -155,7 +152,7 @@ def image_name(configuration: argparse.Namespace) -> str:
         if version is not None:
             elements.append(distro + '-' + version)
             break
-    for compiler in ('icc', 'llvm', 'gcc'):
+    for compiler in ('llvm', 'gcc'):
         version = getattr(configuration, compiler, None)
         if version is not None:
             elements.append(compiler + '-' + str(version).split('.')[0])
index ffa7d3a21077c62102ffb95d60a0120fe67c7dda..96dcd9ae14bcd205a774679a37f886d5887927ab 100644 (file)
@@ -79,7 +79,7 @@
 # Base definition for using oneAPI.
 .use-oneapi:base:
   variables:
-    # Use the HPC variants of icc and icpc so that OpenMP is active
+    # Use the HPC clang-based compiler variants so that OpenMP is active
     CMAKE_COMPILER_SCRIPT: -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_INCLUDE_PATH=/opt/intel/oneapi/compiler/latest/linux/include/sycl -DCMAKE_PREFIX_PATH=/opt/intel/oneapi/compiler/latest/linux
     CMAKE_EXTRA_OPTIONS: -DGMX_FFT_LIBRARY=mkl
   before_script:
     - mkdir -p ccache
     - export CCACHE_BASEDIR=${PWD}
     - export CCACHE_DIR=${PWD}/ccache
-
-# Base definition for using the classic Intel compiler
-.use-icc-oneapi:base:
-  variables:
-    CMAKE_COMPILER_SCRIPT: -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc #-DCMAKE_PREFIX_PATH=/opt/intel/oneapi/compiler/latest/linux
-    CMAKE_EXTRA_OPTIONS: -DGMX_FFT_LIBRARY=mkl
-  before_script:
-    # Necessary to override gitlab default 'set -e' which breaks Intel's
-    # setvar.sh script
-    - set +e
-    - source /opt/intel/oneapi/setvars.sh
-    - set -e
-    - mkdir -p ccache
-#    - export CCACHE_BASEDIR=${PWD}
-#    - export CCACHE_DIR=${PWD}/ccache
index 4a7e1aeb5637b826eac6503ba089e4cce043ba0a..c43740e875d05eb7fda8bbd2872d69f76b08227a 100644 (file)
@@ -269,7 +269,6 @@ include:
   - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-8-cuda-11.0.gitlab-ci.yml'
   - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-8-cuda-11.0-release.gitlab-ci.yml'
   - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-9-release.gitlab-ci.yml'
-  - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.icc-2021.1.gitlab-ci.yml'
   - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.oneapi-2021.1.1-opencl.gitlab-ci.yml'
   - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.oneapi-2021.1.1-opencl-release.gitlab-ci.yml'
   - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.oneapi-2021.1.1-sycl.gitlab-ci.yml'
diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.icc-2021.1.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.icc-2021.1.gitlab-ci.yml
deleted file mode 100644 (file)
index 849eb19..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# Test goal: Newest ICC CPU-only build
-# Test intents (should change rarely and conservatively):
-#   OS: Ubuntu oldest supported
-#   Compiler: ICC newest supported
-#   FFT: MKL
-#   GPU: no
-#   Scope: configure, build, unit tests, regression tests
-# Test implementation choices (free to change as needed):
-#   OS: Ubuntu 18.04
-#   Build type: Debug
-#   Compiler: ICC 2021.1
-#   MPI: thread_MPI
-#   SIMD: AVX2_256
-#   Parallelism nt/ntomp: 4/2
-
-gromacs:icc-2021.1:configure:
-  # Test SIMD: AVX2_256
-  # Test FFT: MKL
-  # Test scope: configure
-  extends:
-   - .gromacs:base:configure
-   - .use-icc-oneapi:base
-   - .rules:merge-and-post-merge-acceptance
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1.1
-  variables:
-    CMAKE: /usr/local/cmake-3.17.2/bin/cmake
-    COMPILER_MAJOR_VERSION: 2021
-
-gromacs:icc-2021.1:build:
-  extends:
-    - .variables:default
-    - .gromacs:base:build
-    - .use-icc-oneapi:base
-    - .rules:post-merge-acceptance
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1.1
-  variables:
-    CMAKE: /usr/local/cmake-3.17.2/bin/cmake
-  needs:
-    - job: gromacs:icc-2021.1:configure
-
-gromacs:icc-2021.1:test:
-  extends:
-    - .gromacs:base:test
-    - .use-icc-oneapi:base
-    - .rules:post-merge-acceptance
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1.1
-  variables:
-    CMAKE: /usr/local/cmake-3.17.2/bin/cmake
-  needs:
-    - job: gromacs:icc-2021.1:build
-
-gromacs:icc-2021.1:regressiontest:
-  extends:
-    - .gromacs:base:regressiontest
-    - .use-icc-oneapi:base
-    - .rules:post-merge-acceptance
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1.1
-  variables:
-    CMAKE: /usr/local/cmake-3.17.2/bin/cmake
-  needs:
-    - job: gromacs:icc-2021.1:build
-    - job: regressiontests:prepare
-
index a2f0763236eff788cf4ba7291c4f5d178f18e460..5773bbf265b33edb3aa49d78ff5f83392866b45c 100644 (file)
@@ -50,10 +50,9 @@ if (GMXAPI)
 endif()
 
 # Activate targets NBLIB
-if(GMX_NATIVE_WINDOWS OR NOT BUILD_SHARED_LIBS OR CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+if(GMX_NATIVE_WINDOWS OR NOT BUILD_SHARED_LIBS)
     # NBLIB has not been tested in Microsoft environments.
     # NBLIB requires position-independent code
-    # NBLIB causes an ICE in icc 19.1.2.20200623
     set(_NBLIB_DEFAULT OFF)
 else()
     set(_NBLIB_DEFAULT ON)
index bfb155651abac78b7e354662b12245f91064b67b..c5d82d01794b9368ba52dfa50adb7ef6c1a8aa5f 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
  * Copyright (c) 2013,2014,2015,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,10 +104,7 @@ index ssize(const T& t)
  */
 #ifndef gmx_unused
 #    ifdef __GNUC__
-/* GCC, clang, and some ICC pretending to be GCC */
-#        define gmx_unused __attribute__((unused))
-#    elif (defined(__INTEL_COMPILER) || defined(__ECC)) && !defined(_MSC_VER)
-/* ICC on *nix */
+/* GCC, clang, and any pretending to be or based on them */
 #        define gmx_unused __attribute__((unused))
 #    elif defined(__PGI)
 /* Portland group compilers */
@@ -170,18 +167,6 @@ index ssize(const T& t)
 #    define MSVC_DIAGNOSTIC_RESET
 #endif
 
-#ifdef __INTEL_COMPILER
-//! Ignore unused loop variable warning - it was used until the compiler removes the use!
-#    define DO_PRAGMA(x) _Pragma(#    x)
-#    define INTEL_DIAGNOSTIC_IGNORE(id) DO_PRAGMA(warning push) DO_PRAGMA(warning(disable : id))
-#    define INTEL_DIAGNOSTIC_RESET DO_PRAGMA(warning pop)
-#else
-//! Ignore specified diagnostic message from Intel compiler.
-#    define INTEL_DIAGNOSTIC_IGNORE(id)
-//! Reset the diagnostic message setting.
-#    define INTEL_DIAGNOSTIC_RESET
-#endif
-
 namespace gmx
 {
 namespace internal
index e7718893285984e1190c680191db9093d3ead6d3..2d5aef4f60737f14214763bb2cd7521e46cb9ab2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2015,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.
@@ -85,8 +85,7 @@ inline void current_function_helper()
 
 #    define GMX_CURRENT_FUNCTION __FUNCSIG__
 
-#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) \
-        || (defined(__IBMCPP__) && (__IBMCPP__ >= 500))
+#elif (defined(__IBMCPP__) && (__IBMCPP__ >= 500))
 
 #    define GMX_CURRENT_FUNCTION __FUNCTION__
 
index f3566fe0ca871d00e7a85868430fd101bce95e98..7bc75c467bc87b12df0f6ae84b5e0a347bc1d2ea 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2019,2020, by the GROMACS development team, led by
+# Copyright (c) 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.
@@ -128,10 +128,6 @@ if(NEED_TO_FIND_GPLUSPLUS)
             message(FATAL_ERROR "${GMX_GPLUSPLUS_PATH}/include/c++ doesn't exist even though it should. "
                 "Please report to developers.")
         endif()
-    else() #Intel
-        if (${GMX_GPLUSPLUS_VERSION} VERSION_GREATER_EQUAL 7 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
-            message(FATAL_ERROR "ICC versions below 19 don't support GCC versions above 6.")
-        endif ()
     endif()
 
     # Set up to use the libstdc++ from that g++. Note that we checked
@@ -139,8 +135,6 @@ if(NEED_TO_FIND_GPLUSPLUS)
     # we will not override any user settings here.
     if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${GMX_GPLUSPLUS_PATH}")
-    else() #Intel
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gcc-name=${GMX_GPLUSPLUS_PATH}")
     endif()
 endif()
 
diff --git a/cmake/Platform/XeonPhi.cmake b/cmake/Platform/XeonPhi.cmake
deleted file mode 100644 (file)
index a23feaf..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# This file is part of the GROMACS molecular simulation package.
-#
-# Copyright (c) 2014,2015, 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.
-#
-# GROMACS is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# as published by the Free Software Foundation; either version 2.1
-# of the License, or (at your option) any later version.
-#
-# GROMACS is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with GROMACS; if not, see
-# http://www.gnu.org/licenses, or write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
-#
-# If you want to redistribute modifications to GROMACS, please
-# consider that scientific software is very special. Version
-# control is crucial - bugs must be traceable. We will be happy to
-# consider code for inclusion in the official distribution, but
-# derived work must not be called official GROMACS. Details are found
-# in the README & COPYING files - if they are missing, get the
-# official version at http://www.gromacs.org.
-#
-# To help us fund GROMACS development, we humbly ask that you cite
-# the research papers on the package. Check out http://www.gromacs.org.
-
-set(CMAKE_SYSTEM_NAME Linux)
-set(CMAKE_SYSTEM_PROCESSOR XeonPhi)
-if(NOT GMX_MPI)
-    set(CMAKE_C_COMPILER "icc")
-    set(CMAKE_CXX_COMPILER "icpc")
-else()
-    set(CMAKE_C_COMPILER "mpiicc") #FindMPI doesn't work (#14991)
-    set(CMAKE_CXX_COMPILER "mpiicpc")
-endif()
index 5336d1aa971bfc3ab15dec2181972133ac5b84c5..12367175ef4d1432d24cb087ccd3f27f859f4099 100644 (file)
@@ -256,88 +256,6 @@ macro (gmx_c_flags)
         GMX_TEST_CXXFLAG(CXXFLAGS_NOINLINE "-fno-inline" GMXC_CXXFLAGS_DEBUG)
     endif()
 
-    # icc
-    if (CMAKE_C_COMPILER_ID MATCHES "Intel")
-        if (NOT WIN32)
-            if(NOT GMX_OPENMP)
-# 3180: unrecognized OpenMP #pragma
-                GMX_TEST_CFLAG(CFLAGS_PRAGMA "-wd3180" GMXC_CFLAGS)
-            endif()
-            if (GMX_COMPILER_WARNINGS)
-# -w3 enables a lot of useful diagnostics but we don't care about all. -wd disables some selectively.
-# 177: function/variable ".." was declared but never referenced
-# 280: selector expression is constant
-# 411: class defines no constructor to initialize the following (incorrect for struct, initializer list works)
-# 593: variable ".." was set but never used
-# 981: operands are evaluated in unspecified order
-#1418: external function definition with no prior declaration
-#1419: external declaration in primary source file
-#1572: floating-point equality and inequality comparisons are unreliable
-#1599: declaration hides variable ".."
-#2259: non-pointer conversion from ".." to ".." may lose significant bits
-#2415: variable ".." of static storage duration was declared but never referenced
-#2547: ".." was specified as both a system and non-system include directory
-#2557: comparison between signed and unsigned operands
-#3280: declaration hides member ".."
-#11074: Inlining inhibited by limit max-size(/max-total-size)
-#11076: To get full report use -opt-report=3 -opt-report-phase ipo (shown for previous remark)
-                GMX_TEST_CFLAG(CFLAGS_WARN "-w3;-wd177;-wd280;-wd411;-wd593;-wd981;-wd1418;-wd1419;-wd1572;-wd1599;-wd2259;-wd2415;-wd2547;-wd2557;-wd3280;-wd11074;-wd11076" GMXC_CFLAGS)
-            endif()
-            GMX_TEST_CFLAG(CFLAGS_STDGNU "-std=gnu99" GMXC_CFLAGS)
-            GMX_TEST_CFLAG(CFLAGS_OPT "-ip;-funroll-all-loops;-alias-const;-ansi-alias;-no-prec-div;-fimf-domain-exclusion=14;-qoverride-limits" GMXC_CFLAGS_RELEASE)
-            GMX_TEST_CFLAG(CFLAGS_DEBUG "-O0" GMXC_CFLAGS_DEBUG) #icc defaults to -O2 even with -g
-            # The "except" fp-model requires something other than the
-            # default "fast" model, so we test and use it with
-            # "precise".
-            GMX_TEST_CFLAG(CFLAGS_FP_MODEL_RELASSERT "-fp-model=except;-fp-model=precise" GMXC_CFLAGS_RELWITHASSERT)
-        else()
-            if(NOT GMX_OPENMP)
-                GMX_TEST_CFLAG(CFLAGS_PRAGMA "/wd3180" GMXC_CFLAGS)
-            endif()
-            if (GMX_COMPILER_WARNINGS)
-#only on Windows
-#161: unrecognized pragma
-#1786 function was declared deprecated (is issued for stdlib function such as strncpy which have a _s version)
-GMX_TEST_CFLAG(CFLAGS_WARN "/W3;/wd161;/wd177;/wd411;/wd593;/wd981;/wd1418;/wd1419;/wd1572;/wd1599;/wd1786;/wd2259;/wd2415;/wd2547;/wd2557;/wd3280" GMXC_CFLAGS)
-            endif()
-            GMX_TEST_CFLAG(CFLAGS_OPT "/Qip" GMXC_CFLAGS_RELEASE)
-        endif()
-    endif()
-
-    if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
-        if (NOT WIN32) 
-            if(NOT GMX_OPENMP)
-                GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-wd3180" GMXC_CXXFLAGS)
-            endif()
-            if (GMX_COMPILER_WARNINGS)
-#All but the following warnings are identical for the C-compiler (see above)
-# 304: access control not specified
-# 383: value copied to temporary, reference to temporary used
-# 444: destructor for base class ".." is not virtual
-# 869: was never referenced (false positives)
-#2282: unrecognized GCC pragma
-#2621: attribute "unused" does not apply here
-                GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-w3;-wd177;-wd280;-wd304;-wd383;-wd411;-wd444;-wd869;-wd981;-wd1418;-wd1572;-wd1599;-wd2259;-wd2547;-wd2621;-wd3280;-wd11074;-wd11076;-wd2282" GMXC_CXXFLAGS)
-            endif()
-            GMX_TEST_CXXFLAG(CXXFLAGS_OPT "-ip;-funroll-all-loops;-alias-const;-ansi-alias;-no-prec-div;-fimf-domain-exclusion=14;-qoverride-limits" GMXC_CXXFLAGS_RELEASE)
-            GMX_TEST_CXXFLAG(CXXFLAGS_DEBUG "-O0" GMXC_CXXFLAGS_DEBUG)
-            # The "except" fp-model requires something other than the
-            # default "fast" model, so we test and use it with
-            # "precise".
-            GMX_TEST_CXXFLAG(CXXFLAGS_FP_MODEL_RELASSERT "-fp-model=except;-fp-model=precise" GMXC_CXXFLAGS_RELWITHASSERT)
-        else()
-            if(NOT GMX_OPENMP)
-                GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "/wd3180" GMXC_CFLAGS)
-            endif()
-            if (GMX_COMPILER_WARNINGS)
-#161: unrecognized pragma
-#809: exception specification for virtual function X is incompatible with that of overridden function
-                GMX_TEST_CXXFLAG(CXXFLAGS_WARN "/W3;/wd161;/wd177;/wd280;/wd304;/wd383;/wd411;/wd444;/wd809;/wd869;/wd981;/wd1418;/wd1572;/wd1599;/wd1786;/wd2259;/wd2547;/wd3280;/wd11074;/wd11076;/wd2282" GMXC_CXXFLAGS)
-            endif()
-            GMX_TEST_CXXFLAG(CXXFLAGS_OPT "/Qip" GMXC_CXXFLAGS_RELEASE)
-        endif()
-    endif()
-
     # PGI
     # Inter-procedural analysis causes pgcc/pgc++ to crash when linking the library with PGI release 15.7.
     if (CMAKE_C_COMPILER_ID MATCHES "PGI")
index f59e011ecc86f7f72d27d668424ce369b5c0e6ec..6f92a5f24cb90fbc921d48054c6aa0052c646b69 100644 (file)
@@ -2,7 +2,7 @@
 # This file is part of the GROMACS molecular simulation package.
 #
 # Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
-# Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+# Copyright (c) 2017,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.
@@ -42,9 +42,7 @@ set(PKG_FFT_LIBS "")
 # all their stuff. It's not easy if you only want some of their
 # stuff...
 set(MKL_MANUALLY FALSE)
-if (GMX_FFT_LIBRARY STREQUAL "MKL" AND
-    NOT ((CMAKE_C_COMPILER_ID MATCHES "Intel" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "11")
-         OR GMX_ICC_NEXTGEN))
+if (GMX_FFT_LIBRARY STREQUAL "MKL" AND NOT GMX_ICC_NEXTGEN)
     # The user will have to provide the set of magic libraries in
     # MKL_LIBRARIES (see below), which we cache (non-advanced), so that they
     # don't have to keep specifying it, and can easily see that
@@ -128,7 +126,7 @@ if(${GMX_FFT_LIBRARY} STREQUAL "FFTW3")
 
     set(FFT_LIBRARIES ${${FFTW}_LIBRARIES})
 elseif(${GMX_FFT_LIBRARY} STREQUAL "MKL")
-    # Intel 11 and up makes life somewhat easy if you just want to use
+    # Intel compilers make life somewhat easy if you just want to use
     # all their stuff. It's not easy if you only want some of their
     # stuff...
     if (NOT MKL_MANUALLY)
index bb5a5e61655e5ff2bd9227cb92f633914353f5fc..56ea29e1e82f207ca8833f14a7a15d62f37795a8 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013,2014,2016,2020, by the GROMACS development team, led by
+# Copyright (c) 2013,2014,2016,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.
@@ -153,7 +153,7 @@ endmacro()
 # these. If the libraries are not in a standard location, the user can
 # indicate a search path with CMAKE_PREFIX_PATH.
 #
-# However, if we are using icc+mkl (so a build command that includes
+# However, if we are using icpx+mkl (so a build command that includes
 # -mkl), then it is probably painful to try to link some other BLAS or
 # LAPACK. In that case, we use the BLAS & LAPACK provided by MKL. In
 # principle, we could offer a more configurable behaviour if/when
index 822becc94041f0f70784bf8a40d614f5800c2522..bccdfb44c7de53f89629e39796d7a4957bb16e04 100644 (file)
@@ -390,8 +390,8 @@ endif()
 
 # By default, 32-bit windows cannot pass SIMD (SSE/AVX) arguments in registers,
 # and even on 64-bit (all platforms) it is only used for a handful of arguments.
-# The __vectorcall (MSVC, from MSVC2013) or __regcall (ICC) calling conventions
-# enable this, which is critical to enable 32-bit SIMD and improves performance
+# The __vectorcall (MSVC, from MSVC2013) calling convention
+# enables this, which is critical to enable 32-bit SIMD and improves performance
 # for 64-bit SIMD.
 # Check if the compiler supports one of these, and in that case set gmx_simdcall
 # to that string. If we do not have any such calling convention modifier, set it
index 1b09d525213c860ebe11b7cab48b53f57731a828..18aa29a9a5d050e0994d301ab670f4be9cb8b816 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+# Copyright (c) 2017,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.
@@ -219,27 +219,12 @@ endfunction()
 # AVX2
 function(gmx_find_simd_avx2_flags C_FLAGS_RESULT CXX_FLAGS_RESULT C_FLAGS_VARIABLE CXX_FLAGS_VARIABLE)
     find_x86_toolchain_flags(TOOLCHAIN_C_FLAGS TOOLCHAIN_CXX_FLAGS)
-    # For our "AVX2_256" support we would ideally want to enable the instructions
-    # we want to use, '-mavx2 -mfma'. icc (v16-18) does not allow doing that and
-    # instead, it requires the '-march=core-avx2' flag to be used. Annoyingly, it does
-    # however accept the former flags but it is not silent about it issuing warnings
-    # that can't be disabled.
-    # At the same time Intel's -march=core-avx2 flag is not rejected by gcc/clang either
-    # (though they're at least silent). However, -march=core-avx2 is an undocumented
-    # flag with unclear behavior in gcc/clang (and might enable some arch-specific optimizations).
-    # For this reason, and because we can't distinguish compilers just based on checking flag
-    # compatibility, we need to treat the Intel and gcc/clang separately.
-    if (CMAKE_C_COMPILER_ID MATCHES "Intel")
-        set(TOOLCHAIN_FLAG_FOR_AVX2 "-march=core-avx2")
-    else()
-        set(TOOLCHAIN_FLAG_FOR_AVX2 "-mavx2 -mfma")
-    endif()
     gmx_find_flags(SIMD_AVX2_C_FLAGS_RESULT SIMD_AVX2_CXX_FLAGS_RESULT
         "#include<immintrin.h>
 int main(){__m256i x=_mm256_set1_epi32(5);x=_mm256_add_epi32(x,x);return _mm256_movemask_epi8(x);}"
         TOOLCHAIN_C_FLAGS TOOLCHAIN_CXX_FLAGS
         SIMD_AVX2_C_FLAGS SIMD_AVX2_CXX_FLAGS
-        "${TOOLCHAIN_FLAG_FOR_AVX2}" "-mavx2" "/arch:AVX2" "-hgnu") 
+        "-mavx2 -mfma" "-mavx2" "/arch:AVX2" "-hgnu")
 
     if(${SIMD_AVX2_C_FLAGS_RESULT})
         set(${C_FLAGS_VARIABLE} "${TOOLCHAIN_C_FLAGS} ${SIMD_AVX2_C_FLAGS}" CACHE INTERNAL "C flags required for AVX2 instructions")
@@ -266,7 +251,7 @@ function(gmx_find_simd_avx_512_flags C_FLAGS_RESULT CXX_FLAGS_RESULT C_FLAGS_VAR
           return idata[0]*(int)(_mm512_cmp_ps_mask(x,y,_CMP_LT_OS));}"
         TOOLCHAIN_C_FLAGS TOOLCHAIN_CXX_FLAGS
         SIMD_AVX_512_C_FLAGS SIMD_AVX_512_CXX_FLAGS
-        "-xCORE-AVX512 -qopt-zmm-usage=high" "-xCORE-AVX512" "-mavx512f -mfma" "-mavx512f" "/arch:AVX512" "-hgnu") #ICC should use ZMM if code anyhow uses ZMM
+        "-xCORE-AVX512 -qopt-zmm-usage=high" "-xCORE-AVX512" "-mavx512f -mfma" "-mavx512f" "/arch:AVX512" "-hgnu")
 
     if(${SIMD_AVX_512_C_FLAGS_RESULT})
         set(${C_FLAGS_VARIABLE} "${TOOLCHAIN_C_FLAGS} ${SIMD_AVX_512_C_FLAGS}" CACHE INTERNAL "C flags required for AVX-512 instructions")
index ecce618630abaa6f2c5bcc877eaa425ba27b9bef..edb8c4714257849e3608ac7a39691016169275c9 100644 (file)
@@ -2,7 +2,7 @@
 # This file is part of the GROMACS molecular simulation package.
 #
 # Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
-# Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+# Copyright (c) 2017,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.
@@ -62,10 +62,6 @@ macro(gmx_test_compiler_problems)
         if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6) # For feature complete C++14 only 3.4 is needed.
             set(cxx_required_version "Clang 3.6")        # But prior version have bugs (e.g. debug symbol support)
         endif()
-    elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
-        if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
-            set(cxx_required_version "Intel Compiler 2017")
-        endif()
     else()
         message(WARNING "You are using an unsupported compiler. Please make sure it fully supports C++14.")
     endif()
@@ -74,6 +70,10 @@ macro(gmx_test_compiler_problems)
                             "Earlier versions don't have full C++14 support.")
     endif()
 
+    if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+        message(WARNING "The Intel classic compiler is no longer supported. It may pass the tests, but is not tested by the GROMACS developers. Use the clang-based compiler from oneAPI, or gcc")
+    endif()
+
     if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "XL")
         check_cxx_source_compiles(
 "// Test in-class array initalizers used with constructor initializer lists
@@ -90,7 +90,7 @@ TestStruct::TestStruct() : b(0) {}
         endif()
     endif()
     if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
-        message(WARNING "Currently tested PGI compiler versions (up to 15.7) generate binaries that do not pass all regression test, and the generated binaries are significantly slower than with GCC, ICC or Clang. For now we do not recommend PGI beyond development testing - make sure to run the regressiontests.")
+        message(WARNING "Currently tested PGI compiler versions (up to 15.7) generate binaries that do not pass all regression test, and the generated binaries are significantly slower than with GCC or Clang. For now we do not recommend PGI beyond development testing - make sure to run the regressiontests.")
     endif()
 
 endmacro(gmx_test_compiler_problems)
index 50a350b9ff23bbbad5de4ffbfd34ce1fd0b1101c..3fcf48021d1249b86111d30d819535eed619d3c5 100644 (file)
@@ -113,7 +113,6 @@ compiler. Since we require full C++17 support the minimum supported
 compiler versions are
 
 * GNU (gcc/libstdc++) 7
-* Intel (icc) 19.1
 * LLVM (clang/libc++) 5
 * Microsoft (MSVC) 2017 15.7
 
@@ -121,6 +120,10 @@ Other compilers may work (Cray, Pathscale, older clang) but do
 not offer competitive performance. We recommend against PGI because
 the performance with C++ is very bad.
 
+The Intel classic compiler (icc/icpc) is no longer supported in
+|Gromacs|. Use Intel's newer clang-based compiler from oneAPI, or
+gcc.
+
 The xlc compiler is not supported and version 16.1 does not compile on
 POWER architectures for |Gromacs|\ -\ |version|. We recommend to use
 the gcc compiler instead, as it is being extensively tested.
@@ -135,23 +138,18 @@ libraries and require no further configuration. If your vendor's
 compiler also manages the standard library library via compiler flags,
 these will be honored. For configuration of other compilers, read on.
 
-On Linux, both the Intel and clang compiler use the libstdc++ which
+On Linux, the clang compilers use the libstdc++ which
 comes with gcc as the default C++ library. For |Gromacs|, we require
 the compiler to support libstc++ version 7.1 or higher. To select a
 particular libstdc++ library, provide the path to g++ with
 ``-DGMX_GPLUSPLUS_PATH=/path/to/g++``.
 
-On Windows with the Intel compiler, the MSVC standard library is used,
-and at least MSVC 2017 15.7 is required. Load the environment variables with
-vcvarsall.bat.
-
 To build with clang and llvm's libcxx standard library, use
 ``-DCMAKE_CXX_FLAGS=-stdlib=libc++``.
 
-If you are running on Mac OS X, the best option is the Intel
-compiler. Both clang and gcc will work, but they produce lower
-performance and each have some shortcomings. clang 3.8 now offers
-support for OpenMP, and so may provide decent performance.
+If you are running on Mac OS X, the best option is gcc. The Apple
+clang compiler provided by MacPorts will work, but does not support
+OpenMP, so will probably not provide best performance.
 
 For all non-x86 platforms, your best option is typically to use gcc or
 the vendor's default or recommended compiler, and check for
@@ -1188,18 +1186,6 @@ Intel Xeon Phi
 ^^^^^^^^^^^^^^
 
 Xeon Phi processors, hosted or self-hosted, are supported.
-Only symmetric (aka native) mode is supported on Knights Corner. The
-performance depends among other factors on the system size, and for
-now the performance might not be faster than CPUs. When building for it,
-the recommended configuration is
-
-::
-
-    cmake .. -DCMAKE_TOOLCHAIN_FILE=Platform/XeonPhi
-    make
-    make install
-
-
 The Knights Landing-based Xeon Phi processors behave like standard x86 nodes,
 but support a special SIMD instruction set. When cross-compiling for such nodes,
 use the ``AVX_512_KNL`` SIMD flavor.
@@ -1227,7 +1213,7 @@ is currently tested with a range of configuration options on x86 with
 gcc versions 7 and 8,
 clang versions 8 and 9,
 and
-a beta version of oneAPI containing Intel's compiler.
+a version of oneAPI containing Intel's clang-based compiler.
 For this testing, we use Ubuntu 18.04 or 20.04 operating system.
 Other compiler, library, and OS versions are tested less frequently.
 For details, you can have a look at the
index aa938eb2aaa57510dc64cda5a7e02c5691faa630..75c4b4865e1eb4ef908f6c61e495bc603ee6c36d 100644 (file)
@@ -1,3 +1,10 @@
 Portability
 ^^^^^^^^^^^
 
+Intel classic compiler (icc/icpc) no longer supported
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+We now support the Intel clang-based compiler from oneAPI (icx/icpx)
+instead. Please use it, or gcc.
+
+:issue:`3893`
index d699ba814c3051c95805a7053df117b983be0805..e97494a76c63447f15d2b6e096ca86556ae81c59 100644 (file)
@@ -1362,7 +1362,7 @@ of 2. So it can be useful go through the checklist.
 * Don't use double precision unless you're absolute sure you need it.
 * Compile the FFTW library (yourself) with the correct flags on x86 (in most
   cases, the correct flags are automatically configured).
-* On x86, use gcc or icc as the compiler (not pgi or the Cray compiler).
+* On x86, use gcc as the compiler (not icc, pgi or the Cray compiler).
 * On POWER, use gcc instead of IBM's xlc.
 * Use a new compiler version, especially for gcc (e.g. from version 5 to 6
   the performance of the compiled code improved a lot).
index 37689a919033a1927d7491a0cea59d6254578a9b..5bb1ff627ab4804bc81273575f8c92fa1ddb205d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * 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.
@@ -58,16 +58,8 @@ namespace compat
 
 //! Contract-assurance macros that work like a simple version of the GSL ones
 //! \{
-#if !defined(__INTEL_COMPILER) || !(__INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE == 0)
-#    define Expects(cond) GMX_ASSERT((cond), "Precondition violation")
-#    define Ensures(cond) GMX_ASSERT((cond), "Postcondition violation")
-#else
-// icc 18.0.0 in a RelWithAssert build has an ICE, even if we directly
-// embed the contents of GMX_ASSERT, so it seems the lambda in
-// GMX_ASSERT is too complex for it in this use case.
-#    define Expects(cond)
-#    define Ensures(cond)
-#endif
+#define Expects(cond) GMX_ASSERT((cond), "Precondition violation")
+#define Ensures(cond) GMX_ASSERT((cond), "Postcondition violation")
 //! \}
 
 /*! \libinternal
index 4131ed28993f2bbb484b3f7844ca11bc2f03177e..a7a6b841814034f6c5ceadb07ba09fc2643aff5d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * 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.
@@ -61,19 +61,8 @@ TEST(NotNullConstruction, Works)
     // shared_ptr<int> is nullptr assignable
     not_null<std::shared_ptr<int>> sharedPointer(std::make_shared<int>(10));
 
-#ifndef NDEBUG
-/* The workaround here is needed because the intel implementation
- * will not trigger the assert when using the pointer without
- * a valid object. This was needed due to an internal error
- * being triggered instead with the compiler under this condition.
- *
- * Death tests can also not be used safely in a parallel environment.
- */
-#    if !defined(__INTEL_COMPILER) || !(__INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE == 0)
     int* nullPointer = nullptr;
     GMX_EXPECT_DEATH_IF_SUPPORTED(not_null<int*> invalidNullPointer(nullPointer), "");
-#    endif
-#endif
 
     int  value        = 20;
     int* validPointer = &value;
index 63f0cadb114e2c80bfddcff043167835f1572490..d2267521654df420850453c695c22c255ed1a12e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,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.
@@ -278,7 +278,7 @@ static void pmeGetGridAndSizesInternal(const gmx_pme_t* /*unused*/,
                                        IVec& /*unused*/)       //NOLINT(google-runtime-references)
 {
     GMX_THROW(InternalError("Deleted function call"));
-    // explicitly deleting general template does not compile in clang/icc, see https://llvm.org/bugs/show_bug.cgi?id=17537
+    // explicitly deleting general template does not compile in clang, see https://llvm.org/bugs/show_bug.cgi?id=17537
 }
 
 //! Getting the PME real grid memory buffer and its sizes
index e56b568d756502b9ce707536d2b2b89d6a50ff6a..4b3af0c0cbf9e1918611771ae05874dd393b7d58 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 2012,2013,2014,2015,2016, The GROMACS development team.
- * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,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.
@@ -256,7 +256,6 @@ gmx_radial_distribution_histogram_t* calc_radial_distribution_histogram(gmx_sans
             gmx::UniformIntDistribution<int> tdist(0, isize - 1);
             tid = gmx_omp_get_thread_num();
             /* now starting parallel threads */
-            INTEL_DIAGNOSTIC_IGNORE(593)
 #    pragma omp for
             for (int64_t mc = 0; mc < mc_max; mc++)
             {
@@ -273,7 +272,6 @@ gmx_radial_distribution_histogram_t* calc_radial_distribution_histogram(gmx_sans
                 GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR
             }
         }
-        INTEL_DIAGNOSTIC_RESET
         /* collecting data from threads */
         for (i = 0; i < pr->grn; i++)
         {
index 853192f52a70c810c54d8f5ee6ab502fedc727b1..296b4844fc0229542c0da7f2909f9c7860c34866 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
- * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,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.
@@ -73,18 +73,8 @@ namespace gmx
  *  (using sysconf), and the spins doing dummy compute operations for up to
  *  2 seconds, or until all cores have come online. This can be used prior to
  *  hardware detection for platforms that take unused processors offline.
- *
- *  This routine will not throw exceptions. In principle it should be
- *  declared noexcept, but at least icc 19.1 and 21-beta08 with the
- *  libstdc++-7.5 has difficulty implementing a std::vector of
- *  std::thread started with this function when declared noexcept. It
- *  is a known compiler bug that should be fixed after 19.1.
- *  Fortunately, this function is not performance sensitive,
- *  and only runs on platforms other than x86 and POWER (ie ARM),
- *  so the possible overhead introduced by omitting noexcept is not
- *  important.
  */
-static void spinUpCore()
+static void spinUpCore() noexcept
 {
 #if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_CONF) && defined(_SC_NPROCESSORS_ONLN)
     float dummy           = 0.1;
index d358542f90ef2d954e95d8375fe0f9c440bd5b22..554213953ed9acfd76e24c2d204742aa997accb3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * 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.
@@ -783,8 +783,6 @@ std::vector<PaddedVector<RVec>> c_coordinatesForTestsZeroAngle = {
 //! PBC values for testing
 std::vector<PbcType> c_pbcForTests = { PbcType::No, PbcType::XY, PbcType::Xyz };
 
-// Those tests give errors with the Intel compiler (as of October 2019) and nothing else, so we disable them only there.
-#if !defined(__INTEL_COMPILER) || (__INTEL_COMPILER >= 2021)
 INSTANTIATE_TEST_CASE_P(Bond,
                         ListedForcesTest,
                         ::testing::Combine(::testing::ValuesIn(c_InputBonds),
@@ -826,7 +824,6 @@ INSTANTIATE_TEST_CASE_P(AngleZero,
                         ::testing::Combine(::testing::ValuesIn(c_InputAnglesZeroAngle),
                                            ::testing::ValuesIn(c_coordinatesForTestsZeroAngle),
                                            ::testing::ValuesIn(c_pbcForTests)));
-#endif
 
 } // namespace
 
index a9f80a1c571dd1535b065e30fe5b38f3267a56f4..4a2763d8c8a798f03e59b49aee660f6f95898685 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
  * Copyright (c) 2012,2014,2015,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 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.
@@ -134,11 +134,6 @@ int get_ebin_space(t_ebin* eb, int nener, const char* const enm[], const char* u
     return index;
 }
 
-// ICC 19 -O3 -msse2 generates wrong code. Lower optimization levels
-// and other SIMD levels seem fine, however.
-#if defined __ICC
-#    pragma intel optimization_level 2
-#endif
 void add_ebin(t_ebin* eb, int entryIndex, int nener, const real ener[], gmx_bool bSum)
 {
     int       i, m;
index 9a19ec08acb3dcaff341a966e589994bdadfd112..67f2d5bdb47edd690d6f380d17eeb6d982648815 100644 (file)
@@ -557,9 +557,6 @@ static void updateMDLeapfrogGeneral(int                   start,
 
         rvec vRel;
         real cosineZ, vCosine;
-#ifdef __INTEL_COMPILER
-#    pragma warning(disable : 280)
-#endif
         switch (accelerationType)
         {
             case AccelerationType::none: copy_rvec(v[n], vRel); break;
index 46fd7ad5ff0c087657892aee3f6c06cf5639a045..802b5bf3276cd7c421aa104599104a524155ea96 100644 (file)
@@ -1482,9 +1482,8 @@ int Mdrunner::mdrunner()
 // Release mode and not for compilers with known buggy FP
 // exception support (clang with any optimization) or suspected
 // buggy FP exception support (gcc 7.* with optimization).
-#if !defined NDEBUG                                                                         \
-        && !((defined __clang__ || (defined(__GNUC__) && !defined(__ICC) && __GNUC__ == 7)) \
-             && defined __OPTIMIZE__)
+#if !defined NDEBUG \
+        && !((defined __clang__ || (defined(__GNUC__) && __GNUC__ == 7)) && defined __OPTIMIZE__)
     const bool bEnableFPE = true;
 #else
     const bool bEnableFPE = false;
index 6d7db72249b24b460e0b2754acdccf9d5656725a..97b177ce6cffaee95bdeafbc544d200fffedc344 100644 (file)
 
 
 #    ifdef __GNUC__
-/* GCC, clang, and some ICC pretending to be GCC */
+/* GCC, clang */
 #        define gmx_unused __attribute__((unused))
 #    else
 #        define gmx_unused
index 4c6a529dedfcf41bb727cf98a4f5f5c135852d0a..a53233c2e1e8b84d89befe69d6da5ce2b9e4334b 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
- * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,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.
@@ -3745,7 +3745,7 @@ static void copySelectedListRange(const nbnxn_ci_t* gmx_restrict srcCi,
     }
 }
 
-#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ == 7
+#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ == 7
 /* Avoid gcc 7 avx512 loop vectorization bug (actually only needed with -mavx512f) */
 #    pragma GCC push_options
 #    pragma GCC optimize("no-tree-vectorize")
@@ -3766,7 +3766,7 @@ static int countClusterpairs(gmx::ArrayRef<const NbnxnPairlistCpu> pairlists)
     return ncjTotal;
 }
 
-#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ == 7
+#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ == 7
 #    pragma GCC pop_options
 #endif
 
index fd8dbef6a6ea341d66cba3776c2678f1b39a9fea..cf9b7b45b1df9a018dfe6f405846fcdb80efe7b4 100644 (file)
@@ -514,12 +514,6 @@ static void sum_com_part_cosweight(const pull_group_work_t* pgrp,
 }
 
 /* calculates center of mass of selection index from all coordinates x */
-// Compiler segfault with 2019_update_5 and 2020_initial
-#if defined(__INTEL_COMPILER)                                          \
-        && ((__INTEL_COMPILER == 1900 && __INTEL_COMPILER_UPDATE >= 5) \
-            || (__INTEL_COMPILER >= 1910 && __INTEL_COMPILER < 2021))
-#    pragma intel optimization_level 2
-#endif
 void pull_calc_coms(const t_commrec* cr, pull_t* pull, const real* masses, t_pbc* pbc, double t, const rvec x[], rvec* xp)
 {
     real         twopi_box = 0;
index 68f3f88bdb33130d019c6462606bfd8869a3b1e6..9c2759d0bcc0d6154e483e945319d6163d7f8862 100644 (file)
@@ -93,7 +93,7 @@ namespace gmx
 /*! \brief Gamma distribution
  *
  *  The C++ standard library does provide a gamma distribution, but when
- *  using libstdc++-4.4.7 with at least gcc-4.6 or icc-14.0 the headers
+ *  using libstdc++-4.4.7 with at least gcc-4.6 the headers
  *  produce errors. Even for newer compilers, libstdc++ and libc++ appear to
  *  use different algorithms to generate it, which means their values differ
  *  in contrast to the uniform and normal distributions where they are
index bce1d67548e415008c15c1b3f13c345eb9c63898..30b71bd3424df0ca059deaca1a4fd2836ddec6c2 100644 (file)
@@ -571,10 +571,6 @@ static yyconst flex_int16_t yy_chk[151] =
 // manually.
 #define YY_BREAK
 
-#ifdef __INTEL_COMPILER
-// Ignore unused variables in generated code.
-#pragma warning(disable:593)
-#endif
 #define YY_NO_UNISTD_H 1
 
 
index cd0f9512577db30f0b29cda8f61f01123d8ecfa1..632115a43b538e40f59617f75e608dabc4a980d5 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 2009,2010,2011,2012,2013 by the GROMACS development team.
- * Copyright (c) 2014,2015,2016,2020, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,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.
 // manually.
 #define YY_BREAK
 
-#ifdef __INTEL_COMPILER
-// Ignore unused variables in generated code.
-#pragma warning(disable:593)
-#endif
 %}
 
 INTEGER    [[:digit:]]+
index 502f5f0961f5ffcc3f192048c3e38970d25737fa..7a2fd80cc85ea5255c4909477053a2291e057721 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2015,2017,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.
@@ -466,9 +466,6 @@ TEST_F(SimdFloatingpointUtilTest, transposeScatterDecrU3Overlapping)
         mem0_[j] = refmem[j] = (1000.0 + j) * (1.0 + 100 * GMX_REAL_EPS);
     }
 
-#    if defined(__INTEL_COMPILER) && (__INTEL_COMPILER < 2021) // Bug in (at least) 19u1 and 18u5 (03424712)
-#        pragma novector
-#    endif
     for (std::size_t j = 0; j < GMX_SIMD_REAL_WIDTH; j++)
     {
         // Subtract values from _reference_ memory (we will then test with mem0_, and compare)
@@ -942,9 +939,6 @@ TEST_F(SimdFloatingpointUtilTest, loadUNDuplicate4)
     real       data[GMX_SIMD_REAL_WIDTH / 4];
     std::iota(data, data + GMX_SIMD_REAL_WIDTH / 4, 1);
 
-#        if defined __ICC && __ICC == 1800 || defined __ICL && __ICL == 1800
-#            pragma novector /* Work-around for incorrect vectorization for AVX_512(_KNL) */
-#        endif
     for (i = 0; i < GMX_SIMD_REAL_WIDTH / 4; i++)
     {
         val0_[i * 4] = val0_[i * 4 + 1] = val0_[i * 4 + 2] = val0_[i * 4 + 3] = data[i];
index 0692ee8b416c840ff33612e90a66fb2a94ae7c86..899c7ea7091a8eb43f99af15957c0f792e5c0328 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, The GROMACS development team.
  * Copyright (c) 2013,2014,2015,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.
@@ -584,8 +584,7 @@ WallcycleCounts wallcycle_sum(const t_commrec* cr, gmx_wallcycle_t wc)
     if (wc == nullptr)
     {
         /* Default construction of std::array of non-class T can leave
-           the values indeterminate, just like a C array, and icc
-           warns about it. */
+           the values indeterminate, just like a C array */
         cycles_sum.fill(0);
         return cycles_sum;
     }
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;
index 87687202c71682000adf5ecb666f8002b485a875..1081a181435409f896cfe7a40a255fa83d085648 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
- * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,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.
@@ -153,9 +153,8 @@ void initTestUtils(const char* dataPath,
                    int*        argc,
                    char***     argv)
 {
-#if !defined NDEBUG                                                                         \
-        && !((defined __clang__ || (defined(__GNUC__) && !defined(__ICC) && __GNUC__ == 7)) \
-             && defined __OPTIMIZE__)
+#if !defined NDEBUG \
+        && !((defined __clang__ || (defined(__GNUC__) && __GNUC__ == 7)) && defined __OPTIMIZE__)
     gmx_feenableexcept();
 #endif
     const CommandLineProgramContext& context = initForCommandLine(argc, argv);