1 # This file is part of the GROMACS molecular simulation package.
3 # Copyright (c) 2020, by the GROMACS development team, led by
4 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
5 # and including many others, as listed in the AUTHORS file in the
6 # top-level source directory and at http://www.gromacs.org.
8 # GROMACS is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public License
10 # as published by the Free Software Foundation; either version 2.1
11 # of the License, or (at your option) any later version.
13 # GROMACS is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # Lesser General Public License for more details.
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with GROMACS; if not, see
20 # http://www.gnu.org/licenses, or write to the Free Software Foundation,
21 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 # If you want to redistribute modifications to GROMACS, please
24 # consider that scientific software is very special. Version
25 # control is crucial - bugs must be traceable. We will be happy to
26 # consider code for inclusion in the official distribution, but
27 # derived work must not be called official GROMACS. Details are found
28 # in the README & COPYING files - if they are missing, get the
29 # official version at http://www.gromacs.org.
31 # To help us fund GROMACS development, we humbly ask that you cite
32 # the research papers on the package. Check out http://www.gromacs.org.
34 """A `utility` module helps manage the matrix of configurations for CI testing and build containers.
36 Provides importable argument parser.
39 * Paul Bauer <paul.bauer.q@gmail.com>
40 * Eric Irrgang <ericirrgang@gmail.com>
41 * Joe Jordan <e.jjordan12@gmail.com>
48 parser = argparse.ArgumentParser(description='GROMACS CI image slug options.', add_help=False)
49 """A parent parser for tools referencing image parameters.
51 This argparse parser is defined for convenience and may be used to partially initialize
54 .. warning:: Do not modify this parser.
56 Instead, inherit from it with the *parents* argument to :py:class:`argparse.ArgumentParser`
59 # TODO: Try using distutils.version.StrictVersion.
60 parser.add_argument('--cmake', type=str, default='3.9.6',
61 choices=['3.9.6', '3.11.4', '3.13.0', '3.14.7', '3.15.7'],
62 help='Selection of CMake version to provide to base image')
63 compiler_group = parser.add_mutually_exclusive_group()
64 compiler_group.add_argument('--gcc', type=int, nargs='?', const=7, default=7,
65 choices=[5, 6, 7, 8, 9],
66 help='Select GNU compiler tool chain. (Default) '
67 'Some checking is implemented to avoid incompatible combinations')
68 compiler_group.add_argument('--llvm', type=int, nargs='?', const=7, default=None,
69 choices=[3, 6, 7, 8, 9],
70 help='Select LLVM compiler tool chain. '
71 'Some checking is implemented to avoid incompatible combinations')
72 compiler_group.add_argument('--icc', type=int, nargs='?', const=19, default=None,
74 help='Select Intel compiler tool chain. '
75 'Some checking is implemented to avoid incompatible combinations')
77 linux_group = parser.add_mutually_exclusive_group()
78 linux_group.add_argument('--ubuntu', type=str, nargs='?', const='18.04', default='18.04',
79 choices=['16.04', '18.04'],
80 help='Select Ubuntu Linux base image. (default: ubuntu 18.04)')
81 linux_group.add_argument('--centos', type=str, nargs='?', const='7', default=None,
83 help='Select Centos Linux base image.')
85 parser.add_argument('--cuda', type=str, nargs='?', const='10.2', default=None,
86 choices=['9.0', '10.0', '10.1', '10.2'],
87 help='Select a CUDA version for a base Linux image from NVIDIA.')
89 parser.add_argument('--mpi', type=str, nargs='?', const='openmpi', default=None,
90 choices=['openmpi', 'impi'],
91 help='Enable MPI (default disabled) and optionally select distribution (default: openmpi)')
93 parser.add_argument('--tsan', type=str, nargs='?', const='llvm', default=None,
95 help='Build special compiler versions with TSAN OpenMP support')
97 parser.add_argument('--opencl', type=str, nargs='?', const='nvidia', default=None,
98 choices=['nvidia', 'intel', 'amd'],
99 help='Provide environment for OpenCL builds')
101 parser.add_argument('--clfft', type=str, nargs='?', const='master', default=None,
102 choices=['master', 'develop'],
103 help='Add external clFFT libraries to the build image')
105 parser.add_argument('--doxygen', type=str, nargs='?', const='1.8.5', default=None,
106 choices=['1.8.5', '1.8.11'],
107 help='Add doxygen environment for documentation builds. Also adds other requirements needed for final docs images.')