From: Mark Abraham Date: Thu, 21 Oct 2021 17:09:33 +0000 (+0000) Subject: Support clang 13 in CI X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=f6793f9b3baa31c5f48382c5fb5295a35608cc34 Support clang 13 in CI --- diff --git a/admin/containers/buildall.sh b/admin/containers/buildall.sh index e7ad2f6118..597d86ef2e 100755 --- a/admin/containers/buildall.sh +++ b/admin/containers/buildall.sh @@ -15,7 +15,7 @@ args[${#args[@]}]="--gcc 7 --cuda 11.0 --clfft --mpi openmpi --heffte v2.1.0" args[${#args[@]}]="--llvm 11 --cuda 11.4.1" args[${#args[@]}]="--llvm 11 --tsan" args[${#args[@]}]="--llvm 8 --cuda 11.0 --clfft --mpi openmpi" -args[${#args[@]}]="--llvm 12 --clfft --mpi openmpi --rocm" +args[${#args[@]}]="--llvm 13 --clfft --mpi openmpi --rocm" args[${#args[@]}]="--oneapi 2021.4.0" args[${#args[@]}]="--oneapi 2021.4.0 --intel-compute-runtime" args[${#args[@]}]="--llvm --doxygen --mpi openmpi --venvs 3.7.7" diff --git a/admin/containers/scripted_gmx_docker_builds.py b/admin/containers/scripted_gmx_docker_builds.py index 31cb993aff..0f9bc18ad2 100755 --- a/admin/containers/scripted_gmx_docker_builds.py +++ b/admin/containers/scripted_gmx_docker_builds.py @@ -272,10 +272,10 @@ def get_compiler(args, compiler_build_stage: hpccm.Stage = None) -> bb_base: raise RuntimeError('No TSAN compiler build stage!') # Build the default compiler if we don't need special support else: - # Currently the focal apt repositories do not contain - # llvm higher than 11, so we work around that. This will - # need further work when we start supporting ubuntu 22.04 - compiler = hpccm.building_blocks.llvm(version=args.llvm, upstream=True if int(args.llvm) > 11 else False) + # Always use the "upstream" llvm repositories because the + # main ubuntu repositories stop adding support for new + # llvm versions after a few llvm releases. + compiler = hpccm.building_blocks.llvm(version=args.llvm, upstream=True) elif args.oneapi is not None: if compiler_build_stage is not None: @@ -754,7 +754,7 @@ def build_stages(args) -> typing.Iterable[hpccm.Stage]: # Add Python environments to MPI images, only, so we don't have to worry # about whether to install mpi4py. if args.mpi is not None and len(args.venvs) > 0: - add_python_stages(building_blocks=building_blocks, input_args=args, output_stages=stages) + add_python_stages(base='build_base', input_args=args, output_stages=stages) # Create the stage from which the targeted image will be tagged. stages['main'] = hpccm.Stage() @@ -799,6 +799,12 @@ if __name__ == '__main__': # Set container specification output format hpccm.config.set_container_format(args.format) + # Normally in hpccm the first call to baseimage sets the context + # for other packages, e.g. which distro version to use. We want to + # set that early on, so that hpccm can do the right thing to use + # the right llvm apt repo when we want to use versions of llvm + # that were never supported by the main apt repo. + hpccm.config.set_linux_distro(hpccm_distro_name(args)) container_recipe = build_stages(args) diff --git a/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml index fbb7fc3a6c..f137ac945d 100644 --- a/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml @@ -192,8 +192,8 @@ include: - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-8-cuda-11.0-release.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-8.gitlab-ci.yml' - - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-mpi.gitlab-ci.yml' - - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-release.gitlab-ci.yml' + - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-13-mpi.gitlab-ci.yml' + - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-13-release.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-cuda-11.4.1.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-ASAN.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml' diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-mpi.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-13-mpi.gitlab-ci.yml similarity index 70% rename from admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-mpi.gitlab-ci.yml rename to admin/gitlab-ci/gromacs.matrix/gromacs.clang-13-mpi.gitlab-ci.yml index 85713c08c3..91e3f55b58 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-mpi.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-13-mpi.gitlab-ci.yml @@ -9,28 +9,28 @@ # Test implementation choices (free to change as needed): # OS: Ubuntu 20.04 # Build type: Debug -# Compiler: Clang 12 +# Compiler: Clang 13 # MPI: OpenMPI 3.1 # SIMD: AVX2_256 # FFT: FFTW3 # Parallelism np/ntomp: 4/2 # Subcyclecounting: Active -gromacs:clang-12-mpi:configure: +gromacs:clang-13-mpi:configure: extends: - .gromacs:base:configure - .use-clang:base - .use-mpi - .rules:merge-requests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-13 variables: CMAKE: /usr/local/cmake-3.17.2/bin/cmake - COMPILER_MAJOR_VERSION: 12 + COMPILER_MAJOR_VERSION: 13 CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON CMAKE_EXTRA_OPTIONS: -DGMX_CYCLE_SUBCOUNTERS=ON -DGMX_INSTALL_LEGACY_API=ON -gromacs:clang-12-mpi:build: - # Test using configuration: gromacs:clang-12-mpi:configure +gromacs:clang-13-mpi:build: + # Test using configuration: gromacs:clang-13-mpi:configure # Test scope: build extends: - .variables:default @@ -38,29 +38,29 @@ gromacs:clang-12-mpi:build: - .before_script:default - .use-ccache - .rules:merge-requests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-13 variables: CMAKE: /usr/local/cmake-3.17.2/bin/cmake needs: - - job: gromacs:clang-12-mpi:configure + - job: gromacs:clang-13-mpi:configure -gromacs:clang-12-mpi:test: +gromacs:clang-13-mpi:test: extends: - .gromacs:base:test - .rules:merge-requests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-13 variables: CMAKE: /usr/local/cmake-3.17.2/bin/cmake tags: - k8s-scilifelab needs: - - job: gromacs:clang-12-mpi:build + - job: gromacs:clang-13-mpi:build -gromacs:clang-12:regressiontest: +gromacs:clang-13:regressiontest: extends: - .gromacs:base:regressiontest - .rules:merge-requests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-13 variables: CMAKE: /usr/local/cmake-3.17.2/bin/cmake REGRESSIONTEST_DOUBLE: "-double" @@ -68,6 +68,6 @@ gromacs:clang-12:regressiontest: tags: - k8s-scilifelab needs: - - job: gromacs:clang-12-mpi:build + - job: gromacs:clang-13-mpi:build - job: regressiontests:prepare diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-release.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-13-release.gitlab-ci.yml similarity index 73% rename from admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-release.gitlab-ci.yml rename to admin/gitlab-ci/gromacs.matrix/gromacs.clang-13-release.gitlab-ci.yml index 67363c4e53..084eb4849d 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-release.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-13-release.gitlab-ci.yml @@ -9,22 +9,22 @@ # Test implementation choices (free to change as needed): # OS: Ubuntu 20.04 # Build type: RelWithAssert -# Compiler: Clang 12 +# Compiler: Clang 13 # MPI: OpenMPI 3.1 # SIMD: AVX2_256 # FFT: FFTW3 # Parallelism np/ntomp: 4/2 -gromacs:clang-12:release:configure: +gromacs:clang-13:release:configure: extends: - .gromacs:base:release:configure - .use-clang:base - .use-mpi - .rules:nightly-only-for-release - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-13 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake - COMPILER_MAJOR_VERSION: 12 + COMPILER_MAJOR_VERSION: 13 RELEASE_BUILD_DIR: release-builds-clang CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=ON" CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert" @@ -33,7 +33,7 @@ gromacs:clang-12:release:configure: - regressiontests:package - prepare-release-version -gromacs:clang-12:release:build: +gromacs:clang-13:release:build: extends: - .variables:default - .gromacs:base:build @@ -44,29 +44,29 @@ gromacs:clang-12:release:build: variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-clang - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-13 needs: - - job: gromacs:clang-12:release:configure + - job: gromacs:clang-13:release:configure -gromacs:clang-12:release:test: +gromacs:clang-13:release:test: extends: - .gromacs:base:test - .rules:nightly-only-for-release stage: release-tests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-13 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-clang needs: - - job: gromacs:clang-12:release:configure - - job: gromacs:clang-12:release:build + - job: gromacs:clang-13:release:configure + - job: gromacs:clang-13:release:build -gromacs:clang-12:release:regressiontest: +gromacs:clang-13:release:regressiontest: extends: - .gromacs:base:regressiontest - .rules:nightly-only-for-release stage: release-tests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-13 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-clang @@ -75,6 +75,6 @@ gromacs:clang-12:release:regressiontest: tags: - k8s-scilifelab needs: - - job: gromacs:clang-12:release:build + - job: gromacs:clang-13:release:build - job: regressiontests:package diff --git a/docs/install-guide/index.rst b/docs/install-guide/index.rst index 45c9e1ac95..b8a06aa02a 100644 --- a/docs/install-guide/index.rst +++ b/docs/install-guide/index.rst @@ -113,8 +113,8 @@ compiler. Since we require full C++17 support the minimum supported compiler versions are * GNU (gcc/libstdc++) 7 -* LLVM (clang/libc++) 5 -* Microsoft (MSVC) 2017 15.7 +* LLVM (clang/libc++) 8 +* Microsoft (MSVC) 2019 Other compilers may work (Cray, Pathscale, older clang) but do not offer competitive performance. We recommend against PGI because @@ -1282,11 +1282,12 @@ much everywhere, it is important that we tell you where we really know it works because we have tested it. Every commit in our git source code repository is currently tested with a range of configuration options on x86 with -gcc versions 7 and 8, -clang versions 8 and 9, +gcc versions including 7 and 11, +clang versions including 8 and 13, +CUDA versions 11.0 and 11.4.2, and a version of oneAPI containing Intel's clang-based compiler. -For this testing, we use Ubuntu 18.04 or 20.04 operating system. +For this testing, we use Ubuntu 20.04 operating system. Other compiler, library, and OS versions are tested less frequently. For details, you can have a look at the `continuous integration server used by GROMACS `_,