Support clang 13 in CI
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 21 Oct 2021 17:09:33 +0000 (17:09 +0000)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 21 Oct 2021 17:09:33 +0000 (17:09 +0000)
admin/containers/buildall.sh
admin/containers/scripted_gmx_docker_builds.py
admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml
admin/gitlab-ci/gromacs.matrix/gromacs.clang-13-mpi.gitlab-ci.yml [moved from admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-mpi.gitlab-ci.yml with 70% similarity]
admin/gitlab-ci/gromacs.matrix/gromacs.clang-13-release.gitlab-ci.yml [moved from admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-release.gitlab-ci.yml with 73% similarity]
docs/install-guide/index.rst

index e7ad2f61189289f666434b6859f14a5d1a8043db..597d86ef2e9dfb47412a0835031fccdea935b995 100755 (executable)
@@ -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"
index 31cb993afffc5e120b00b0d0808a3e75b3159a26..0f9bc18ad2ea24c1c5c4746f00e4c52f5f979574 100755 (executable)
@@ -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)
 
index fbb7fc3a6ce99b516d8e6fde6dba36935abe87f3..f137ac945d09c84d27f943a8a44229871458b724 100644 (file)
 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'
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 85713c08c33d53944ed1714be17f6d8bdbaf7eb0..91e3f55b58beefa18b2d36b4379a7cc26d7407f1 100644 (file)
@@ -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
 
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 67363c4e53e11ee8731440578b21248b7356f433..084eb4849d52383e79b0f7a60ff07c420cc547be 100644 (file)
@@ -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
 
index 45c9e1ac950665aad2d40eff8381f300feda287e..b8a06aa02a172d6efcebbb3003ed110525ae7766 100644 (file)
@@ -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 <https://gitlab.com/gromacs/gromacs/>`_,