From 18f24fcf646aeac6c596b9a7e162f7d9acdad498 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Wed, 3 Feb 2021 10:44:20 +0000 Subject: [PATCH] Remove support for Intel classic compiler 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 --- .../containers/scripted_gmx_docker_builds.py | 14 +--- admin/containers/utility.py | 5 +- admin/gitlab-ci/global.gitlab-ci.yml | 17 +--- admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml | 1 - .../gromacs.icc-2021.1.gitlab-ci.yml | 63 -------------- api/CMakeLists.txt | 3 +- .../include/gromacs/utility/basedefinitions.h | 19 +---- .../gromacs/utility/current_function.h | 5 +- cmake/FindLibStdCpp.cmake | 8 +- cmake/Platform/XeonPhi.cmake | 43 ---------- cmake/gmxCFlags.cmake | 82 ------------------- cmake/gmxManageFFTLibraries.cmake | 8 +- cmake/gmxManageLinearAlgebraLibraries.cmake | 4 +- cmake/gmxManageSimd.cmake | 4 +- cmake/gmxSimdFlags.cmake | 21 +---- cmake/gmxTestCompilerProblems.cmake | 12 +-- docs/install-guide/index.rst | 32 ++------ docs/release-notes/2022/major/portability.rst | 7 ++ docs/user-guide/mdrun-performance.rst | 2 +- src/gromacs/compat/pointers.h | 14 +--- src/gromacs/compat/tests/pointers.cpp | 13 +-- src/gromacs/ewald/tests/pmetestcommon.cpp | 4 +- src/gromacs/gmxana/nsfactor.cpp | 4 +- src/gromacs/hardware/prepare_detection.cpp | 14 +--- src/gromacs/listed_forces/tests/bonded.cpp | 5 +- src/gromacs/mdlib/ebin.cpp | 7 +- src/gromacs/mdlib/update.cpp | 3 - src/gromacs/mdrun/runner.cpp | 5 +- .../nbnxm/opencl/nbnxm_ocl_kernel_utils.clh | 2 +- src/gromacs/nbnxm/pairlist.cpp | 6 +- src/gromacs/pulling/pullutil.cpp | 6 -- src/gromacs/random/gammadistribution.h | 2 +- src/gromacs/selection/scanner.cpp | 4 - src/gromacs/selection/scanner.l | 6 +- .../simd/tests/simd_floatingpoint_util.cpp | 8 +- src/gromacs/timing/wallcycle.cpp | 5 +- src/gromacs/utility/gmxomp.cpp | 30 +------ src/testutils/testinit.cpp | 7 +- 38 files changed, 73 insertions(+), 422 deletions(-) delete mode 100644 admin/gitlab-ci/gromacs.matrix/gromacs.icc-2021.1.gitlab-ci.yml delete mode 100644 cmake/Platform/XeonPhi.cmake diff --git a/admin/containers/scripted_gmx_docker_builds.py b/admin/containers/scripted_gmx_docker_builds.py index 2e3bb6a1e2..8909402507 100755 --- a/admin/containers/scripted_gmx_docker_builds.py +++ b/admin/containers/scripted_gmx_docker_builds.py @@ -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)] diff --git a/admin/containers/utility.py b/admin/containers/utility.py index 47e943e052..5f5a79ca42 100644 --- a/admin/containers/utility.py +++ b/admin/containers/utility.py @@ -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]) diff --git a/admin/gitlab-ci/global.gitlab-ci.yml b/admin/gitlab-ci/global.gitlab-ci.yml index ffa7d3a210..96dcd9ae14 100644 --- a/admin/gitlab-ci/global.gitlab-ci.yml +++ b/admin/gitlab-ci/global.gitlab-ci.yml @@ -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: @@ -91,18 +91,3 @@ - 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 diff --git a/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml index 4a7e1aeb56..c43740e875 100644 --- a/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml @@ -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 index 849eb19aea..0000000000 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.icc-2021.1.gitlab-ci.yml +++ /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 - diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index a2f0763236..5773bbf265 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -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) diff --git a/api/legacy/include/gromacs/utility/basedefinitions.h b/api/legacy/include/gromacs/utility/basedefinitions.h index bfb155651a..c5d82d0179 100644 --- a/api/legacy/include/gromacs/utility/basedefinitions.h +++ b/api/legacy/include/gromacs/utility/basedefinitions.h @@ -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 diff --git a/api/legacy/include/gromacs/utility/current_function.h b/api/legacy/include/gromacs/utility/current_function.h index e771889328..2d5aef4f60 100644 --- a/api/legacy/include/gromacs/utility/current_function.h +++ b/api/legacy/include/gromacs/utility/current_function.h @@ -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__ diff --git a/cmake/FindLibStdCpp.cmake b/cmake/FindLibStdCpp.cmake index f3566fe0ca..7bc75c467b 100644 --- a/cmake/FindLibStdCpp.cmake +++ b/cmake/FindLibStdCpp.cmake @@ -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 index a23feaf9f8..0000000000 --- a/cmake/Platform/XeonPhi.cmake +++ /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() diff --git a/cmake/gmxCFlags.cmake b/cmake/gmxCFlags.cmake index 5336d1aa97..12367175ef 100644 --- a/cmake/gmxCFlags.cmake +++ b/cmake/gmxCFlags.cmake @@ -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") diff --git a/cmake/gmxManageFFTLibraries.cmake b/cmake/gmxManageFFTLibraries.cmake index f59e011ecc..6f92a5f24c 100644 --- a/cmake/gmxManageFFTLibraries.cmake +++ b/cmake/gmxManageFFTLibraries.cmake @@ -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) diff --git a/cmake/gmxManageLinearAlgebraLibraries.cmake b/cmake/gmxManageLinearAlgebraLibraries.cmake index bb5a5e6165..56ea29e1e8 100644 --- a/cmake/gmxManageLinearAlgebraLibraries.cmake +++ b/cmake/gmxManageLinearAlgebraLibraries.cmake @@ -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 diff --git a/cmake/gmxManageSimd.cmake b/cmake/gmxManageSimd.cmake index 822becc940..bccdfb44c7 100644 --- a/cmake/gmxManageSimd.cmake +++ b/cmake/gmxManageSimd.cmake @@ -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 diff --git a/cmake/gmxSimdFlags.cmake b/cmake/gmxSimdFlags.cmake index 1b09d52521..18aa29a9a5 100644 --- a/cmake/gmxSimdFlags.cmake +++ b/cmake/gmxSimdFlags.cmake @@ -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 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") diff --git a/cmake/gmxTestCompilerProblems.cmake b/cmake/gmxTestCompilerProblems.cmake index ecce618630..edb8c47142 100644 --- a/cmake/gmxTestCompilerProblems.cmake +++ b/cmake/gmxTestCompilerProblems.cmake @@ -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) diff --git a/docs/install-guide/index.rst b/docs/install-guide/index.rst index 50a350b9ff..3fcf48021d 100644 --- a/docs/install-guide/index.rst +++ b/docs/install-guide/index.rst @@ -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 diff --git a/docs/release-notes/2022/major/portability.rst b/docs/release-notes/2022/major/portability.rst index aa938eb2aa..75c4b4865e 100644 --- a/docs/release-notes/2022/major/portability.rst +++ b/docs/release-notes/2022/major/portability.rst @@ -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` diff --git a/docs/user-guide/mdrun-performance.rst b/docs/user-guide/mdrun-performance.rst index d699ba814c..e97494a76c 100644 --- a/docs/user-guide/mdrun-performance.rst +++ b/docs/user-guide/mdrun-performance.rst @@ -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). diff --git a/src/gromacs/compat/pointers.h b/src/gromacs/compat/pointers.h index 37689a9190..5bb1ff627a 100644 --- a/src/gromacs/compat/pointers.h +++ b/src/gromacs/compat/pointers.h @@ -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 diff --git a/src/gromacs/compat/tests/pointers.cpp b/src/gromacs/compat/tests/pointers.cpp index 4131ed2899..a7a6b84181 100644 --- a/src/gromacs/compat/tests/pointers.cpp +++ b/src/gromacs/compat/tests/pointers.cpp @@ -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 is nullptr assignable not_null> sharedPointer(std::make_shared(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 invalidNullPointer(nullPointer), ""); -# endif -#endif int value = 20; int* validPointer = &value; diff --git a/src/gromacs/ewald/tests/pmetestcommon.cpp b/src/gromacs/ewald/tests/pmetestcommon.cpp index 63f0cadb11..d226752165 100644 --- a/src/gromacs/ewald/tests/pmetestcommon.cpp +++ b/src/gromacs/ewald/tests/pmetestcommon.cpp @@ -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 diff --git a/src/gromacs/gmxana/nsfactor.cpp b/src/gromacs/gmxana/nsfactor.cpp index e56b568d75..4b3af0c0cb 100644 --- a/src/gromacs/gmxana/nsfactor.cpp +++ b/src/gromacs/gmxana/nsfactor.cpp @@ -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 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++) { diff --git a/src/gromacs/hardware/prepare_detection.cpp b/src/gromacs/hardware/prepare_detection.cpp index 853192f52a..296b4844fc 100644 --- a/src/gromacs/hardware/prepare_detection.cpp +++ b/src/gromacs/hardware/prepare_detection.cpp @@ -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; diff --git a/src/gromacs/listed_forces/tests/bonded.cpp b/src/gromacs/listed_forces/tests/bonded.cpp index d358542f90..554213953e 100644 --- a/src/gromacs/listed_forces/tests/bonded.cpp +++ b/src/gromacs/listed_forces/tests/bonded.cpp @@ -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> c_coordinatesForTestsZeroAngle = { //! PBC values for testing std::vector 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 diff --git a/src/gromacs/mdlib/ebin.cpp b/src/gromacs/mdlib/ebin.cpp index a9f80a1c57..4a2763d8c8 100644 --- a/src/gromacs/mdlib/ebin.cpp +++ b/src/gromacs/mdlib/ebin.cpp @@ -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; diff --git a/src/gromacs/mdlib/update.cpp b/src/gromacs/mdlib/update.cpp index 9a19ec08ac..67f2d5bdb4 100644 --- a/src/gromacs/mdlib/update.cpp +++ b/src/gromacs/mdlib/update.cpp @@ -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; diff --git a/src/gromacs/mdrun/runner.cpp b/src/gromacs/mdrun/runner.cpp index 46fd7ad5ff..802b5bf327 100644 --- a/src/gromacs/mdrun/runner.cpp +++ b/src/gromacs/mdrun/runner.cpp @@ -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; diff --git a/src/gromacs/nbnxm/opencl/nbnxm_ocl_kernel_utils.clh b/src/gromacs/nbnxm/opencl/nbnxm_ocl_kernel_utils.clh index 6d7db72249..97b177ce6c 100644 --- a/src/gromacs/nbnxm/opencl/nbnxm_ocl_kernel_utils.clh +++ b/src/gromacs/nbnxm/opencl/nbnxm_ocl_kernel_utils.clh @@ -116,7 +116,7 @@ # ifdef __GNUC__ -/* GCC, clang, and some ICC pretending to be GCC */ +/* GCC, clang */ # define gmx_unused __attribute__((unused)) # else # define gmx_unused diff --git a/src/gromacs/nbnxm/pairlist.cpp b/src/gromacs/nbnxm/pairlist.cpp index 4c6a529ded..a53233c2e1 100644 --- a/src/gromacs/nbnxm/pairlist.cpp +++ b/src/gromacs/nbnxm/pairlist.cpp @@ -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 pairlists) return ncjTotal; } -#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ == 7 +#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ == 7 # pragma GCC pop_options #endif diff --git a/src/gromacs/pulling/pullutil.cpp b/src/gromacs/pulling/pullutil.cpp index fd8dbef6a6..cf9b7b45b1 100644 --- a/src/gromacs/pulling/pullutil.cpp +++ b/src/gromacs/pulling/pullutil.cpp @@ -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; diff --git a/src/gromacs/random/gammadistribution.h b/src/gromacs/random/gammadistribution.h index 68f3f88bdb..9c2759d0bc 100644 --- a/src/gromacs/random/gammadistribution.h +++ b/src/gromacs/random/gammadistribution.h @@ -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 diff --git a/src/gromacs/selection/scanner.cpp b/src/gromacs/selection/scanner.cpp index bce1d67548..30b71bd342 100644 --- a/src/gromacs/selection/scanner.cpp +++ b/src/gromacs/selection/scanner.cpp @@ -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 diff --git a/src/gromacs/selection/scanner.l b/src/gromacs/selection/scanner.l index cd0f951257..632115a43b 100644 --- a/src/gromacs/selection/scanner.l +++ b/src/gromacs/selection/scanner.l @@ -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. @@ -74,10 +74,6 @@ // manually. #define YY_BREAK -#ifdef __INTEL_COMPILER -// Ignore unused variables in generated code. -#pragma warning(disable:593) -#endif %} INTEGER [[:digit:]]+ diff --git a/src/gromacs/simd/tests/simd_floatingpoint_util.cpp b/src/gromacs/simd/tests/simd_floatingpoint_util.cpp index 502f5f0961..7a2fd80cc8 100644 --- a/src/gromacs/simd/tests/simd_floatingpoint_util.cpp +++ b/src/gromacs/simd/tests/simd_floatingpoint_util.cpp @@ -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]; diff --git a/src/gromacs/timing/wallcycle.cpp b/src/gromacs/timing/wallcycle.cpp index 0692ee8b41..899c7ea709 100644 --- a/src/gromacs/timing/wallcycle.cpp +++ b/src/gromacs/timing/wallcycle.cpp @@ -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; } diff --git a/src/gromacs/utility/gmxomp.cpp b/src/gromacs/utility/gmxomp.cpp index fb943100ee..d606c5b489 100644 --- a/src/gromacs/utility/gmxomp.cpp +++ b/src/gromacs/utility/gmxomp.cpp @@ -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; diff --git a/src/testutils/testinit.cpp b/src/testutils/testinit.cpp index 87687202c7..1081a18143 100644 --- a/src/testutils/testinit.cpp +++ b/src/testutils/testinit.cpp @@ -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); -- 2.22.0