From 6f26bf9be15a87812a9175393adfe7ca6370e710 Mon Sep 17 00:00:00 2001 From: Paul Bauer Date: Thu, 18 Feb 2021 07:10:07 +0000 Subject: [PATCH] Update CMake requirement to 3.16.3 We will require a more modern CMake beginning with the 2022 version, and have chosen 3.16.3 as the minimum version, as this is what the Ubuntu 20.04 LTS ships by default. Refs #3708 --- CMakeLists.txt | 2 +- .../containers/scripted_gmx_docker_builds.py | 2 +- admin/containers/utility.py | 2 +- admin/gitlab-ci/gromacs.gitlab-ci.yml | 3 +- .../gromacs.clang-8-cuda-10.0.gitlab-ci.yml | 8 ++--- .../gromacs.clang-9-mpi.gitlab-ci.yml | 8 ++--- .../gromacs.clang-9-release.gitlab-ci.yml | 8 ++--- .../gromacs.clang-ASAN.gitlab-ci.yml | 8 ++--- .../gromacs.clang-TSAN.gitlab-ci.yml | 8 ++--- .../gromacs.clang-UBSAN.gitlab-ci.yml | 6 ++-- ...romacs.clang-static-analyzer.gitlab-ci.yml | 4 +-- .../gromacs.gcc-10.gitlab-ci.yml | 8 ++--- .../gromacs.gcc-7-cuda-10.2.gitlab-ci.yml | 12 +++---- ...macs.gcc-8-cuda-11.0-release.gitlab-ci.yml | 7 ++-- .../gromacs.gcc-8-cuda-11.0.gitlab-ci.yml | 6 ++-- .../gromacs.gcc-9-release.gitlab-ci.yml | 8 ++--- admin/gitlab-ci/lint.gitlab-ci.yml | 8 ++--- cmake/FindLmfit.cmake | 8 ++--- cmake/FindclFFT.cmake | 11 ++----- cmake/gmxPythonDiscovery.cmake | 33 +++++++------------ python_packaging/requirements-test.txt | 2 +- .../sample_restraint/CMakeLists.txt | 2 +- python_packaging/src/CMakeLists.txt | 4 +-- share/template/CMakeLists.txt.template | 4 +-- 24 files changed, 78 insertions(+), 94 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 298bf97824..27a74208a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ # To help us fund GROMACS development, we humbly ask that you cite # the research papers on the package. Check out http://www.gromacs.org. -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16.3) cmake_policy(SET CMP0074 NEW) # From CMake 3.12 cmake_policy(SET CMP0068 NEW) # From CMake-3.9 diff --git a/admin/containers/scripted_gmx_docker_builds.py b/admin/containers/scripted_gmx_docker_builds.py index 3ccc7571e8..6e17424679 100755 --- a/admin/containers/scripted_gmx_docker_builds.py +++ b/admin/containers/scripted_gmx_docker_builds.py @@ -405,7 +405,7 @@ def prepare_venv(version: StrictVersion) -> typing.Sequence[str]: # WARNING: Please keep this list synchronized with python_packaging/requirements-test.txt # TODO: Get requirements.txt from an input argument. commands.append(f"""{venv_path}/bin/python -m pip install --upgrade \ - 'cmake>=3.13' \ + 'cmake>=3.16.3' \ 'flake8>=3.7.7' \ 'gcovr>=4.2' \ 'mpi4py>=3.0.3' \ diff --git a/admin/containers/utility.py b/admin/containers/utility.py index 73645de472..c374f88480 100644 --- a/admin/containers/utility.py +++ b/admin/containers/utility.py @@ -86,7 +86,7 @@ parsers for tools. Instead, inherit from it with the *parents* argument to :py:class:`argparse.ArgumentParser` """ -parser.add_argument('--cmake', nargs='*', type=str, default=['3.13.0', '3.15.7', '3.17.2'], +parser.add_argument('--cmake', nargs='*', type=str, default=['3.16.3', '3.17.2', '3.18.4'], # new minimum required versions help='Selection of CMake version to provide to base image') compiler_group = parser.add_mutually_exclusive_group() diff --git a/admin/gitlab-ci/gromacs.gitlab-ci.yml b/admin/gitlab-ci/gromacs.gitlab-ci.yml index b2e2dd56e7..55b0e1cd17 100644 --- a/admin/gitlab-ci/gromacs.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.gitlab-ci.yml @@ -3,6 +3,7 @@ # OS: Ubuntu oldest supported # Compiler: Clang # Build type: Debug +# CMake: oldest supported # GPU: no # SIMD: no # Scope: configure, build, unit tests @@ -22,7 +23,7 @@ simple-build: stage: pre-build image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake KUBERNETES_CPU_LIMIT: 8 KUBERNETES_CPU_REQUEST: 4 KUBERNETES_MEMORY_REQUEST: 8Gi diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-8-cuda-10.0.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-8-cuda-10.0.gitlab-ci.yml index acedae27df..5c1f0443ed 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-8-cuda-10.0.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-8-cuda-10.0.gitlab-ci.yml @@ -23,7 +23,7 @@ gromacs:clang-8-cuda-10.0:configure: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-cuda-10.0 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake CMAKE_SIMD_OPTIONS: "-DGMX_USE_SIMD_KERNELS=off" CMAKE_EXTRA_OPTIONS: "-DGMX_CLANG_CUDA=ON" CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithDebInfo" @@ -38,7 +38,7 @@ gromacs:clang-8-cuda-10.0:build: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-cuda-10.0 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake needs: - job: gromacs:clang-8-cuda-10.0:configure @@ -48,7 +48,7 @@ gromacs:clang-8-cuda-10.0:test: - .rules:post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-cuda-10.0 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1 tags: @@ -62,7 +62,7 @@ gromacs:clang-8-cuda-10.0:regressiontest: - .rules:post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-cuda-10.0 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1 REGRESSIONTEST_PME_RANK_NUMBER: 0 diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-mpi.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-mpi.gitlab-ci.yml index 81f3e1f98a..574f325579 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-mpi.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-mpi.gitlab-ci.yml @@ -23,7 +23,7 @@ gromacs:clang-9-mpi:configure: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake COMPILER_MAJOR_VERSION: 9 CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON @@ -38,7 +38,7 @@ gromacs:clang-9-mpi:build: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake needs: - job: gromacs:clang-9-mpi:configure @@ -48,7 +48,7 @@ gromacs:clang-9-mpi:test: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake tags: - k8s-scilifelab needs: @@ -60,7 +60,7 @@ gromacs:clang-9:regressiontest: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake REGRESSIONTEST_DOUBLE: "-double" REGRESSIONTEST_PARALLEL: "-np" tags: diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-release.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-release.gitlab-ci.yml index c6c77685b3..f2d59a277b 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-release.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-release.gitlab-ci.yml @@ -23,7 +23,7 @@ gromacs:clang-9:release:configure: - .rules:nightly-only-for-release image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake COMPILER_MAJOR_VERSION: 9 RELEASE_BUILD_DIR: release-builds-clang CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=ON" @@ -42,7 +42,7 @@ gromacs:clang-9:release:build: - .rules:nightly-only-for-release stage: release-build variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-clang image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 needs: @@ -55,7 +55,7 @@ gromacs:clang-9:release:test: stage: release-tests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-clang needs: - job: gromacs:clang-9:release:configure @@ -68,7 +68,7 @@ gromacs:clang-9:release:regressiontest: stage: release-tests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-clang REGRESSIONTEST_DOUBLE: "-double" REGRESSIONTEST_PARALLEL: "-np" diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-ASAN.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-ASAN.gitlab-ci.yml index 3052a6298f..cf3f98e97a 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-ASAN.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-ASAN.gitlab-ci.yml @@ -20,7 +20,7 @@ gromacs:clang-ASAN:configure: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake COMPILER_MAJOR_VERSION: 8 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=ASAN" @@ -33,7 +33,7 @@ gromacs:clang-ASAN:build: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake tags: - k8s-scilifelab needs: @@ -46,7 +46,7 @@ gromacs:clang-ASAN:test: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake CTEST_RUN_MODE: "ExperimentalMemCheck" tags: - k8s-scilifelab @@ -60,7 +60,7 @@ gromacs:clang-ASAN:regressiontest: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake tags: - k8s-scilifelab needs: diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-TSAN.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-TSAN.gitlab-ci.yml index 64834ff427..e44f168cc3 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-TSAN.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-TSAN.gitlab-ci.yml @@ -20,7 +20,7 @@ gromacs:clang-TSAN:configure: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake COMPILER_MAJOR_VERSION: 8 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=TSAN" @@ -33,7 +33,7 @@ gromacs:clang-TSAN:build: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake needs: - job: gromacs:clang-TSAN:configure @@ -43,7 +43,7 @@ gromacs:clang-TSAN:test: - .rules:post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake needs: - job: gromacs:clang-TSAN:build @@ -53,7 +53,7 @@ gromacs:clang-TSAN:regressiontest: - .rules:post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake tags: - k8s-scilifelab needs: diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-UBSAN.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-UBSAN.gitlab-ci.yml index 8676952bee..46dc34c879 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-UBSAN.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-UBSAN.gitlab-ci.yml @@ -20,7 +20,7 @@ gromacs:clang-UBSAN:configure: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake COMPILER_MAJOR_VERSION: 8 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=UBSAN" @@ -33,7 +33,7 @@ gromacs:clang-UBSAN:build: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake tags: - k8s-scilifelab needs: @@ -46,7 +46,7 @@ gromacs:clang-UBSAN:test: - .rules:post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake tags: - k8s-scilifelab needs: diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml index 0d6624c59c..d49f8d3a33 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml @@ -19,7 +19,7 @@ gromacs:clang-static-analyzer:configure: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake CMAKE_COMPILER_SCRIPT: "-DCMAKE_CXX_COMPILER=/usr/local/libexec/c++-analyzer -DCMAKE_C_COMPILER=gcc" CMAKE_EXTRA_OPTIONS: "-DGMX_CLANG_ANALYZER=ON -DGMX_OPENMP=OFF -DGMX_USE_RDTSCP=OFF -DGMX_FFT_LIBRARY=fftpack -DGMX_DEVELOPER_BUILD=ON" CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None" @@ -33,7 +33,7 @@ gromacs:clang-static-analyzer:build: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-8-tsan variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake tags: - k8s-scilifelab needs: diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10.gitlab-ci.yml index 0b4f7a7f9b..64cb95d1b5 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10.gitlab-ci.yml @@ -23,7 +23,7 @@ gromacs:gcc-10:configure: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AVX2_256" CMAKE_EXTRA_OPTIONS: "-DGMX_EXTERNAL_CLFFT=ON" COMPILER_MAJOR_VERSION: 10 @@ -37,7 +37,7 @@ gromacs:gcc-10:build: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake needs: - job: gromacs:gcc-10:configure @@ -47,7 +47,7 @@ gromacs:gcc-10:test: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "amd.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1 LD_LIBRARY_PATH: "/opt/rocm-3.5.0/opencl/lib" @@ -62,7 +62,7 @@ gromacs:gcc-10:regressiontest: - .rules:post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "amd.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1 REGRESSIONTEST_PME_RANK_NUMBER: 0 diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-7-cuda-10.2.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-7-cuda-10.2.gitlab-ci.yml index 41ed3989a0..e3e5817d02 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-7-cuda-10.2.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-7-cuda-10.2.gitlab-ci.yml @@ -28,7 +28,7 @@ gromacs:gcc-7-cuda-10.2:configure: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-cuda-10.2 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=SSE4.1" COMPILER_MAJOR_VERSION: 7 @@ -41,7 +41,7 @@ gromacs:gcc-7-cuda-10.2:build: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-cuda-10.2 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake needs: - job: gromacs:gcc-7-cuda-10.2:configure @@ -51,7 +51,7 @@ gromacs:gcc-7-cuda-10.2:test: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-cuda-10.2 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1 tags: @@ -65,7 +65,7 @@ gromacs:gcc-7-cuda-10.2:test-gpucommupd: - .rules:post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-cuda-10.2 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1 GMX_GPU_DD_COMMS: 1 @@ -82,7 +82,7 @@ gromacs:gcc-7-cuda-10.2:regressiontest: - .rules:merge-requests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-cuda-10.2 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1 REGRESSIONTEST_PME_RANK_NUMBER: 0 @@ -100,7 +100,7 @@ gromacs:gcc-7-cuda-10.2:regressiontest-gpucommupd-tMPI: - .rules:post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-cuda-10.2 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.17.2/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 2 REGRESSIONTEST_PME_RANK_NUMBER: 0 diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-8-cuda-11.0-release.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-8-cuda-11.0-release.gitlab-ci.yml index 0b9458e563..ca45745dc4 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-8-cuda-11.0-release.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-8-cuda-11.0-release.gitlab-ci.yml @@ -3,6 +3,7 @@ # OS: Ubuntu oldest supported # GPU: CUDA newest supported # HW: NVIDIA GPU +# CMake: oldest supported # Scope: configure, build, unit tests # Test implementation choices (free to change as needed): # OS: Ubuntu 18.04 @@ -23,7 +24,7 @@ gromacs:gcc-8-cuda-11.0:release:configure: - .rules:nightly-only-for-release image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-8-cuda-11.0 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake COMPILER_MAJOR_VERSION: 8 RELEASE_BUILD_DIR: release-builds-gcc CMAKE_BUILD_TYPE_OPTIONS : "-DCMAKE_BUILD_TYPE=RelWithAssert" @@ -42,7 +43,7 @@ gromacs:gcc-8-cuda-11.0:release:build: - .rules:nightly-only-for-release stage: release-build variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-gcc image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-8-cuda-11.0 needs: @@ -55,7 +56,7 @@ gromacs:gcc-8-cuda-11.0:release:test: stage: release-tests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-8-cuda-11.0 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1 BUILD_DIR: release-builds-gcc diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-8-cuda-11.0.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-8-cuda-11.0.gitlab-ci.yml index 59a8e11160..37704f4040 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-8-cuda-11.0.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-8-cuda-11.0.gitlab-ci.yml @@ -24,7 +24,7 @@ gromacs:gcc-8-cuda-11.0:configureMPI: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-8-cuda-11.0 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=SSE4.1" COMPILER_MAJOR_VERSION: 8 @@ -37,7 +37,7 @@ gromacs:gcc-8-cuda-11.0:buildMPI: - .rules:merge-and-post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-8-cuda-11.0 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake needs: - job: gromacs:gcc-8-cuda-11.0:configureMPI @@ -49,7 +49,7 @@ gromacs:gcc-8-cuda-11.0:regressiontest-gpucommupd-MPI: - .rules:post-merge-acceptance image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-8-cuda-11.0 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.18.4/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 2 REGRESSIONTEST_PME_RANK_NUMBER: 0 diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-9-release.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-9-release.gitlab-ci.yml index 4e05b53ede..d62af3b596 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-9-release.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-9-release.gitlab-ci.yml @@ -22,7 +22,7 @@ gromacs:gcc-9:release:configure: - .rules:nightly-only-for-release image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-9 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake COMPILER_MAJOR_VERSION: 9 RELEASE_BUILD_DIR: release-builds-gcc CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert" @@ -42,7 +42,7 @@ gromacs:gcc-9:release:build: - .rules:nightly-only-for-release stage: release-build variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-gcc image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-9 needs: @@ -55,7 +55,7 @@ gromacs:gcc-9:release:test: stage: release-tests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-9 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-gcc KUBERNETES_EXTENDED_RESOURCE_NAME: "amd.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1 @@ -73,7 +73,7 @@ gromacs:gcc-9:release:regressiontest: stage: release-tests image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-9 variables: - CMAKE: /usr/local/cmake-3.13.0/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-gcc KUBERNETES_EXTENDED_RESOURCE_NAME: "amd.com/gpu" KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1 diff --git a/admin/gitlab-ci/lint.gitlab-ci.yml b/admin/gitlab-ci/lint.gitlab-ci.yml index e98ae896e0..7147b368c0 100644 --- a/admin/gitlab-ci/lint.gitlab-ci.yml +++ b/admin/gitlab-ci/lint.gitlab-ci.yml @@ -7,7 +7,7 @@ clang-tidy:configure-push: - .rules:basic-push image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake COMPILER_MAJOR_VERSION: 9 BUILD_DIR: build-clang-tidy CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON @@ -19,7 +19,7 @@ clang-tidy:configure-schedule: - .rules:nightly-not-for-release image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9 variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake COMPILER_MAJOR_VERSION: 9 BUILD_DIR: build-clang-tidy CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON @@ -35,7 +35,7 @@ clang-tidy:build: needs: - job: clang-tidy:configure-schedule variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: build-clang-tidy clang-tidy:test: @@ -48,7 +48,7 @@ clang-tidy:test: needs: - job: clang-tidy:configure-push variables: - CMAKE: /usr/local/cmake-3.15.7/bin/cmake + CMAKE: /usr/local/cmake-3.16.3/bin/cmake COMPILER_MAJOR_VERSION: 9 BUILD_DIR: build-clang-tidy EXTRA_INSTALLS: clang-tidy-$COMPILER_MAJOR_VERSION diff --git a/cmake/FindLmfit.cmake b/cmake/FindLmfit.cmake index 4f9b3ecee8..61370821af 100644 --- a/cmake/FindLmfit.cmake +++ b/cmake/FindLmfit.cmake @@ -1,7 +1,7 @@ # # This file is part of the GROMACS molecular simulation package. # -# Copyright (c) 2016,2018, by the GROMACS development team, led by +# Copyright (c) 2016,2018,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. @@ -97,10 +97,8 @@ mark_as_advanced(LMFIT_INCLUDE_DIR LMFIT_LIBRARY) # library built in the main project. if (LMFIT_FOUND) add_library(lmfit INTERFACE IMPORTED) - set_target_properties(lmfit PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${LMFIT_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "${LMFIT_LIBRARY}" - ) + target_link_libraries(lmfit INTERFACE "${LMFIT_LIBRARY}") + target_include_directories(lmfit SYSTEM BEFORE INTERFACE "${LMFIT_INCLUDE_DIR}") endif() cmake_pop_check_state() diff --git a/cmake/FindclFFT.cmake b/cmake/FindclFFT.cmake index a13470d8bf..ea66f2b50a 100644 --- a/cmake/FindclFFT.cmake +++ b/cmake/FindclFFT.cmake @@ -1,7 +1,7 @@ # # This file is part of the GROMACS molecular simulation package. # -# Copyright (c) 2018, by the GROMACS development team, led by +# Copyright (c) 2018,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. @@ -88,12 +88,7 @@ mark_as_advanced(clFFT_ROOT_DIR clFFT_LIBRARY clFFT_INCLUDE_DIR) # that was found was actually built in this project. if(clFFT_FOUND) add_library(clFFT INTERFACE IMPORTED) - # When we depend on cmake 3.11, this work-around (specific to - # imported targets) can be done more simply by using the normal - # target_include_directories() and target_link_libraries() - set_target_properties(clFFT PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${clFFT_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "${clFFT_LIBRARY};${CMAKE_DL_LIBS}" - ) + target_link_libraries(clFFT INTERFACE "${clFFT_LIBRARY}" "${CMAKE_DL_LIBS}") + target_include_directories(clFFT SYSTEM BEFORE INTERFACE "${clFFT_INCLUDE_DIR}") endif() diff --git a/cmake/gmxPythonDiscovery.cmake b/cmake/gmxPythonDiscovery.cmake index b778c39bea..c55a7f0575 100644 --- a/cmake/gmxPythonDiscovery.cmake +++ b/cmake/gmxPythonDiscovery.cmake @@ -1,7 +1,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. @@ -42,28 +42,17 @@ if(FIND_PACKAGE_MESSAGE_DETAILS_Python3) set(Python3_FIND_QUIETLY ON) set(PythonInterp_FIND_QUIETLY ON) endif() -if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) - if (NOT Python3_FIND_STRATEGY) - # If the user provides a hint for the Python installation with Python3_ROOT_DIR, - # prevent FindPython3 from overriding the choice with a newer Python version - # when CMP0094 is set to OLD. - set(Python3_FIND_STRATEGY LOCATION) - endif () - if(NOT Python3_FIND_VIRTUALENV) - # We advocate using Python venvs to manage package availability, so by default - # we want to preferentially discover user-space software. - set(Python3_FIND_VIRTUALENV FIRST) - endif() -else() - if(NOT Python3_FIND_REGISTRY) - # We advocate using Python venvs to manage package availability, so by default - # we want to preferentially discover user-space software. - set(Python3_FIND_REGISTRY LAST) - endif() - # Make package discovery consistent with Unix behavior and our documented - # suggestions for installing dependencies. - set(CMAKE_FIND_FRAMEWORK LAST) +if (NOT Python3_FIND_STRATEGY) + # If the user provides a hint for the Python installation with Python3_ROOT_DIR, + # prevent FindPython3 from overriding the choice with a newer Python version + # when CMP0094 is set to OLD. + set(Python3_FIND_STRATEGY LOCATION) endif () +if(NOT Python3_FIND_VIRTUALENV) + # We advocate using Python venvs to manage package availability, so by default + # we want to preferentially discover user-space software. + set(Python3_FIND_VIRTUALENV FIRST) +endif() if(GMX_PYTHON_PACKAGE) find_package(Python3 3.6 COMPONENTS Interpreter Development) if (NOT Python3_FOUND OR NOT Python3_Development_FOUND) diff --git a/python_packaging/requirements-test.txt b/python_packaging/requirements-test.txt index ef4c6ae0a9..b40cd61065 100644 --- a/python_packaging/requirements-test.txt +++ b/python_packaging/requirements-test.txt @@ -1,6 +1,6 @@ # Python package requirements for complete build, installation, and testing of # gmxapi functionality. -cmake>=3.13 +cmake>=3.16.3 flake8>=3.7.7 networkx>=2.0 numpy>=1 diff --git a/python_packaging/sample_restraint/CMakeLists.txt b/python_packaging/sample_restraint/CMakeLists.txt index fee19bfcd2..352bb16c0a 100644 --- a/python_packaging/sample_restraint/CMakeLists.txt +++ b/python_packaging/sample_restraint/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.0) +cmake_minimum_required(VERSION 3.16.3) # If you are using this repository as a template, you should probably change the # project name and adopt your own versioning scheme. project(sample_restraint VERSION 0.0.8) diff --git a/python_packaging/src/CMakeLists.txt b/python_packaging/src/CMakeLists.txt index 1e82f3ba95..e9da713490 100644 --- a/python_packaging/src/CMakeLists.txt +++ b/python_packaging/src/CMakeLists.txt @@ -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. @@ -38,7 +38,7 @@ # configure and run CMake. CMake could be invoked directly by the user or a # parent package, but the Python distribution would not be packaged automatically. # Reference https://gitlab.com/gromacs/gromacs/-/issues/2896 for additional discussion. -cmake_minimum_required(VERSION 3.13.0) +cmake_minimum_required(VERSION 3.16.3) # This needs to be set before project() in order to pick up toolchain files #list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake) diff --git a/share/template/CMakeLists.txt.template b/share/template/CMakeLists.txt.template index a7ddcdd67b..9299e06272 100644 --- a/share/template/CMakeLists.txt.template +++ b/share/template/CMakeLists.txt.template @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.9.6) +cmake_minimum_required(VERSION 3.16.3) project(template CXX) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -- 2.22.0