Update CI image to OneAPI 2021.1.1, add ICC tests.
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 17 Dec 2020 11:10:35 +0000 (11:10 +0000)
committerAndrey Alekseenko <al42and@gmail.com>
Thu, 17 Dec 2020 11:10:35 +0000 (11:10 +0000)
Also, backport a change from MR !796 that silences the false-positive ICC
compiler warning.

admin/containers/buildall.sh
admin/containers/scripted_gmx_docker_builds.py
admin/containers/utility.py
admin/gitlab-ci/global.gitlab-ci.yml
admin/gitlab-ci/gromacs.gitlab-ci.yml
src/gromacs/fft/calcgrid.cpp

index f44058a43a35969de768f8c352213c5212bac9ee..ba8759ee64b4c11ddba9179a968132fea1098354 100644 (file)
@@ -18,7 +18,7 @@ args[${#args[@]}]="--llvm 8 --cuda 10.0 --clfft --mpi openmpi"
 args[${#args[@]}]="--llvm 8 --cuda 10.1 --clfft --mpi openmpi"
 args[${#args[@]}]="--llvm 8 --cuda 11.0 --clfft --mpi openmpi"
 args[${#args[@]}]="--llvm 9 --clfft --mpi openmpi --ubuntu 18.04"
-args[${#args[@]}]="--oneapi 2021.1-beta09"
+args[${#args[@]}]="--oneapi 2021.1.1"
 args[${#args[@]}]="--llvm --doxygen"
 
 echo "Building the following images."
index 1b820805bdce2683f03e6fb535d1705fa76a237e..2e3bb6a1e26fedb20314bd816a23c8d9b834fda7 100755 (executable)
@@ -347,7 +347,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-compiler-pro-{}'.format(version),
+        ospackages=['intel-oneapi-dpcpp-cpp-{}'.format(version),
             'intel-oneapi-openmp-{}'.format(version),
             'intel-oneapi-mkl-{}'.format(version),
             'intel-oneapi-mkl-devel-{}'.format(version)]
index 66d8af6fd320645008cdf145c8e1220204272f13..046a8982452961fefa37460de0d1707889fa9c1f 100644 (file)
@@ -104,7 +104,7 @@ compiler_group.add_argument('--icc', type=int, nargs='?', const=19, default=None
 # oneAPI makes an official release. Also, the resulting container is a mix
 # of packages with different betaXY version numbers, which hopefully works and
 # is what Intel intends...
-compiler_group.add_argument('--oneapi', type=str, nargs='?', const="2021.1-beta09", default=None,
+compiler_group.add_argument('--oneapi', type=str, nargs='?', const="2021.1.1", default=None,
                             help='Select Intel oneAPI package version.')
 
 linux_group = parser.add_mutually_exclusive_group()
index d7eb86ac1207b3c4be98a2d0c98823a71b4ffbe9..c90d795014dac27abf99bbd1d9a8f540d034508b 100644 (file)
     - mkdir -p ccache
     - export CCACHE_BASEDIR=${PWD}
     - export CCACHE_DIR=${PWD}/ccache
+
+# Base definition for using the classic Intel compiler
+.use-icc-oneapi:base:
+  variables:
+    CMAKE_COMPILER_SCRIPT: -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc #-DCMAKE_PREFIX_PATH=/opt/intel/oneapi/compiler/latest/linux
+    CMAKE_EXTRA_OPTIONS: -DGMX_FFT_LIBRARY=mkl
+  before_script:
+    # Necessary to override gitlab default 'set -e' which breaks Intel's
+    # setvar.sh script
+    - set +e
+    - source /opt/intel/oneapi/setvars.sh
+    - set -e
+    - mkdir -p ccache
+#    - export CCACHE_BASEDIR=${PWD}
+#    - export CCACHE_DIR=${PWD}/ccache
index 2850546af49808017f2b218ac7b6ae2d3bf28f57..582be7e014e1b42975c6a9f44199a8000722be8c 100644 (file)
@@ -283,6 +283,16 @@ gromacs:clang-TSAN:configure:
     COMPILER_MAJOR_VERSION: 8
     CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=TSAN"
 
+gromacs:icc-2021.1: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:clang-8:configure:
   extends:
     - .gromacs:base:configure
@@ -327,24 +337,24 @@ gromacs:clang-ASAN:configure:
     COMPILER_MAJOR_VERSION: 8
     CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=ASAN"
 
-gromacs:oneapi-2021.1-beta09-opencl:configure:
+gromacs:oneapi-2021.1.1-opencl:configure:
   extends:
    - .gromacs:base:configure
    - .use-oneapi:base
    - .use-opencl
    - .rules:merge-requests
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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:oneapi-2021.1-beta09-sycl:configure:
+gromacs:oneapi-2021.1.1-sycl:configure:
   extends:
    - .gromacs:base:configure
    - .use-oneapi:base
    - .use-sycl
    - .rules:merge-and-post-merge-acceptance
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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
@@ -427,13 +437,13 @@ gromacs:clang-8-cuda-10.1:release:configure:
     RELEASE_BUILD_DIR: release-builds-clang
     CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert"
 
-gromacs:oneapi-2021.1-beta09-opencl:release:configure:
+gromacs:oneapi-2021.1.1-opencl:release:configure:
   extends:
    - .gromacs:base:release:configure
    - .use-oneapi:base
    - .use-opencl
    - .rules:nightly-only-for-release
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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
@@ -542,6 +552,18 @@ gromacs:clang-TSAN:build:
   needs:
     - job: gromacs:clang-TSAN:configure
 
+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:clang-ASAN:build:
   extends:
     - .variables:default
@@ -598,31 +620,31 @@ gromacs:clang-8:build:
   needs:
     - job: gromacs:clang-8:configure
 
-gromacs:oneapi-2021.1-beta09-opencl:build:
+gromacs:oneapi-2021.1.1-opencl:build:
   extends:
     - .variables:default
     - .gromacs:base:build
     - .use-ccache
     - .use-oneapi:base
     - .rules:merge-requests
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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:oneapi-2021.1-beta09-opencl:configure
+    - job: gromacs:oneapi-2021.1.1-opencl:configure
 
-gromacs:oneapi-2021.1-beta09-sycl:build:
+gromacs:oneapi-2021.1.1-sycl:build:
   extends:
     - .variables:default
     - .gromacs:base:build
     - .use-ccache
     - .use-oneapi:base
     - .rules:merge-and-post-merge-acceptance
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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:oneapi-2021.1-beta09-sycl:configure
+    - job: gromacs:oneapi-2021.1.1-sycl:configure
 
 gromacs:clang-9-mpi:build:
   extends:
@@ -696,7 +718,7 @@ gromacs:clang-8-cuda-10.1:release:build:
   needs:
     - job: gromacs:clang-8-cuda-10.1:release:configure
 
-gromacs:oneapi-2021.1-beta09-opencl:release:build:
+gromacs:oneapi-2021.1.1-opencl:release:build:
   extends:
     - .variables:default
     - .gromacs:base:build
@@ -709,9 +731,9 @@ gromacs:oneapi-2021.1-beta09-opencl:release:build:
     CMAKE: /usr/local/cmake-3.17.2/bin/cmake
     BUILD_DIR: release-builds-oneapi
     COMPILER_MAJOR_VERSION: 2021
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1.1
   needs:
-    - job: gromacs:oneapi-2021.1-beta09-opencl:release:configure
+    - job: gromacs:oneapi-2021.1.1-opencl:release:configure
 
 # Jobs running during test stage
 
@@ -871,6 +893,17 @@ gromacs:clang-TSAN:test:
   needs:
     - job: gromacs:clang-TSAN:build
 
+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:clang-ASAN:test:
   extends:
     - .gromacs:base:test
@@ -898,27 +931,27 @@ gromacs:clang-UBSAN:test:
   needs:
     - job: gromacs:clang-UBSAN:build
 
-gromacs:oneapi-2021.1-beta09-opencl:test:
+gromacs:oneapi-2021.1.1-opencl:test:
   extends:
     - .gromacs:base:test
     - .use-oneapi:base
     - .rules:merge-requests
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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:oneapi-2021.1-beta09-opencl:build
+    - job: gromacs:oneapi-2021.1.1-opencl:build
 
-gromacs:oneapi-2021.1-beta09-sycl:test:
+gromacs:oneapi-2021.1.1-sycl:test:
   extends:
     - .gromacs:base:test
     - .use-oneapi:base
     - .rules:post-merge-acceptance
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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:oneapi-2021.1-beta09-sycl:build
+    - job: gromacs:oneapi-2021.1.1-sycl:build
 
 gromacs:clang-9-mpi:test:
   extends:
@@ -1088,6 +1121,18 @@ gromacs:clang-TSAN:regressiontest:
     - job: gromacs:clang-TSAN:build
     - job: regressiontests:prepare
 
+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
+
 gromacs:clang-ASAN:regressiontest:
   extends:
     - .gromacs:base:regressiontest
@@ -1117,28 +1162,28 @@ gromacs:clang-9:regressiontest:
     - job: gromacs:clang-9-mpi:build
     - job: regressiontests:prepare
 
-gromacs:oneapi-2021.1-beta09-opencl:regressiontest:
+gromacs:oneapi-2021.1.1-opencl:regressiontest:
   extends:
     - .gromacs:base:regressiontest
     - .use-oneapi:base
     - .rules:merge-requests
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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:oneapi-2021.1-beta09-opencl:build
+    - job: gromacs:oneapi-2021.1.1-opencl:build
     - job: regressiontests:prepare
 
-gromacs:oneapi-2021.1-beta09-sycl:regressiontest:
+gromacs:oneapi-2021.1.1-sycl:regressiontest:
   extends:
     - .gromacs:base:regressiontest
     - .use-oneapi:base
     - .rules:post-merge-acceptance
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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:oneapi-2021.1-beta09-sycl:build
+    - job: gromacs:oneapi-2021.1.1-sycl:build
     - job: regressiontests:prepare
 
 gromacs:gcc-8-cuda-11.0:release:test:
@@ -1205,19 +1250,19 @@ gromacs:clang-8-cuda-10.1:release:test:
     - job: gromacs:clang-8-cuda-10.1:release:configure
     - job: gromacs:clang-8-cuda-10.1:release:build
 
-gromacs:oneapi-2021.1-beta09-opencl:release:test:
+gromacs:oneapi-2021.1.1-opencl:release:test:
   extends:
     - .gromacs:base:test
     - .use-oneapi:base
     - .rules:nightly-only-for-release
   stage: release-tests
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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
     BUILD_DIR: release-builds-oneapi
   needs:
-    - job: gromacs:oneapi-2021.1-beta09-opencl:release:configure
-    - job: gromacs:oneapi-2021.1-beta09-opencl:release:build
+    - job: gromacs:oneapi-2021.1.1-opencl:release:configure
+    - job: gromacs:oneapi-2021.1.1-opencl:release:build
 
 gromacs:gcc-9:release:regressiontest:
   extends:
@@ -1273,13 +1318,13 @@ gromacs:clang-8-cuda-10.1:release:regressiontest:
     - job: gromacs:clang-8-cuda-10.1:release:build
     - job: regressiontests:package
 
-gromacs:oneapi-2021.1-beta09-opencl:release:regressiontest:
+gromacs:oneapi-2021.1.1-opencl:release:regressiontest:
   extends:
     - .gromacs:base:regressiontest
     - .use-oneapi:base
     - .rules:nightly-only-for-release
   stage: release-tests
-  image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-gcc-7-oneapi-2021.1-beta09
+  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
     BUILD_DIR: release-builds-oneapi
@@ -1287,5 +1332,5 @@ gromacs:oneapi-2021.1-beta09-opencl:release:regressiontest:
     REGRESSIONTEST_TOTAL_RANK_NUMBER: 2
     REGRESSIONTEST_OMP_RANK_NUMBER: 1
   needs:
-    - job: gromacs:oneapi-2021.1-beta09-opencl:release:build
+    - job: gromacs:oneapi-2021.1.1-opencl:release:build
     - job: regressiontests:package
index 8d293464b7b069a005aecb843a6689d8fbcfcc4f..de0bbb1b9a10eeb98b1d857a37e79e2238b5ea44 100644 (file)
  */
 
 /* Small grid size array */
-#define g_initNR 15
-const int grid_init[g_initNR] = { 6, 8, 10, 12, 14, 16, 20, 24, 25, 28, 32, 36, 40, 42, 44 };
+constexpr int g_initNR            = 15;
+constexpr int grid_init[g_initNR] = { 6, 8, 10, 12, 14, 16, 20, 24, 25, 28, 32, 36, 40, 42, 44 };
 
 /* For larger grid sizes, a prefactor with any power of 2 can be added.
  * Only sizes divisible by 4 should be used, 90 is allowed, 140 not.
  */
-#define g_baseNR 14
-const int grid_base[g_baseNR] = { 45, 48, 50, 52, 54, 56, 60, 64, 70, 72, 75, 80, 81, 84 };
+constexpr int g_baseNR            = 14;
+constexpr int grid_base[g_baseNR] = { 45, 48, 50, 52, 54, 56, 60, 64, 70, 72, 75, 80, 81, 84 };
 
 real calcFftGrid(FILE* fp, const matrix box, real gridSpacing, int minGridPointsPerDim, int* nx, int* ny, int* nz)
 {
@@ -74,10 +74,8 @@ real calcFftGrid(FILE* fp, const matrix box, real gridSpacing, int minGridPoints
         gmx_fatal(FARGS, "invalid fourier grid spacing: %g", gridSpacing);
     }
 
-    if (grid_base[g_baseNR - 1] % 4 != 0)
-    {
-        gmx_incons("the last entry in grid_base is not a multiple of 4");
-    }
+    static_assert(grid_base[g_baseNR - 1] % 4 == 0,
+                  "the last entry in grid_base is not a multiple of 4");
 
     /* New grid calculation setup:
      *