Update CI containers to oneAPI 2021.4.0
[alexxy/gromacs.git] / admin / containers / utility.py
index 66d8af6fd320645008cdf145c8e1220204272f13..1843aacb51f1d39600afc6447345c4f57a6cf4bd 100644 (file)
@@ -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.
@@ -41,7 +41,7 @@ CI pipeline jobs.
 Example::
 
     $ python3 -m utility --llvm --doxygen
-    gromacs/ci-ubuntu-18.04-llvm-7-docs
+    gromacs/ci-ubuntu-20.04-llvm-7-docs
 
 See Also:
     :file:`buildall.sh`
@@ -69,6 +69,7 @@ Authors:
     * Eric Irrgang <ericirrgang@gmail.com>
     * Joe Jordan <e.jjordan12@gmail.com>
     * Mark Abraham <mark.j.abraham@gmail.com>
+    * Gaurav Garg <gaugarg@nvidia.com>
 
 """
 
@@ -86,7 +87,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', '3.21.2'], # new minimum required versions
                     help='Selection of CMake version to provide to base image')
 
 compiler_group = parser.add_mutually_exclusive_group()
@@ -96,25 +97,21 @@ 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
 # 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()
-# Ubuntu 20+ is not yet tested. See issue #3680
-linux_group.add_argument('--ubuntu', type=str, nargs='?', const='18.04', default='18.04',
-                         help='Select Ubuntu Linux base image. (default: ubuntu 18.04)')
+linux_group.add_argument('--ubuntu', type=str, nargs='?', const='20.04', default='20.04',
+                         help='Select Ubuntu Linux base image. (default: ubuntu 20.04)')
 linux_group.add_argument('--centos', type=str, nargs='?', const='7', default=None,
                          help='Select Centos Linux base image.')
 
-parser.add_argument('--cuda', type=str, nargs='?', const='10.2', default=None,
+parser.add_argument('--cuda', type=str, nargs='?', const='11.0', default=None,
                     help='Select a CUDA version for a base Linux image from NVIDIA.')
 
 parser.add_argument('--mpi', type=str, nargs='?', const='openmpi', default=None,
@@ -123,14 +120,26 @@ parser.add_argument('--mpi', type=str, nargs='?', const='openmpi', default=None,
 parser.add_argument('--tsan', type=str, nargs='?', const='llvm', default=None,
                     help='Build special compiler versions with TSAN OpenMP support')
 
+parser.add_argument('--hipsycl', type=str, nargs='?', default=None,
+                    help='Select hipSYCL repository tag/commit/branch.')
+
+parser.add_argument('--rocm', type=str, nargs='?', const='debian', default=None,
+                    help='Select AMD compute engine version.')
+
+parser.add_argument('--intel-compute-runtime', action='store_true', default=False,
+                    help='Include Intel Compute Runtime.')
+
 parser.add_argument('--clfft', type=str, nargs='?', const='master', default=None,
                     help='Add external clFFT libraries to the build image')
 
+parser.add_argument('--heffte', type=str, nargs='?', default=None,
+                    help='Select heffte repository tag/commit/branch.')
+
 parser.add_argument('--doxygen', type=str, nargs='?', const='1.8.5', default=None,
                     help='Add doxygen environment for documentation builds. Also adds other requirements needed for final docs images.')
 
 # Supported Python versions for maintained branches.
-_python_versions = ['3.6.10', '3.7.7', '3.8.2']
+_python_versions = ['3.7.7', '3.8.2', '3.9.1']
 parser.add_argument('--venvs', nargs='*', type=str, default=_python_versions,
                     help='List of Python versions ("major.minor.patch") for which to install venvs. '
                          'Default: {}'.format(' '.join(_python_versions)))
@@ -155,17 +164,22 @@ 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])
             break
-    for gpusdk in ('cuda',):
+    for gpusdk in ('cuda', 'hipsycl'):
         version = getattr(configuration, gpusdk, None)
         if version is not None:
             elements.append(gpusdk + '-' + version)
     if configuration.oneapi is not None:
         elements.append('oneapi-' + configuration.oneapi)
+    if configuration.intel_compute_runtime:
+        elements.append('intel-compute-runtime')
+    if configuration.rocm is not None:
+        if (configuration.rocm != 'debian'):
+            elements.append('rocm-' + configuration.rocm)
 
     # Check for special cases
     # The following attribute keys indicate the image is built for the named