From 0db2f006353590374a5107b095623ba8cc9dce5b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 20 Apr 2020 14:57:56 -0500 Subject: [PATCH 001/802] PyTorch: remove CUDA conflicts (#16136) --- .../repos/builtin/packages/py-torch/package.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 31bfb716578..619a621c2b3 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -6,7 +6,6 @@ from spack import * -# TODO: try switching to CMakePackage for more control over build class PyTorch(PythonPackage, CudaPackage): """Tensors and Dynamic neural networks in Python with strong GPU acceleration.""" @@ -107,26 +106,9 @@ class PyTorch(PythonPackage, CudaPackage): # see https://github.com/pytorch/pytorch/issues/35149 conflicts('+fbgemm', when='@1.4.0') - cuda_arch_conflict = ('This version of Torch/Caffe2 only supports compute ' - 'capabilities ') - conflicts('cuda_arch=none', when='+cuda', msg='Must specify CUDA compute capabilities of your GPU, see ' 'https://developer.nvidia.com/cuda-gpus') - conflicts('cuda_arch=52', when='@1.3.0:+cuda', - msg=cuda_arch_conflict + '>=5.3') - conflicts('cuda_arch=50', when='@1.3.0:+cuda', - msg=cuda_arch_conflict + '>=5.3') - conflicts('cuda_arch=35', when='@1.3.0:+cuda', - msg=cuda_arch_conflict + '>=5.3') - conflicts('cuda_arch=32', when='@1.3.0:+cuda', - msg=cuda_arch_conflict + '>=5.3') - conflicts('cuda_arch=30', when='@1.3.0:+cuda', - msg=cuda_arch_conflict + '>=5.3') - conflicts('cuda_arch=30', when='@1.2.0:+cuda', - msg=cuda_arch_conflict + '>=3.2') - conflicts('cuda_arch=20', when='@1.0.0:+cuda', - msg=cuda_arch_conflict + '>=3.0') # Required dependencies depends_on('cmake@3.5:', type='build') From 3a9ce3ac4a3b60c43bc8c5c33418008c2675e7d5 Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Mon, 20 Apr 2020 12:15:38 -0800 Subject: [PATCH 002/802] glib (#16179) Co-authored-by: Elizabeth Fischer --- var/spack/repos/builtin/packages/glib/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index b7cf326e858..9e71ccdd4bb 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -159,6 +159,11 @@ def configure_args(self): args.append('GTKDOC_REBASE={0}'.format(true)) return args + def setup_build_environment(self, env): + if self.spec.satisfies('platform=darwin'): + # https://github.com/pybind/pybind11/issues/595 + env.set('STRIP', 'strip -x') + @when('@:2.57.99') def install(self, spec, prefix): configure('--prefix={0}'.format(prefix), *self.configure_args()) From 742a4b7e2a5baef0c984b20110f99d8d0d7c869f Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Mon, 20 Apr 2020 12:21:36 -0800 Subject: [PATCH 003/802] proj (#16175) Co-authored-by: Elizabeth Fischer --- var/spack/repos/builtin/packages/proj/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/proj/package.py b/var/spack/repos/builtin/packages/proj/package.py index 19de7a79095..46a91ab8a0c 100644 --- a/var/spack/repos/builtin/packages/proj/package.py +++ b/var/spack/repos/builtin/packages/proj/package.py @@ -20,6 +20,7 @@ class Proj(AutotoolsPackage): # Version 6 removes projects.h, while version 7 removes proj_api.h. # Many packages that depend on proj do not yet support the newer API. # See https://github.com/OSGeo/PROJ/wiki/proj.h-adoption-status + version('6.3.1', sha256='6de0112778438dcae30fcc6942dee472ce31399b9e5a2b67e8642529868c86f8') version('6.2.0', sha256='b300c0f872f632ad7f8eb60725edbf14f0f8f52db740a3ab23e7b94f1cd22a50') version('6.1.0', sha256='676165c54319d2f03da4349cbd7344eb430b225fe867a90191d848dc64788008') version('6.0.0', sha256='4510a2c1c8f9056374708a867c51b1192e8d6f9a5198dd320bf6a168e44a3657') From 1f49fb8cebe5dfe1ca2f5caeb614f266dc5912e6 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 20 Apr 2020 22:32:58 +0200 Subject: [PATCH 004/802] python: Add 3.7.7 (#16170) --- var/spack/repos/builtin/packages/python/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 97acde7b59c..94a3f2d6453 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -34,7 +34,8 @@ class Python(AutotoolsPackage): version('3.8.2', sha256='e634a7a74776c2b89516b2e013dda1728c89c8149b9863b8cea21946daf9d561') version('3.8.1', sha256='c7cfa39a43b994621b245e029769e9126caa2a93571cee2e743b213cceac35fb') version('3.8.0', sha256='f1069ad3cae8e7ec467aa98a6565a62a48ef196cb8f1455a245a08db5e1792df') - version('3.7.6', sha256='aeee681c235ad336af116f08ab6563361a0c81c537072c1b309d6e4050aa2114', preferred=True) + version('3.7.7', sha256='8c8be91cd2648a1a0c251f04ea0bb4c2a5570feb9c45eaaa2241c785585b475a', preferred=True) + version('3.7.6', sha256='aeee681c235ad336af116f08ab6563361a0c81c537072c1b309d6e4050aa2114') version('3.7.5', sha256='8ecc681ea0600bbfb366f2b173f727b205bb825d93d2f0b286bc4e58d37693da') version('3.7.4', sha256='d63e63e14e6d29e17490abbe6f7d17afb3db182dbd801229f14e55f4157c4ba3') version('3.7.3', sha256='d62e3015f2f89c970ac52343976b406694931742fbde2fed8d1ce8ebb4e1f8ff') From 73e0dd9f614a17f89da263d1641a2f0eca5de1fc Mon Sep 17 00:00:00 2001 From: Justin S <3630356+codeandkey@users.noreply.github.com> Date: Mon, 20 Apr 2020 15:39:53 -0500 Subject: [PATCH 005/802] prism: new package at 4.5 (#16187) --- .../repos/builtin/packages/prism/package.py | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 var/spack/repos/builtin/packages/prism/package.py diff --git a/var/spack/repos/builtin/packages/prism/package.py b/var/spack/repos/builtin/packages/prism/package.py new file mode 100644 index 00000000000..a76f33ac7a3 --- /dev/null +++ b/var/spack/repos/builtin/packages/prism/package.py @@ -0,0 +1,43 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Prism(MakefilePackage): + """PRISM is a probabilistic model checker, a tool for formal modelling and + analysis of systems that exhibit random or probabilistic behaviour.""" + + homepage = "https://www.prismmodelchecker.org/" + url = "https://github.com/prismmodelchecker/prism/archive/v4.5.tar.gz" + + version('4.5', sha256='1cb7a77538b5c997d98a8c209030c46f9e8f021f7a8332e5eb2fd3b4a23936fd') + + build_directory = 'prism' + + depends_on('java', type=('build', 'run')) + + def setup_run_environment(self, env): + env.set('PRISM_DIR', self.prefix) + + def install(self, spec, prefix): + with working_dir(self.build_directory): + # after building, remove PRISM_DIR lines from startup scripts, + # as they point to the stage and not the prefix + for f in ['prism', 'xprism']: + filter_file('^PRISM_DIR.*', '', 'bin/{0}'.format(f)) + + dirs = [ + 'bin', + 'classes', + 'dtds', + 'etc', + 'include', + 'images', + 'lib', + ] + + for d in dirs: + install_tree(d, join_path(prefix, d)) From ed13319a4b368e99afc1fd7fe3021a3440d5bfdf Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 21 Apr 2020 04:59:16 +0800 Subject: [PATCH 006/802] Add new Package: accumulo (#16148) --- .../builtin/packages/accumulo/package.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 var/spack/repos/builtin/packages/accumulo/package.py diff --git a/var/spack/repos/builtin/packages/accumulo/package.py b/var/spack/repos/builtin/packages/accumulo/package.py new file mode 100644 index 00000000000..219d313aa10 --- /dev/null +++ b/var/spack/repos/builtin/packages/accumulo/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Accumulo(Package): + """Apache Accumulo is a sorted, distributed key/value store that + provides robust, scalable data storage and retrieval.""" + + homepage = "https://accumulo.apache.org/" + url = "https://github.com/apache/accumulo/archive/rel/2.0.0.tar.gz" + + version('2.0.0', sha256='2564056dc24398aa464763c21bae10ef09356fe3261600d27744071cf965c265') + version('1.9.3', sha256='d9548d5b9cf9f494f027f0fe59d5d6d45d09064359d7761cade62991ce2a5d0c') + version('1.9.2', sha256='11ab028143ad6313cd5fc701b36b4c35e46a4a3fa2ce663869860b9f6bf5ee4d') + + depends_on('maven', type='build') + depends_on('java', type=('build', 'run')) + + def install(self, spec, prefix): + mvn = which('mvn') + mvn('package', '-DskipTests') + install_tree('.', prefix) From cab1d06d6a3907084aad14c8b66b03741453284c Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 21 Apr 2020 05:06:31 +0800 Subject: [PATCH 007/802] Add new package: collectd (#16144) --- .../builtin/packages/collectd/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/collectd/package.py diff --git a/var/spack/repos/builtin/packages/collectd/package.py b/var/spack/repos/builtin/packages/collectd/package.py new file mode 100644 index 00000000000..35472a4a675 --- /dev/null +++ b/var/spack/repos/builtin/packages/collectd/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Collectd(AutotoolsPackage): + """The system statistics collection daemon.""" + + homepage = "http://collectd.org/" + url = "https://github.com/collectd/collectd/archive/collectd-5.11.0.tar.gz" + + version('5.11.0', sha256='639676d09c5980ceea90b5a97811a9647d94e368528cce7cea3d43f0f308465d') + version('5.10.0', sha256='bcde95a3997b5eee448d247d9414854994b3592cb9fb4fecd6ff78082cc28a1b') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') From 126491288a532da08fb3923eae2635a84736798d Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 21 Apr 2020 05:07:18 +0800 Subject: [PATCH 008/802] Add new package: libsamplerate (#16143) --- .../builtin/packages/libsamplerate/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libsamplerate/package.py diff --git a/var/spack/repos/builtin/packages/libsamplerate/package.py b/var/spack/repos/builtin/packages/libsamplerate/package.py new file mode 100644 index 00000000000..fcab8be9d3d --- /dev/null +++ b/var/spack/repos/builtin/packages/libsamplerate/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Libsamplerate(AutotoolsPackage): + """libsamplerate (also known as Secret Rabbit Code) is a library for + performing sample rate conversion of audio data.""" + + homepage = "http://www.mega-nerd.com/libsamplerate/history.html" + url = "http://www.mega-nerd.com/libsamplerate/libsamplerate-0.1.9.tar.gz" + + version('0.1.9', sha256='0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1') + version('0.1.8', sha256='93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') From eb0d82a7e496d47bedc353e9c8227aeb46540d58 Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 21 Apr 2020 05:07:44 +0800 Subject: [PATCH 009/802] Add new package: codec2 (#16142) --- .../repos/builtin/packages/codec2/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/codec2/package.py diff --git a/var/spack/repos/builtin/packages/codec2/package.py b/var/spack/repos/builtin/packages/codec2/package.py new file mode 100644 index 00000000000..55a526c8540 --- /dev/null +++ b/var/spack/repos/builtin/packages/codec2/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Codec2(CMakePackage): + """Open source speech codec designed for communications quality speech + between 450 and 3200 bit/s. The main application is low bandwidth + HF/VHF digital radio.""" + + homepage = "http://www.rowetel.com/codec2.html" + url = "https://github.com/drowe67/codec2/archive/v0.9.2.tar.gz" + + version('0.9.2', sha256='19181a446f4df3e6d616b50cabdac4485abb9cd3242cf312a0785f892ed4c76c') From ac17d0783aa60a918028188794191054f2f01494 Mon Sep 17 00:00:00 2001 From: Hadrien G Date: Mon, 20 Apr 2020 23:08:44 +0200 Subject: [PATCH 010/802] Add Acts v0.22 (#16141) --- var/spack/repos/builtin/packages/acts-core/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/acts-core/package.py b/var/spack/repos/builtin/packages/acts-core/package.py index ea3498b4f3a..fc5b6cd4784 100644 --- a/var/spack/repos/builtin/packages/acts-core/package.py +++ b/var/spack/repos/builtin/packages/acts-core/package.py @@ -34,6 +34,7 @@ class ActsCore(CMakePackage): maintainers = ['HadrienG2'] version('master', branch='master') + version('0.22.0', commit='2c8228f5843685fc0ae69a8b95dd8fc001139efb') version('0.21.0', commit='10b719e68ddaca15b28ac25b3daddce8c0d3368d') version('0.20.0', commit='1d37a849a9c318e8ca4fa541ef8433c1f004637b') version('0.19.0', commit='408335636486c421c6222a64372250ef12544df6') From 78f1940646fab40c65ea293a2d0435b50566e1e1 Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Mon, 20 Apr 2020 23:11:07 +0200 Subject: [PATCH 011/802] update package py-graphviz version (#16131) --- var/spack/repos/builtin/packages/py-graphviz/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-graphviz/package.py b/var/spack/repos/builtin/packages/py-graphviz/package.py index 9fcbd1c5560..144321cccff 100644 --- a/var/spack/repos/builtin/packages/py-graphviz/package.py +++ b/var/spack/repos/builtin/packages/py-graphviz/package.py @@ -13,6 +13,9 @@ class PyGraphviz(PythonPackage): homepage = "https://github.com/xflr6/graphviz" url = "https://pypi.io/packages/source/g/graphviz/graphviz-0.10.1.zip" + version('0.13.2', sha256='60acbeee346e8c14555821eab57dbf68a169e6c10bce40e83c1bf44f63a62a01') + version('0.13', sha256='dc08677f37c65a4a480f00df4bd0d19a0a103c06aad95f21a37f0b7fd440de81') + version('0.12', sha256='c60e232a66e4847f9f644fbaa94730ca4f78385a1314a2cc1e7f4cb2d7461298') version('0.11.1', sha256='914b8b124942d82e3e1dcef499c9fe77c10acd3d18a1cfeeb2b9de05f6d24805') version('0.10.1', sha256='d311be4fddfe832a56986ac5e1d6e8715d7fcb0208560da79d1bb0f72abef41f') From e3966d2791c827b09f3173a07b07b4fea47a7b62 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 20 Apr 2020 23:16:39 +0200 Subject: [PATCH 012/802] pixman: Add 0.40.0 (#16190) --- var/spack/repos/builtin/packages/pixman/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py index 31c15b42686..1087dabbbff 100644 --- a/var/spack/repos/builtin/packages/pixman/package.py +++ b/var/spack/repos/builtin/packages/pixman/package.py @@ -15,6 +15,7 @@ class Pixman(AutotoolsPackage): homepage = "http://www.pixman.org" url = "http://cairographics.org/releases/pixman-0.32.6.tar.gz" + version('0.40.0', sha256='6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc') version('0.38.4', sha256='da66d6fd6e40aee70f7bd02e4f8f76fc3f006ec879d346bae6a723025cfbdde7') version('0.38.0', sha256='a7592bef0156d7c27545487a52245669b00cf7e70054505381cff2136d890ca8') version('0.34.0', sha256='21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e') From 8635c0d804ee0f143e36b08e99b19e83652d27a3 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 20 Apr 2020 23:16:51 +0200 Subject: [PATCH 013/802] rocksdb: Add 6.7.3 (#16189) This also adds a shared variant, so we can build both the static and shared libraries at the same time. It also adds a pkg-config file. --- .../repos/builtin/packages/rocksdb/package.py | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/rocksdb/package.py b/var/spack/repos/builtin/packages/rocksdb/package.py index 67b9ddea448..7cb105ba637 100644 --- a/var/spack/repos/builtin/packages/rocksdb/package.py +++ b/var/spack/repos/builtin/packages/rocksdb/package.py @@ -13,7 +13,8 @@ class Rocksdb(MakefilePackage): url = 'https://github.com/facebook/rocksdb/archive/v6.5.3.tar.gz' git = 'https://github.com/facebook/rocksdb.git' - version('develop', git=git, branch='master', submodules=True) + version('master', git=git, branch='master', submodules=True) + version('6.7.3', sha256='c4d1397b58e4801b5fd7c3dd9175e6ae84541119cbebb739fe17d998f1829e81') version('6.5.3', sha256='6dc023a11d61d00c8391bd44f26ba7db06c44be228c10b552edc84e02d7fbde2') version('5.18.3', sha256='7fb6738263d3f2b360d7468cf2ebe333f3109f3ba1ff80115abd145d75287254') version('5.17.2', sha256='101f05858650a810c90e4872338222a1a3bf3b24de7b7d74466814e6a95c2d28') @@ -22,6 +23,7 @@ class Rocksdb(MakefilePackage): variant('bz2', default=False, description='Enable bz2 compression support') variant('lz4', default=True, description='Enable lz4 compression support') + variant('shared', default=True, description='Build shared library') variant('snappy', default=False, description='Enable snappy compression support') variant('static', default=True, description='Build static library') variant('zlib', default=True, description='Enable zlib compression support') @@ -36,6 +38,8 @@ class Rocksdb(MakefilePackage): depends_on('zstd', when='+zstd') depends_on('tbb', when='+tbb') + conflicts('~shared~static', msg='have to build one type of library') + phases = ['install'] def patch(self): @@ -85,5 +89,27 @@ def install(self, spec, prefix): env['PLATFORM_FLAGS'] = ' '.join(ldflags) env['INSTALL_PATH'] = self.spec.prefix - buildtype = 'install-static' if '+static' in spec else 'install-shared' - make(buildtype) + if '+static' in spec: + make('install-static') + + if '+shared' in spec: + make('install-shared') + + @run_after('install') + def install_pkgconfig(self): + libdir = self.spec['rocksdb'].libs.directories[0] + pkg_path = join_path(libdir, 'pkgconfig') + mkdirp(pkg_path) + + with open(join_path(pkg_path, 'rocksdb.pc'), 'w') as f: + f.write('prefix={0}\n'.format(self.prefix)) + f.write('exec_prefix=${prefix}\n') + f.write('libdir={0}\n'.format(libdir)) + f.write('includedir={0}\n'.format(self.prefix.include)) + f.write('\n') + f.write('Name: rocksdb\n') + f.write('Description: RocksDB: A Persistent Key-Value Store for' + ' Flash and RAM Storage\n') + f.write('Version: {0}\n'.format(self.spec.version)) + f.write('Cflags: -I${includedir}\n') + f.write('Libs: -L${libdir} -lrocksdb -ldl\n') From a70e76d043a452bcd3962896fa7281e4499fc2af Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Mon, 20 Apr 2020 23:19:55 +0200 Subject: [PATCH 014/802] Package Bonniepp adding sbin to PATH (#16124) --- var/spack/repos/builtin/packages/bonniepp/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/bonniepp/package.py b/var/spack/repos/builtin/packages/bonniepp/package.py index 18751810fc8..6a33a15ea77 100644 --- a/var/spack/repos/builtin/packages/bonniepp/package.py +++ b/var/spack/repos/builtin/packages/bonniepp/package.py @@ -19,3 +19,7 @@ def configure_args(self): configure_args = [] configure_args.append('--enable-debug') return configure_args + + def setup_run_environment(self, env): + """Prepend the sbin directory to PATH.""" + env.prepend_path('PATH', self.prefix.sbin) From cf12541281fe7a252c50483dde2caa2c532cb233 Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 21 Apr 2020 05:22:37 +0800 Subject: [PATCH 015/802] Add new package: byacc (#16123) * Add new package: byacc * refine byacc info --- .../repos/builtin/packages/byacc/package.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 var/spack/repos/builtin/packages/byacc/package.py diff --git a/var/spack/repos/builtin/packages/byacc/package.py b/var/spack/repos/builtin/packages/byacc/package.py new file mode 100644 index 00000000000..b555910c42f --- /dev/null +++ b/var/spack/repos/builtin/packages/byacc/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Byacc(AutotoolsPackage): + """Berkeley Yacc is an LALR(1) parser generator. Berkeley Yacc has + been made as compatible as possible with AT&T Yacc. Berkeley Yacc + can accept any input specification that conforms to the AT&T Yacc + documentation. Specifications that take advantage of undocumented + features of AT&T Yacc will probably be rejected.""" + + homepage = "https://github.com/grandseiken/byacc" + git = "https://github.com/grandseiken/byacc.git" + + version('master', branch='master') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') From e8a7e4f5ecd0c1a6dcd9f0769f16f5ad2569dff5 Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 21 Apr 2020 05:23:47 +0800 Subject: [PATCH 016/802] Add new package: bgpdump (#16122) --- .../repos/builtin/packages/bgpdump/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/bgpdump/package.py diff --git a/var/spack/repos/builtin/packages/bgpdump/package.py b/var/spack/repos/builtin/packages/bgpdump/package.py new file mode 100644 index 00000000000..e708860dc3f --- /dev/null +++ b/var/spack/repos/builtin/packages/bgpdump/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Bgpdump(AutotoolsPackage): + """Utility and C Library for parsing MRT files""" + + homepage = "https://github.com/RIPE-NCC/bgpdump/wiki" + git = "https://github.com/RIPE-NCC/bgpdump.git" + + version('master', branch='master') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('bzip2') From c2ca8328835d544440fd3b87813e2768ece58685 Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 21 Apr 2020 05:24:33 +0800 Subject: [PATCH 017/802] Add new package: audacious (#16121) --- .../builtin/packages/audacious/package.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/audacious/package.py diff --git a/var/spack/repos/builtin/packages/audacious/package.py b/var/spack/repos/builtin/packages/audacious/package.py new file mode 100644 index 00000000000..0115d4c5537 --- /dev/null +++ b/var/spack/repos/builtin/packages/audacious/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Audacious(AutotoolsPackage): + """A lightweight and versatile audio player.""" + + homepage = "https://audacious-media-player.org/" + url = "https://github.com/audacious-media-player/audacious/archive/audacious-4.0.2.tar.gz" + + version('4.0.2', sha256='92f30a78353c50f99b536061b9d94b6b9128760d546fddbf863e3591c4ac5a8d') + version('4.0.1', sha256='203195cf0d3c2e40d23c9895269ca0ace639c4a2b4dceb624169d75337059985') + version('4.0', sha256='cdfffd0eb966856980328ebb0fff9cbce57f99db9bda15e7e839d26c89e953e6') + version('3.10.1', sha256='c478939b4bcf6704c26eee87d48cab26547e92a83741f437711178c433373fa1') + version('3.10', sha256='82710d6ac90931c2cc4a0f0fcb6380ac21ed42a7a50856d16a67d3179a96e9ae') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('glib') + depends_on('qt') + + def autoreconf(self, spec, prefix): + bash = which('bash') + bash('./autogen.sh') From 8e7f55e6d67a8f464fb543bb022add79562d05bf Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Tue, 21 Apr 2020 06:29:06 +0900 Subject: [PATCH 018/802] ppOpen-APPL/DEM-util: New package (#16120) --- .../packages/ppopen-appl-dem-util/package.py | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 var/spack/repos/builtin/packages/ppopen-appl-dem-util/package.py diff --git a/var/spack/repos/builtin/packages/ppopen-appl-dem-util/package.py b/var/spack/repos/builtin/packages/ppopen-appl-dem-util/package.py new file mode 100755 index 00000000000..8fa6544db36 --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-appl-dem-util/package.py @@ -0,0 +1,48 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import os + + +class PpopenApplDemUtil(MakefilePackage): + """ + ppOpen-APPL/DEM provides fundamental components of the particle + simulations based on the discrete element method (DEM). + ppOpen-APPL/DEM (ver.1.0.0) includes the libraries for the DEM, + sample codes, and data sets. ppOpen-APPL/DEM-Util provides the + preconditioning utilities. This utility prepares data sets of distributed + data files from the mesh data sets. + + """ + + homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/" + url = "file://{0}/ppohDEM_util_1.0.0.tar.gz".format(os.getcwd()) + + version('1.0.0', sha256='e0aa9a61be3b9858a2885c9feff9b0fcd1d7039408f6bd82a73a79dfe86b0488') + + depends_on('mpi') + + def edit(self, spec, prefix): + makefile_in = FileFilter('Makefile.in') + makefile_in.filter('PREFIX += .*', 'PREFIX = {0}'.format(prefix)) + makefile_in.filter('F90 += .*', 'F90 = {0}'.format(spack_fc)) + makefile_in.filter('F77 += .*', 'F77 = {0}'.format(spack_fc)) + makefile_in.filter( + 'MPIF90 += .*', + 'MPIF90 = {0}'.format(spec['mpi'].mpifc) + ) + makefile_in.filter( + 'MPIF77 += .*', + 'MPIF77 = {0}'.format(spec['mpi'].mpifc) + ) + makefile_in.filter( + 'F90MPFLAGS += .*', + 'F90MPFLAGS = -O3 {0}'.format(self.compiler.openmp_flag) + ) + + def install(self, spec, prefix): + make('install') + install_tree('doc', prefix.doc) From c6ef9c2b87cefc26e2c4dc34c80e6ab951a011c4 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Tue, 21 Apr 2020 06:36:36 +0900 Subject: [PATCH 019/802] Add ppOpen-APPL/FDM and ppOpen-APPL/FDM-AT. (#16116) --- .../packages/ppopen-appl-fdm-at/package.py | 50 +++++++ .../ppopen-appl-fdm/gfortran_iargc.patch | 13 ++ .../packages/ppopen-appl-fdm/package.py | 137 ++++++++++++++++++ .../packages/ppopen-appl-fdm/unused.patch | 13 ++ .../packages/ppopen-math-vis/package.py | 6 + 5 files changed, 219 insertions(+) create mode 100755 var/spack/repos/builtin/packages/ppopen-appl-fdm-at/package.py create mode 100755 var/spack/repos/builtin/packages/ppopen-appl-fdm/gfortran_iargc.patch create mode 100755 var/spack/repos/builtin/packages/ppopen-appl-fdm/package.py create mode 100755 var/spack/repos/builtin/packages/ppopen-appl-fdm/unused.patch diff --git a/var/spack/repos/builtin/packages/ppopen-appl-fdm-at/package.py b/var/spack/repos/builtin/packages/ppopen-appl-fdm-at/package.py new file mode 100755 index 00000000000..a8ab4fb9e8d --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-appl-fdm-at/package.py @@ -0,0 +1,50 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import os + + +class PpopenApplFdmAt(MakefilePackage): + """ppOpen-APPL/FDM with Auto-Tuning""" + + homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/" + url = "file://{0}/ppohFDM_AT_1.0.0.tar.gz".format(os.getcwd()) + + version('1.0.0', sha256='f6052b73250a41b2b319b27efc4d753c6ec1f67cd109b53099c2b240f7acd65a') + + depends_on('mpi') + # depends_on('ppopen-appl-fdm', type='build') + + build_directory = "3.hybrid_AT" + parallel = False + + def edit(self, spec, prefix): + with working_dir(self.build_directory): + fflags = ['-O3', self.compiler.openmp_flag] + if spec.satisfies('%gcc'): + fflags.append('-ffree-line-length-none') + if spec.satisfies('arch=x86_64:'): + fflags.append('-mcmodel=medium') + makefile_opt = FileFilter('Makefile.option') + makefile_opt.filter( + 'FC = .*$', + 'FC = {0}'.format(spec['mpi'].mpifc) + ) + makefile_opt.filter( + 'FFLAGS = .*$', + 'FFLAGS = -O3 {0}'.format(' '.join(fflags)) + ) + + def install(self, spec, prefix): + mkdir(prefix.bin) + copy(join_path(self.build_directory, 'seism3d3n'), prefix.bin) + install_src_dir = join_path(prefix.src, self.build_directory) + mkdirp(install_src_dir) + install_tree(self.build_directory, install_src_dir) + with working_dir(install_src_dir): + make('clean') + mkdir(prefix.doc) + copy('readme.txt', prefix.doc) diff --git a/var/spack/repos/builtin/packages/ppopen-appl-fdm/gfortran_iargc.patch b/var/spack/repos/builtin/packages/ppopen-appl-fdm/gfortran_iargc.patch new file mode 100755 index 00000000000..115a0f06888 --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-appl-fdm/gfortran_iargc.patch @@ -0,0 +1,13 @@ +diff --git a/tools/seismic_3D-tools/m_stdio.f90 b/tools/seismic_3D-tools/m_stdio.f90 +index bddb715..bc00f68 100644 +--- a/tools/seismic_3D-tools/m_stdio.f90 ++++ b/tools/seismic_3D-tools/m_stdio.f90 +@@ -65,8 +65,6 @@ module stdio + real(PN), parameter :: DEG2RAD = PI/180._PN + real(PN), parameter :: RAD2DEG = 180.0_PN / PI + +- integer, external :: iargc +- + + interface readPrm + ! diff --git a/var/spack/repos/builtin/packages/ppopen-appl-fdm/package.py b/var/spack/repos/builtin/packages/ppopen-appl-fdm/package.py new file mode 100755 index 00000000000..450ae99efbf --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-appl-fdm/package.py @@ -0,0 +1,137 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os +from spack import * + + +class PpopenApplFdm(MakefilePackage): + """ + ppOpen-APPL/FDM is a application software for the FDM simulation of + seismic wave propagation in elastic media in 2D and 3D. + The 2D application is prepared for a single-CPU (sequential) calculation + and the 3D application use MPI and OpenMP for parallel computing. + """ + + homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/" + url = "file://{0}/ppohFDM_0.3.1.tar.gz".format(os.getcwd()) + + version('0.3.1', sha256='5db7c28ef2df43c0ffa28e542d92320fe3c8cd7551aabe1de64647191ddf7d0b') + + # remove unused variable definition + patch('unused.patch') + # remove iargc external definition + # iargc is intrinsic in gfortran + patch('gfortran_iargc.patch') + + depends_on('ppopen-math-vis', type='link') + depends_on('mpi') + + parallel = False + + def edit(self, spec, prefix): + makefile_in = FileFilter('Makefile.in') + makefile_in.filter('PREFIX += .*$', 'PREFIX = {0}'.format(prefix)) + makefile_in.filter( + 'LIBDIR = .*$', + 'LIBDIR = {0}'.format(prefix) + ) + makefile_in.filter( + 'CC += .*$', + 'CC = {0}'.format(spec['mpi'].mpicc) + ) + makefile_in.filter('COPTFLAGS += .*$', 'COPTFLAGS = -O3') + makefile_in.filter( + 'CXX += .*$', + 'CXX = {0}'.format(spec['mpi'].mpicxx) + ) + makefile_in.filter('CXXOPTFLAGS = .*$', 'CXXOPTFLAGS = -O3') + makefile_in.filter( + 'FC += .*$', + 'FC = {0}'.format(spec['mpi'].mpifc) + ) + makefile_in.filter('FOPTFLAGS += .*$', 'FOPTFLAGS = -O3') + makefile_in.filter( + 'F90 += .*$', + 'F90 = {0}'.format(spec['mpi'].mpifc) + ) + makefile_in.filter('F90OPTFLAGS += .*$', 'F90OPTFLAGS = -O3') + + makefile_opt = FileFilter(join_path( + 'src', 'seismic_2D', 'makefile.option') + ) + makefile_opt.filter('FC = .*$', 'FC = {0}'.format(spack_fc)) + makefile_opt.filter('FFLAGS = .*$', 'FFLAGS = -O3') + + makefile = FileFilter(join_path( + 'src', 'seismic_3D', '1.ppohFDM-ppohVIS', 'Makefile') + ) + makefile.filter('LIBS += .*$', 'LIBS = ') + makefile.filter( + 'FLDFLAGS += .*$', + 'FLDFLAGS = ' + spec['ppopen-math-vis'].libs.ld_flags + ) + + makefile_opt = FileFilter(join_path( + 'src', 'seismic_3D', '3.parallel', 'Makefile.option') + ) + makefile_opt.filter('FC = .*$', 'FC = {0}'.format(spec['mpi'].mpifc)) + makefile_opt.filter( + 'FFLAGS = .*$', + 'FFLAGS = -O3 {0}'.format(self.compiler.openmp_flag) + ) + + copy( + join_path('examples', 'seismic_3D-example', 'm_param.f90'), + join_path('src', 'seismic_3D', '1.ppohFDM-ppohVIS') + ) + copy( + join_path('examples', 'seismic_3D-example', 'm_param.f90'), + join_path('src', 'seismic_3D', '3.parallel') + ) + + for makefile in find('tools', 'makefile', recursive=True): + fflags = ['-O3', '-I.'] + m = FileFilter(makefile) + m.filter('^FC =.*$', 'FC = {0}'.format(spack_fc)) + m.filter( + '^FFLAGS =.*$', + 'FFLAGS = {0}'.format(' '.join(fflags)) + ) + + def build(self, spec, prefix): + make('seism2d', 'seism3d-ppohVIS', 'seism3d-parallel') + for d in ['seismic_2D-tools', 'seismic_3D-tools']: + with working_dir(join_path('tools', d)): + make('all') + + def install(self, spec, prefix): + commands = [ + join_path('src', 'seismic_2D', 'seism2d_psv'), + join_path('src', 'seismic_3D', '3.parallel', 'seism3d3n'), + join_path('src', 'seismic_3D', '1.ppohFDM-ppohVIS', 'seism3d3n'), + join_path('tools', 'seismic_2D-tools', 'pmxy2d'), + join_path('tools', 'seismic_2D-tools', 'rwav2d'), + join_path('tools', 'seismic_3D-tools', 'catsnap'), + join_path('tools', 'seismic_3D-tools', 'catwav'), + join_path('tools', 'seismic_3D-tools', 'ppmxy3d3'), + join_path('tools', 'seismic_3D-tools', 'rwav3d'), + ] + mkdir(prefix.bin) + for command in commands: + copy(command, prefix.bin) + install_tree('examples', prefix.examples) + install_tree('doc', prefix.doc) + install_tree('src', prefix.src) + copy('Makefile.in', prefix) + clean_dir = [ + join_path(prefix.src, 'seismic_2D'), + join_path(prefix.src, 'seismic_3D', '1.ppohFDM-ppohVIS'), + join_path(prefix.src, 'seismic_3D', '3.parallel'), + ] + for d in clean_dir: + with working_dir(d): + make('clean') + force_remove(join_path(prefix, 'Makefile.in')) diff --git a/var/spack/repos/builtin/packages/ppopen-appl-fdm/unused.patch b/var/spack/repos/builtin/packages/ppopen-appl-fdm/unused.patch new file mode 100755 index 00000000000..4c6e67c65d9 --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-appl-fdm/unused.patch @@ -0,0 +1,13 @@ +diff --git a/tools/seismic_2D-tools/rwav2d.f90 b/tools/seismic_2D-tools/rwav2d.f90 +index ec08ea8..0f9543c 100644 +--- a/tools/seismic_2D-tools/rwav2d.f90 ++++ b/tools/seismic_2D-tools/rwav2d.f90 +@@ -41,7 +41,7 @@ program sort_seism2d_result + + integer :: station_num + integer :: ns, isx, isz +- integer :: i, k, ii, kk, j, IT ++ integer :: i, k, ii, kk, j + character(len=80) filename, filename2, tmp1 + integer :: istx(5000,100), istz(5000,100), stnum(5000,100) + real(PN) :: ntime(5000,100), vxall(5000,100), vzall(5000,100) diff --git a/var/spack/repos/builtin/packages/ppopen-math-vis/package.py b/var/spack/repos/builtin/packages/ppopen-math-vis/package.py index ad2ff3a7c8f..0082783ed5a 100644 --- a/var/spack/repos/builtin/packages/ppopen-math-vis/package.py +++ b/var/spack/repos/builtin/packages/ppopen-math-vis/package.py @@ -43,3 +43,9 @@ def install(self, spec, prefix): copy_tree('examples', join_path(prefix, 'examples')) mkdir(join_path(prefix, 'doc')) copy_tree('doc', join_path(prefix, 'doc')) + + @property + def libs(self): + return find_libraries( + ['libfppohvisfdm3d', 'libppohvisfdm3d'], + root=self.prefix, shared=False, recursive=True) From 5e69125e51a88d87628c92c8308d1ee37c65d06b Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Mon, 20 Apr 2020 17:54:44 -0400 Subject: [PATCH 020/802] Implemented +shared and +static_tools variants (#16105) --- .../repos/builtin/packages/papi/package.py | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index 35dd4f9ba2c..76a67f8e775 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -2,6 +2,7 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) + import glob import os import sys @@ -38,10 +39,20 @@ class Papi(AutotoolsPackage): variant('lmsensors', default=False, description='Enable lm_sensors support') variant('sde', default=False, description='Enable software defined events') + variant('shared', default=True, description='Build shared libraries') + # PAPI requires building static libraries, so there is no "static" variant + variant('static_tools', default=False, description='Statically link the PAPI tools') + # The PAPI configure option "--with-shlib-tools" is deprecated + # and therefore not implemented here + depends_on('lm-sensors', when='+lmsensors') conflicts('%gcc@8:', when='@5.3.0', msg='Requires GCC version less than 8.0') + # This is the only way to match exactly version 6.0.0 without also + # including version 6.0.0.1 due to spack version matching logic + conflicts('@5.9.99999:6.0.0.a', when='+static_tools', msg='Static tools cannot build on version 6.0.0') + # Does not build with newer versions of gcc, see # https://bitbucket.org/icl/papi/issues/46/cannot-compile-on-arch-linux patch('https://bitbucket.org/icl/papi/commits/53de184a162b8a7edff48fed01a15980664e15b1/raw', sha256='64c57b3ad4026255238cc495df6abfacc41de391a0af497c27d0ac819444a1f8', when='@5.4.0:5.6.99%gcc@8:') @@ -55,15 +66,24 @@ def setup_build_environment(self, env): setup_run_environment = setup_build_environment def configure_args(self): + spec = self.spec # PAPI uses MPI if MPI is present; since we don't require # an MPI package, we ensure that all attempts to use MPI # fail, so that PAPI does not get confused options = ['MPICC=:'] - # Build a list of activated variants (optional PAPI components) - variants = filter(lambda x: self.spec.variants[x].value is True, - self.spec.variants) - if variants: - options.append('--with-components={0}'.format(' '.join(variants))) + # Build a list of PAPI components + components = filter( + lambda x: spec.variants[x].value, + ['example', 'infiniband', 'powercap', 'rapl', 'lmsensors', 'sde']) + if components: + options.append('--with-components=' + ' '.join(components)) + + build_shared = 'yes' if '+shared' in spec else 'no' + options.append('--with-shared-lib=' + build_shared) + + if '+static_tools' in spec: + options.append('--with-static-tools') + return options @run_before('configure') From 45fee6edbd696ae1180dda066a8e714bc8676349 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 20 Apr 2020 16:57:08 -0500 Subject: [PATCH 021/802] Python: add latest Python 2 releases (#16191) --- var/spack/repos/builtin/packages/python/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 94a3f2d6453..8270ce7329c 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -26,7 +26,7 @@ class Python(AutotoolsPackage): homepage = "https://www.python.org/" url = "https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz" - list_url = "https://www.python.org/downloads/" + list_url = "https://www.python.org/ftp/python/" list_depth = 1 maintainers = ['adamjstewart'] @@ -60,6 +60,8 @@ class Python(AutotoolsPackage): version('3.3.6', sha256='0a58ad1f1def4ecc90b18b0c410a3a0e1a48cf7692c75d1f83d0af080e5d2034') version('3.2.6', sha256='fc1e41296e29d476f696303acae293ae7a2310f0f9d0d637905e722a3f16163e') version('3.1.5', sha256='d12dae6d06f52ef6bf1271db4d5b4d14b5dd39813e324314e72b648ef1bc0103') + version('2.7.18', sha256='da3080e3b488f648a3d7a4560ddee895284c3380b11d6de75edb986526b9a814') + version('2.7.17', sha256='f22059d09cdf9625e0a7284d24a13062044f5bf59d93a7f3382190dfa94cecde') version('2.7.16', sha256='01da813a3600876f03f46db11cc5c408175e99f03af2ba942ef324389a83bad5') version('2.7.15', sha256='18617d1f15a380a919d517630a9cd85ce17ea602f9bbdc58ddc672df4b0239db') version('2.7.14', sha256='304c9b202ea6fbd0a4a8e0ad3733715fbd4749f2204a9173a58ec53c32ea73e8') From e4805bb75ffd075318b31154fb9323ed360a8fad Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 21 Apr 2020 05:59:51 +0800 Subject: [PATCH 022/802] Add new package: sse2neon (#16168) --- .../builtin/packages/sse2neon/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/sse2neon/package.py diff --git a/var/spack/repos/builtin/packages/sse2neon/package.py b/var/spack/repos/builtin/packages/sse2neon/package.py new file mode 100644 index 00000000000..5c01d6f0aec --- /dev/null +++ b/var/spack/repos/builtin/packages/sse2neon/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import glob + + +class Sse2neon(Package): + """A C/C++ header file that converts Intel SSE intrinsics to ARN NEON + intrinsics.""" + + homepage = "https://github.com/jratcliff63367/sse2neon" + git = "https://github.com/jratcliff63367/sse2neon.git" + + version('master', branch='master') + + def install(self, spec, prefix): + mkdirp(prefix.include) + headers = glob.glob('*.h') + for f in headers: + install(f, prefix.include) From ca86e56572335e726a3351910b23b69cdfd24c36 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 20 Apr 2020 20:30:43 -0600 Subject: [PATCH 023/802] votca-*: remove rc versions (#16197) --- .../repos/builtin/packages/votca-csg-tutorials/package.py | 5 +---- var/spack/repos/builtin/packages/votca-csg/package.py | 5 +---- var/spack/repos/builtin/packages/votca-csgapps/package.py | 5 +---- var/spack/repos/builtin/packages/votca-tools/package.py | 6 ++---- var/spack/repos/builtin/packages/votca-xtp/package.py | 5 +---- 5 files changed, 6 insertions(+), 20 deletions(-) diff --git a/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py b/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py index 50d770efa46..bba3ad0b485 100644 --- a/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py +++ b/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py @@ -21,14 +21,11 @@ class VotcaCsgTutorials(CMakePackage): version('master', branch='master') version('1.6', sha256='54946c647724f1beb95942d47ec7f4cf7a95a59ec7268522693d5ec723585daf') - version('1.6_rc2', sha256='3c82e6fe03c7d5226f37b787eee23eb629901734d19b93ef9eb519660ff5223c') - version('1.6_rc1', sha256='87c4d945d2bdcb247e985cd407b0767c441f7810f1237ae65a63617f136e2ac9') version('1.5.1', sha256='e35cea92df0e7d05ca7b449c1b5d84d887a3a23c7796abe3b84e4d6feec7faca') version('1.5', sha256='03b841fb94129cf59781a7a5e3b71936c414aa9dfa17a50d7bc856d46274580c') version('1.4.1', sha256='623724192c3a7d76b603a74a3326f181045f10f38b9f56dce754a90f1a74556e') version('1.4', sha256='27d50acd68a9d8557fef18ec2b0c62841ae91c22275ab9afbd65c35e4dd5f719') - for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6_rc1", "1.6_rc2", "1.6", - "master"]: + for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master"]: depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") diff --git a/var/spack/repos/builtin/packages/votca-csg/package.py b/var/spack/repos/builtin/packages/votca-csg/package.py index a1ac086ce93..0f0432d7020 100644 --- a/var/spack/repos/builtin/packages/votca-csg/package.py +++ b/var/spack/repos/builtin/packages/votca-csg/package.py @@ -21,16 +21,13 @@ class VotcaCsg(CMakePackage): version('master', branch='master') version('1.6', sha256='8cf6a4ac3ef7347c720a44d8a676f8cbd1462e162f6113de39f27b89354465ea') - version('1.6_rc2', sha256='32d19c7f8e30baece35462b6f8ae06bf0d7be038f875be38dc49da5798209236') - version('1.6_rc1', sha256='163701a65a34f90e8a850370167a82cbebf2b5c0774b7a8ad07884451fe9e332') version('1.5.1', sha256='7fca1261bd267bf38d2edd26259730fed3126c0c3fd91fb81940dbe17bb568fd') version('1.5', sha256='160387cdc51f87dd20ff2e2eed97086beee415d48f3c92f4199f6109068c8ff4') version('1.4.1', sha256='41dccaecadd0165c011bec36a113629e27745a5a133d1a042efe4356acdb5450') version('1.4', sha256='c13e7febd792de8c3d426203f089bd4d33b8067f9db5e8840e4579c88b61146e') depends_on("cmake@2.8:", type='build') - for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6_rc1", "1.6_rc2", "1.6", - "master"]: + for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master"]: depends_on('votca-tools@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") depends_on("gromacs~mpi@5.1:") diff --git a/var/spack/repos/builtin/packages/votca-csgapps/package.py b/var/spack/repos/builtin/packages/votca-csgapps/package.py index ee627df1f21..929bd73c790 100644 --- a/var/spack/repos/builtin/packages/votca-csgapps/package.py +++ b/var/spack/repos/builtin/packages/votca-csgapps/package.py @@ -21,14 +21,11 @@ class VotcaCsgapps(CMakePackage): version('master', branch='master') version('1.6', sha256='084bbc5b179bb7eb8f6671d2d5fa13e69e68946570c9120a7e4b10aff1866e2e') - version('1.6_rc2', sha256='4d829b10ada32ca9e589f894ca3f69fc14329af4b6f5fee32d5e07d2457a615a') - version('1.6_rc1', sha256='069002f93f891e4aeb24920c1b2458bf8ee4842d273481aea5fa32247f815f02') version('1.5.1', sha256='b4946711e88a1745688b6cce5aad872e6e2ea200fededf38d77a864883e3750e') version('1.5', sha256='18b40ce6222509bc70aa9d56b8c538cd5903edf7294d6f95530668e555206d5b') version('1.4.1', sha256='095d9ee4cd49d2fd79c10e0e84e6890b755e54dec6a5cd580a2b4241ba230a2b') version('1.4', sha256='4ea8348c2f7de3cc488f48fbd8652e69b52515441952766c06ff67ed1aaf69a0') - for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6_rc1", "1.6_rc2", "1.6", - "master"]: + for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master"]: depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") diff --git a/var/spack/repos/builtin/packages/votca-tools/package.py b/var/spack/repos/builtin/packages/votca-tools/package.py index 2ab759567e4..52c9683f13a 100644 --- a/var/spack/repos/builtin/packages/votca-tools/package.py +++ b/var/spack/repos/builtin/packages/votca-tools/package.py @@ -21,15 +21,13 @@ class VotcaTools(CMakePackage): version('master', branch='master') version('1.6', sha256='cfd0fedc80fecd009f743b5df47777508d76bf3ef294a508a9f11fbb42efe9a5') - version('1.6_rc2', sha256='1998148dc5bbdb63d05c24d19b4a803d9b2c800891a813fd846e53616d49abcd') - version('1.6_rc1', sha256='59b4bb64a93786a693e0cbc743a27c0bc451b9db2b0f63e4d2866f7aba10c268') version('1.5.1', sha256='4be4fe25a2910e24e1720cd9022d214001d38196033ade8f9d6e618b4f47d5c4') version('1.5', sha256='a82a6596c24ff06e79eab17ca02f4405745ceeeb66369693a59023ad0b62cf22') version('1.4.1', sha256='b6b87f6bec8db641a1d8660422ca44919252a69494b32ba6c8c9ac986bae9a65') version('1.4', sha256='41638122e7e59852af61d391b4ab8c308fd2e16652f768077e13a99d206ec5d3') - # https://github.com/votca/tools/pull/197, fix cmake module - patch("https://github.com/votca/tools/pull/197.patch", sha256="a06cce2a9cee63c8d01e4d1833f9cd2ba817b846c86fdb51ea5c9cd843135e68", when="@1.6_rc1") + # https://github.com/votca/tools/pull/229, fix mkl in exported target + patch("https://github.com/votca/tools/pull/229.patch", sha256="250d0b679e5d3104e3c8d6adf99751b71386c7ed4cbdae1c75408717ef3f401f", when="@1.6+mkl") variant('mkl', default=False, description='Build with MKL support') conflicts('+mkl', when='@:1.5.9999') diff --git a/var/spack/repos/builtin/packages/votca-xtp/package.py b/var/spack/repos/builtin/packages/votca-xtp/package.py index 3ff8b2537da..96c8de3f5b9 100644 --- a/var/spack/repos/builtin/packages/votca-xtp/package.py +++ b/var/spack/repos/builtin/packages/votca-xtp/package.py @@ -21,15 +21,12 @@ class VotcaXtp(CMakePackage): version('master', branch='master') version('1.6', sha256='695c2d9d3f924103481529f992e3723bdce10b8edfc294421a849cdf51dbbb6e') - version('1.6_rc2', sha256='adc155e741a05e2bbfe9d928cdc4b2ec2ded34bc06aff59eaacf56c13a680be5') - version('1.6_rc1', sha256='144e74a6c4d31e490ca2bfaf4a30df12ccdc303efa5a7d1177c9b80035365ad5') version('1.5.1', sha256='17a7722e5a32d236e4f1f6f88b680da4ba5f52bcf65bca3687c6a1c731d10881') version('1.5', sha256='b40b6d19e13f0650e84b8beebe86ce5c09071624f18d66df826f9d8584b4d3c8') version('1.4.1', sha256='4b53d371d6cf648c9e9e9bd1f104d349cafeaf10a02866e3f1d05c574b595a21') depends_on("cmake@2.8:", type='build') - for v in ["1.4.1", "1.5", "1.5.1", "1.6_rc1", "1.6_rc2", "1.6", - "master"]: + for v in ["1.4.1", "1.5", "1.5.1", "1.6", "master"]: depends_on('votca-tools@%s' % v, when="@%s:%s.0" % (v, v)) depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("libxc", when='@1.5:') From 6c8e15ee18ff11f96a4cbf99a232e90f5b090050 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 20 Apr 2020 21:47:04 -0700 Subject: [PATCH 024/802] gettext: add missing iconv dependency (#16193) `gettext` will pick up a random `iconv` dependency if not specified, which crashes python and its own builds on macOS. --- var/spack/repos/builtin/packages/gettext/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py index 8eb0ad6f099..27165da5b45 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -27,6 +27,7 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage): # Optional variants variant('libunistring', default=False, description='Use libunistring') + depends_on('iconv') # Recommended dependencies depends_on('ncurses', when='+curses') depends_on('libxml2', when='+libxml2') @@ -50,7 +51,8 @@ def configure_args(self): config_args = [ '--disable-java', - '--disable-csharp', + '--disable-icsharp', + '--with-libiconv-prefix={0}'.format(spec['iconv'].prefix), '--with-included-glib', '--with-included-gettext', '--with-included-libcroco', From cd5d477db9ca4625993556894e1af7d7e40ae087 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 21 Apr 2020 15:02:45 +0200 Subject: [PATCH 025/802] qgis: Fix pkgconfig dependency (#16188) --- var/spack/repos/builtin/packages/qgis/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/qgis/package.py b/var/spack/repos/builtin/packages/qgis/package.py index 1edf4c29720..86d0756e540 100644 --- a/var/spack/repos/builtin/packages/qgis/package.py +++ b/var/spack/repos/builtin/packages/qgis/package.py @@ -107,7 +107,7 @@ class Qgis(CMakePackage): depends_on('cmake@3.0.0:', type='build') depends_on('flex@2.5.6:', type='build') depends_on('bison@2.4:', type='build') - depends_on('pkg-config', type='build') + depends_on('pkgconfig', type='build') # Take care of conflicts using depends_on depends_on('proj@5:', when='@3.8.2:') From a41b9365a9a7d302fc08f5c0e4ca746549cf63c7 Mon Sep 17 00:00:00 2001 From: Andrew Gaspar Date: Tue, 21 Apr 2020 09:15:59 -0600 Subject: [PATCH 026/802] catch2: added v2.12 (#16207) --- var/spack/repos/builtin/packages/catch2/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/catch2/package.py b/var/spack/repos/builtin/packages/catch2/package.py index 6961afad299..5d3d25d7631 100644 --- a/var/spack/repos/builtin/packages/catch2/package.py +++ b/var/spack/repos/builtin/packages/catch2/package.py @@ -14,6 +14,7 @@ class Catch2(CMakePackage): url = "https://github.com/catchorg/Catch2/archive/v2.9.1.tar.gz" maintainers = ['ax3l'] + version('2.12.0', sha256='6606b754363d3a4521bfecf717dc1972c50dca282bd428dfb1370ec8b9c26918') version('2.11.3', sha256='9a6967138062688f04374698fce4ce65908f907d8c0fe5dfe8dc33126bd46543') version('2.11.2', sha256='a96203fa531092375678ad2d81c43317ee58c684787f24b2a55748f6c6839799') version('2.11.1', sha256='9af06ca5b10362620c6c9c729821367e1aeb0f76adfc7bc3a468da83db3c50c6') From b9655636ceaeaf931fc515ef8e2c7c0e28772131 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 21 Apr 2020 17:48:48 +0200 Subject: [PATCH 027/802] gettext: Fix typo (#16206) --- var/spack/repos/builtin/packages/gettext/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py index 27165da5b45..8076ccb8419 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -51,7 +51,7 @@ def configure_args(self): config_args = [ '--disable-java', - '--disable-icsharp', + '--disable-csharp', '--with-libiconv-prefix={0}'.format(spec['iconv'].prefix), '--with-included-glib', '--with-included-gettext', From eb7c0e5d7d8611e760b1259bf50435b22b71ac95 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 21 Apr 2020 17:49:59 +0200 Subject: [PATCH 028/802] gettext: Fix typo (#16206) From 752342430b9bba914f7df6a33d1a4f1d3c14b982 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 21 Apr 2020 18:33:51 +0200 Subject: [PATCH 029/802] gettext: Fix typo (#16206) From 4f5bd044d61af99cb7741b360d0f48f031f212fa Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 21 Apr 2020 11:43:30 -0500 Subject: [PATCH 030/802] py-torchvision: add new version (#16208) --- .../repos/builtin/packages/py-torchvision/package.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index bfef2202e26..faee2f087a0 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -11,7 +11,7 @@ class PyTorchvision(PythonPackage): architectures, and common image transformations for computer vision.""" homepage = "https://github.com/pytorch/vision" - url = "https://github.com/pytorch/vision/archive/v0.5.0.tar.gz" + url = "https://github.com/pytorch/vision/archive/v0.6.0.tar.gz" maintainers = ['adamjstewart'] import_modules = [ @@ -21,17 +21,20 @@ class PyTorchvision(PythonPackage): 'torchvision.models.detection' ] + version('0.6.0', sha256='02de11b3abe6882de4032ce86dab9c7794cbc84369b44d04e667486580f0f1f7') version('0.5.0', sha256='eb9afc93df3d174d975ee0914057a9522f5272310b4d56c150b955c287a4d74d') version('0.4.2', sha256='1184a27eab85c9e784bacc6f9d6fec99e168ab4eda6047ef9f709e7fdb22d8f9') version('0.4.1', sha256='053689351272b3bd2ac3e6ba51efd284de0e4ca4a301f54674b949f1e62b7176') version('0.4.0', sha256='c270d74e568bad4559fed4544f6dd1e22e2eb1c60b088e04a5bd5787c4150589') version('0.3.0', sha256='c205f0618c268c6ed2f8abb869ef6eb83e5339c1336c243ad321a2f2a85195f0') + depends_on('python@3:', when='@0.6:', type=('build', 'run')) depends_on('py-setuptools', type='build') depends_on('py-numpy', type=('build', 'run')) - depends_on('py-six', type=('build', 'run')) - depends_on('py-torch@1.2.0:', when='@0.4.0:', type=('build', 'run')) - depends_on('py-torch@1.1.0:', type=('build', 'run')) + depends_on('py-six', when='@:0.5', type=('build', 'run')) + depends_on('py-torch@1.4:', when='@0.6:', type=('build', 'run')) + depends_on('py-torch@1.2:', when='@0.4:', type=('build', 'run')) + depends_on('py-torch@1.1:', type=('build', 'run')) # https://github.com/pytorch/vision/issues/1712 depends_on('py-pillow@4.1.1:6', when='@:0.4', type=('build', 'run')) # or py-pillow-simd depends_on('py-pillow@4.1.1:', when='@0.5:', type=('build', 'run')) # or py-pillow-simd From 74c159b883ae673710c7a8bcfb1e3543c011152b Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 21 Apr 2020 13:27:34 -0500 Subject: [PATCH 031/802] New package: sumo (#16096) * New package: sumo This PR adds the sumo package, as well as the fox package as a dependency. It also updates and adds some fixes for openscenegraph. For fox, the patch is for the development version. That patch should not be necessary in future versions as it has been applied upstream. The stable version is 1.6.57 and is marked as preferred. This is the version needed for sumo. Added dependencies for openscenegraph as well as set constraints on qt versions. * Update var/spack/repos/builtin/packages/sumo/package.py I had intended to set this version constraint but somehow did not. Co-Authored-By: Adam J. Stewart * Add dependency types to sumo recipe - googletest: 'test' - swig: 'build' - java: 'build', 'run' Co-authored-by: Adam J. Stewart --- .../builtin/packages/fox/no_rexdebug.patch | 11 ++++ .../repos/builtin/packages/fox/package.py | 46 ++++++++++++++++ .../packages/openscenegraph/package.py | 16 ++++-- .../repos/builtin/packages/sumo/package.py | 55 +++++++++++++++++++ 4 files changed, 124 insertions(+), 4 deletions(-) create mode 100644 var/spack/repos/builtin/packages/fox/no_rexdebug.patch create mode 100644 var/spack/repos/builtin/packages/fox/package.py create mode 100644 var/spack/repos/builtin/packages/sumo/package.py diff --git a/var/spack/repos/builtin/packages/fox/no_rexdebug.patch b/var/spack/repos/builtin/packages/fox/no_rexdebug.patch new file mode 100644 index 00000000000..3d0c0cf754c --- /dev/null +++ b/var/spack/repos/builtin/packages/fox/no_rexdebug.patch @@ -0,0 +1,11 @@ +--- a/lib/FXRex.cpp 2019-08-22 21:46:13.000000000 -0500 ++++ b/lib/FXRex.cpp 2020-04-13 16:46:31.718701955 -0500 +@@ -503,7 +503,7 @@ + */ + + // Debugging regex code +-#define REXDEBUG 1 ++// #define REXDEBUG 1 + + // As close to infinity as we're going to get; this seems big enough. We can not make + // it too large as this may wrap around when added to something else! diff --git a/var/spack/repos/builtin/packages/fox/package.py b/var/spack/repos/builtin/packages/fox/package.py new file mode 100644 index 00000000000..28e6e9b7b31 --- /dev/null +++ b/var/spack/repos/builtin/packages/fox/package.py @@ -0,0 +1,46 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Fox(AutotoolsPackage): + """FOX is a C++ based Toolkit for developing Graphical User Interfaces + easily and effectively. It offers a wide, and growing, collection of + Controls, and provides state of the art facilities such as drag and drop, + selection, as well as OpenGL widgets for 3D graphical manipulation. FOX + also implements icons, images, and user-convenience features such as status + line help, and tooltips. Tooltips may even be used for 3D objects!""" + + homepage = "http://fox-toolkit.org/" + url = "http://fox-toolkit.org/ftp/fox-1.7.67.tar.gz" + + version('1.7.67', sha256='7e511685119ef096fa90d334da46f0e50cfed8d414df32d80a7850442052f57d') + version('1.6.57', preferred=True, sha256='65ef15de9e0f3a396dc36d9ea29c158b78fad47f7184780357b929c94d458923') + + patch('no_rexdebug.patch', when='@1.7.67') + + variant('opengl', default=False, description='opengl support') + + depends_on('bzip2') + depends_on('jpeg') + depends_on('libpng') + depends_on('libtiff') + depends_on('zlib') + depends_on('libx11') + depends_on('libsm') + depends_on('libxft') + depends_on('libxext') + depends_on('libxcursor') + depends_on('libxi') + depends_on('libxrandr') + depends_on('gl', when='+opengl') + + def configure_args(self): + # Make the png link flags explicit or it will try to pick up libpng15 + # from system + args = ['LDFLAGS={0}'.format(self.spec['libpng'].libs.search_flags)] + args += self.with_or_without('opengl') + return args diff --git a/var/spack/repos/builtin/packages/openscenegraph/package.py b/var/spack/repos/builtin/packages/openscenegraph/package.py index c0cb024c144..5f2646729e1 100644 --- a/var/spack/repos/builtin/packages/openscenegraph/package.py +++ b/var/spack/repos/builtin/packages/openscenegraph/package.py @@ -14,6 +14,7 @@ class Openscenegraph(CMakePackage): homepage = "http://www.openscenegraph.org" url = "https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.6.4.tar.gz" + version('3.6.5', sha256='aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12') version('3.6.4', sha256='81394d1b484c631028b85d21c5535280c21bbd911cb058e8746c87e93e7b9d33') version('3.2.3', sha256='a1ecc6524197024834e1277916922b32f30246cb583e27ed19bf3bf889534362') version('3.1.5', sha256='dddecf2b33302076712100af59b880e7647bc595a9a7cc99186e98d6e0eaeb5c') @@ -21,8 +22,11 @@ class Openscenegraph(CMakePackage): variant('shared', default=True, description='Builds a shared version of the library') depends_on('cmake@2.8.7:', type='build') - depends_on('qt@4:') + depends_on('qt@4:', when='@3.2:') + depends_on('qt@:4', when='@:3.1') depends_on('zlib') + depends_on('libxinerama') + depends_on('libxrandr') def cmake_args(self): spec = self.spec @@ -32,13 +36,17 @@ def cmake_args(self): args = [ '-DDYNAMIC_OPENSCENEGRAPH={0}'.format(shared_status), '-DDYNAMIC_OPENTHREADS={0}'.format(shared_status), - '-DZLIB_INCLUDE_DIR={0}'.format(spec['zlib'].prefix.include), - '-DZLIB_LIBRARY={0}/libz.{1}'.format(spec['zlib'].prefix.lib, - dso_suffix), '-DBUILD_OSG_APPLICATIONS=OFF', '-DOSG_NOTIFY_DISABLED=ON', '-DLIB_POSTFIX=', + '-DCMAKE_RELWITHDEBINFO_POSTFIX=', ] + if spec.satisfies('@:3.2'): + args.extend([ + '-DZLIB_INCLUDE_DIR={0}'.format(spec['zlib'].prefix.include), + '-DZLIB_LIBRARY={0}/libz.{1}'.format(spec['zlib'].prefix.lib, + dso_suffix), + ]) # NOTE: This is necessary in order to allow OpenSceneGraph to compile # despite containing a number of implicit bool to int conversions. diff --git a/var/spack/repos/builtin/packages/sumo/package.py b/var/spack/repos/builtin/packages/sumo/package.py new file mode 100644 index 00000000000..0fbd58303d8 --- /dev/null +++ b/var/spack/repos/builtin/packages/sumo/package.py @@ -0,0 +1,55 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Sumo(CMakePackage): + """Eclipse SUMO is an open source, highly portable, microscopic and + continuous road traffic simulation package designed to handle large road + networks. It allows for intermodal simulation including pedestrians and + comes with a large set of tools for scenario creation.""" + + homepage = "http://projects.eclipse.org/projects/technology.sumo" + url = "https://github.com/eclipse/sumo/archive/v1_5_0.tar.gz" + + version('1.5.0', sha256='be6ba0361b487a5e71c81e60b4c07a67826d5e170500c10c37374c1086ac2cb6') + + variant('gdal', + default=True, + description='gdal support, for arcgis') + variant('ffmpeg', + default=False, + description='ffmpeg support, for video output') + variant('openscenegraph', + default=False, + description='openscenegraph support, for experimental 3D GUI') + variant('gl2ps', + default=False, + description='gl2ps support') + variant('eigen', + default=False, + description='eigen support') + + extends('python') + depends_on('py-setuptools', type='build') + depends_on('googletest', type='test') + depends_on('xerces-c') + depends_on('proj') + depends_on('fox@1.6.57+opengl') + depends_on('swig', type='build') + depends_on('java', type=('build', 'run')) + depends_on('gdal', when='+gdal') + depends_on('ffmpeg', when='+ffmpeg') + depends_on('openscenegraph', when='+openscenegraph') + depends_on('gl2ps', when='+gl2ps') + depends_on('eigen', when='+eigen') + + def url_for_version(self, version): + url = "https://github.com/eclipse/sumo/archive/v{0}.tar.gz" + return url.format(version.underscored) + + def setup_run_environment(self, env): + env.set('SUMO_HOME', self.prefix) From f1050c4be2954db88342f052f24326fb3017b7e0 Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Tue, 21 Apr 2020 16:56:50 -0400 Subject: [PATCH 032/802] compiler wrappers: don't override -isystem with -I (#16077) If the Spack compiler wrapper encounters any "-isystem" option, then when adding include directories for Spack dependencies, Spack will use "-isystem" instead of "-I". This prevents Spack-generated "-I" options from overriding the "-isystem" options generated by the build system. To ensure that build-system "-isystem" directories are searched first, Spack places all of its inserted "-isystem" directories after. The new ordering of -isystem includes is: * -isystem from build system (not system directories) * -isystem from Spack * -isystem from build system (for directories like /usr/include) The prior order of "-I" arguments is preserved (although as of this commit Spack no longer generates -I if -isystem is detected): * -I from build system (not system directories) * -I from Spack (only if there are no "-isystem" options) * -I from build system (for directories like /usr/include) --- lib/spack/env/cc | 48 +++++++++++++++++++-------- lib/spack/spack/test/cc.py | 68 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 14 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index f2b8bf577f5..b5913c5f10b 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -15,9 +15,9 @@ # 1. It allows Spack to swap compilers into and out of builds easily. # 2. It adds several options to the compile line so that spack # packages can find their dependencies at build time and run time: -# -I arguments for dependency /include directories. -# -L arguments for dependency /lib directories. -# -Wl,-rpath arguments for dependency /lib directories. +# -I and/or -isystem arguments for dependency /include directories. +# -L arguments for dependency /lib directories. +# -Wl,-rpath arguments for dependency /lib directories. # # This is an array of environment variables that need to be set before @@ -251,10 +251,11 @@ input_command="$*" # # Parse the command line arguments. # -# We extract -L, -I, and -Wl,-rpath arguments from the command line and -# recombine them with Spack arguments later. We parse these out so that -# we can make sure that system paths come last, that package arguments -# come first, and that Spack arguments are injected properly. +# We extract -L, -I, -isystem and -Wl,-rpath arguments from the +# command line and recombine them with Spack arguments later. We +# parse these out so that we can make sure that system paths come +# last, that package arguments come first, and that Spack arguments +# are injected properly. # # All other arguments, including -l arguments, are treated as # 'other_args' and left in their original order. This ensures that @@ -273,12 +274,24 @@ system_libdirs=() system_rpaths=() libs=() other_args=() +isystem_system_includes=() +isystem_includes=() while [ -n "$1" ]; do # an RPATH to be added after the case statement. rp="" case "$1" in + -isystem*) + arg="${1#-isystem}" + isystem_was_used=true + if [ -z "$arg" ]; then shift; arg="$1"; fi + if system_dir "$arg"; then + isystem_system_includes+=("$arg") + else + isystem_includes+=("$arg") + fi + ;; -I*) arg="${1#-I}" if [ -z "$arg" ]; then shift; arg="$1"; fi @@ -425,12 +438,6 @@ then esac fi -# Prepend include directories -IFS=':' read -ra include_dirs <<< "$SPACK_INCLUDE_DIRS" -if [[ $mode == cpp || $mode == cc || $mode == as || $mode == ccld ]]; then - includes=("${includes[@]}" "${include_dirs[@]}") -fi - IFS=':' read -ra rpath_dirs <<< "$SPACK_RPATH_DIRS" if [[ $mode == ccld || $mode == ld ]]; then @@ -481,9 +488,22 @@ args=() # flags assembled earlier args+=("${flags[@]}") -# include directory search paths +# Insert include directories just prior to any system include directories + for dir in "${includes[@]}"; do args+=("-I$dir"); done +for dir in "${isystem_includes[@]}"; do args+=("-isystem$dir"); done + +IFS=':' read -ra spack_include_dirs <<< "$SPACK_INCLUDE_DIRS" +if [[ $mode == cpp || $mode == cc || $mode == as || $mode == ccld ]]; then + if [[ "$isystem_was_used" == "true" ]] ; then + for dir in "${spack_include_dirs[@]}"; do args+=("-isystem$dir"); done + else + for dir in "${spack_include_dirs[@]}"; do args+=("-I$dir"); done + fi +fi + for dir in "${system_includes[@]}"; do args+=("-I$dir"); done +for dir in "${isystem_system_includes[@]}"; do args+=("-isystem$dir"); done # Library search paths for dir in "${libdirs[@]}"; do args+=("-L$dir"); done diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index c1e1db914f8..7b8d34fbde2 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -338,6 +338,36 @@ def test_ccld_deps(): test_args_without_paths) +def test_ccld_deps_isystem(): + """Ensure all flags are added in ccld mode. + When a build uses -isystem, Spack should inject it's + include paths using -isystem. Spack will insert these + after any provided -isystem includes, but before any + system directories included using -isystem""" + with set_env(SPACK_INCLUDE_DIRS='xinc:yinc:zinc', + SPACK_RPATH_DIRS='xlib:ylib:zlib', + SPACK_LINK_DIRS='xlib:ylib:zlib'): + mytest_args = test_args + ['-isystemfooinc'] + check_args( + cc, mytest_args, + [real_cc] + + test_include_paths + + ['-isystemfooinc', + '-isystemxinc', + '-isystemyinc', + '-isystemzinc'] + + test_library_paths + + ['-Lxlib', + '-Lylib', + '-Lzlib'] + + ['-Wl,--disable-new-dtags'] + + test_wl_rpaths + + ['-Wl,-rpath,xlib', + '-Wl,-rpath,ylib', + '-Wl,-rpath,zlib'] + + test_args_without_paths) + + def test_cc_deps(): """Ensure -L and RPATHs are not added in cc mode.""" with set_env(SPACK_INCLUDE_DIRS='xinc:yinc:zinc', @@ -390,6 +420,44 @@ def test_ccld_with_system_dirs(): test_args_without_paths) +def test_ccld_with_system_dirs_isystem(): + """Ensure all flags are added in ccld mode. + Ensure that includes are in the proper + place when a build uses -isystem, and uses + system directories in the include paths""" + with set_env(SPACK_INCLUDE_DIRS='xinc:yinc:zinc', + SPACK_RPATH_DIRS='xlib:ylib:zlib', + SPACK_LINK_DIRS='xlib:ylib:zlib'): + + sys_path_args = ['-isystem/usr/include', + '-L/usr/local/lib', + '-Wl,-rpath,/usr/lib64', + '-isystem/usr/local/include', + '-L/lib64/'] + check_args( + cc, sys_path_args + test_args, + [real_cc] + + test_include_paths + + ['-isystemxinc', + '-isystemyinc', + '-isystemzinc'] + + ['-isystem/usr/include', + '-isystem/usr/local/include'] + + test_library_paths + + ['-Lxlib', + '-Lylib', + '-Lzlib'] + + ['-L/usr/local/lib', + '-L/lib64/'] + + ['-Wl,--disable-new-dtags'] + + test_wl_rpaths + + ['-Wl,-rpath,xlib', + '-Wl,-rpath,ylib', + '-Wl,-rpath,zlib'] + + ['-Wl,-rpath,/usr/lib64'] + + test_args_without_paths) + + def test_ld_deps(): """Ensure no (extra) -I args or -Wl, are passed in ld mode.""" with set_env(SPACK_INCLUDE_DIRS='xinc:yinc:zinc', From 745804582be4c8ef25ba9b0cb7dee62aa6e4b8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20Dai=C3=9F?= Date: Tue, 21 Apr 2020 23:03:46 +0200 Subject: [PATCH 033/802] Add new package: sgpp (#15961) * sgpp: Added recipe * sgpp: Removed maintainer and updated patch * sgpp: Added more conflicts * sgpp: Added conflicts for older combigrid versions * sgpp: Added one more maintainer * sgpp: Add version 3.3.0 and sane defaults * sgpp: Better description and c++11 conflicts * sgpp: Updated maintainers * sgpp: Fix flake8 errors * sgpp: Fix dependencies and minor issues - Added py-setuptools dependency - Fixed zlib link dependency - Added git url - Using spec.satisfies where appropriate * sgpp: Added testing to package * sgpp: Remove simd variant and use spec instead * sgpp: Remove java variant * sgpp: Small bugfixes * sgpp: Add datadriven patch and patch explanations --- .../sgpp/avx512_datadriven_compilation.patch | 21 ++ .../builtin/packages/sgpp/directory.patch | 22 ++ .../builtin/packages/sgpp/fix-setup-py.patch | 160 ++++++++++++++ .../repos/builtin/packages/sgpp/ocl.patch | 13 ++ .../repos/builtin/packages/sgpp/package.py | 205 ++++++++++++++++++ 5 files changed, 421 insertions(+) create mode 100644 var/spack/repos/builtin/packages/sgpp/avx512_datadriven_compilation.patch create mode 100644 var/spack/repos/builtin/packages/sgpp/directory.patch create mode 100644 var/spack/repos/builtin/packages/sgpp/fix-setup-py.patch create mode 100644 var/spack/repos/builtin/packages/sgpp/ocl.patch create mode 100644 var/spack/repos/builtin/packages/sgpp/package.py diff --git a/var/spack/repos/builtin/packages/sgpp/avx512_datadriven_compilation.patch b/var/spack/repos/builtin/packages/sgpp/avx512_datadriven_compilation.patch new file mode 100644 index 00000000000..268cba63587 --- /dev/null +++ b/var/spack/repos/builtin/packages/sgpp/avx512_datadriven_compilation.patch @@ -0,0 +1,21 @@ +diff --git a/datadriven/src/sgpp/datadriven/operation/hash/OperationMultiEvalStreaming/OperationMultiEvalStreaming_multImpl.cpp b/datadriven/src/sgpp/datadriven/operation/hash/OperationMultiEvalStreaming/OperationMultiEvalStreaming_multImpl.cpp +index 7fafd43d4..ea15ba137 100644 +--- a/datadriven/src/sgpp/datadriven/operation/hash/OperationMultiEvalStreaming/OperationMultiEvalStreaming_multImpl.cpp ++++ b/datadriven/src/sgpp/datadriven/operation/hash/OperationMultiEvalStreaming/OperationMultiEvalStreaming_multImpl.cpp +@@ -295,6 +295,7 @@ void OperationMultiEvalStreaming::multImpl( + _mm512_extload_pd(A, _MM_UPCONV_PD_NONE, _MM_BROADCAST_1X8, _MM_HINT_NONE) + #define _mm512_max_pd(A, B) _mm512_gmax_pd(A, B) + #define _mm512_set1_epi64(A) _mm512_set_1to8_epi64(A) ++#define _mm512_set1_pd(A) _mm512_set_1to8_pd(A) + #endif + #if defined(__AVX512F__) + #define _mm512_broadcast_sd(A) _mm512_broadcastsd_pd(_mm_load_sd(A)) +@@ -409,7 +410,7 @@ void OperationMultiEvalStreaming::multImpl( + eval_11 = _mm512_castsi512_pd(_mm512_and_epi64(abs2Mask, _mm512_castpd_si512(eval_11))); + #endif + +- __m512d one = _mm512_set_1to8_pd(1.0); ++ __m512d one = _mm512_set1_pd(1.0); + + eval_0 = _mm512_sub_pd(one, eval_0); + eval_1 = _mm512_sub_pd(one, eval_1); diff --git a/var/spack/repos/builtin/packages/sgpp/directory.patch b/var/spack/repos/builtin/packages/sgpp/directory.patch new file mode 100644 index 00000000000..f1b22864231 --- /dev/null +++ b/var/spack/repos/builtin/packages/sgpp/directory.patch @@ -0,0 +1,22 @@ +diff --git a/SConstruct b/SConstruct +index 98c1a56ac..30baef5e5 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -293,7 +293,7 @@ Parameters are: + for line in vars.GenerateHelpText(env).splitlines()])) + + # add trailing slashes were required and if not present +-BUILD_DIR = Dir(os.path.join("lib", "sgpp")) ++BUILD_DIR = Dir(os.path.join("lib")) + Export("BUILD_DIR") + PYSGPP_PACKAGE_PATH = Dir(os.path.join("lib")) + Export("PYSGPP_PACKAGE_PATH") +@@ -550,7 +550,7 @@ env.SideEffect("sideEffectFinalSteps", exampleTargetList) + ######################################################################### + + installLibSGpp = env.Alias("install-lib-sgpp", +- env.Install(os.path.join(env.get("LIBDIR"), "sgpp"), ++ env.Install(os.path.join(env.get("LIBDIR")), + libraryTargetList)) + + headerFinalDestList = [] diff --git a/var/spack/repos/builtin/packages/sgpp/fix-setup-py.patch b/var/spack/repos/builtin/packages/sgpp/fix-setup-py.patch new file mode 100644 index 00000000000..e201a5dff08 --- /dev/null +++ b/var/spack/repos/builtin/packages/sgpp/fix-setup-py.patch @@ -0,0 +1,160 @@ +diff --git a/setup.py b/setup.py +index af1ec083e..d971f87c5 100644 +--- a/setup.py ++++ b/setup.py +@@ -1,5 +1,5 @@ +-#!/usr/bin/env python +-# Copyright (C) 2008-today The SG++ Project ++#!/usr/bin/env python ++# Copyright (C) 2008-today The SG++ project + # This file is part of the SG++ project. For conditions of distribution and + # use, please see the copyright notice provided with SG++ or at + # sgpp.sparsegrids.org +@@ -8,17 +8,26 @@ + # script creates a pysgpp lib in the site-packages of + # python. Furthermore, it collects all the relevant python code, + # located in each module under the path /python and +-# copies it to the site-package folder of pysgpp using the following +-# scheme: /pysgpp-/extensions//. ++# copies it to the site-package folder of pysgpp under the extensions namespace ++# pysgpp.extensions + + import os + import shutil +-from setuptools import setup ++from setuptools import setup, find_packages ++ ++ ++try: ++ from wheel.bdist_wheel import bdist_wheel as _bdist_wheel ++ class bdist_wheel(_bdist_wheel): ++ def finalize_options(self): ++ _bdist_wheel.finalize_options(self) ++ self.root_is_pure = False ++except ImportError: ++ bdist_wheel = None + + # path to pysgpp lib + libpath = os.path.join("lib", "pysgpp") ++extensionspath = os.path.join(libpath, "extensions") + + # list of all available modules -> all folders in the root directory + moduleFolders = [filename for filename in os.listdir(".") +@@ -29,16 +38,44 @@ pythonModuleFolders = [(moduleFolder, os.path.join(moduleFolder, "python")) + for moduleFolder in moduleFolders + if os.path.exists(os.path.join(moduleFolder, "python"))] + +-# create the data file list such that it can be used by setuptools +-dataFiles = [] ++try: ++ os.mkdir(extensionspath) ++except FileExistsError as e: ++ pass ++ ++# create list of extension scripts ++extFiles = [] + for moduleFolder, srcdir in pythonModuleFolders: +- basepath = os.path.join("pysgpp", "extensions", moduleFolder) ++ basepath = os.path.join(extensionspath, moduleFolder) ++ try: ++ os.mkdir(basepath) ++ except FileExistsError as e: ++ pass + for root, dirs, files in os.walk(srcdir): +- if '.svn' in dirs: +- dirs.remove('.svn') ++ if '.git' in dirs: ++ dirs.remove('.git') ++ ++ extFiles += [os.path.join(root, f) for f in files if ".py" in f] ++ ++## ++# copy extension python files to new layout ++# pysgpp ++# --extensions ++# ----modulename ++# ------*.py ++## + +- dataFiles += [(root.replace(srcdir, basepath), +- [os.path.join(root, f) for f in files])] ++for f in extFiles: ++ dest = os.path.join(extensionspath,f) ++ dest = dest.replace(os.sep + "python", "") ++ try: ++ shutil.copy2(f, dest) ++ except FileNotFoundError as e: ++ os.mkdir(os.path.dirname(dest)) ++ shutil.copy2(f, dest) ++ except shutil.SameFileError as e: ++ pass ++ + + # write init file for pysgpp + initFile = os.path.join(libpath, "__init__.py") +@@ -50,8 +87,8 @@ import sys + sys.path.append(os.path.dirname(__file__)) + + # import pysgpp_swig and extensions +-from pysgpp_swig import * +-import pysgpp.extensions ++from .pysgpp_swig import * ++from . import extensions + """) + + if len(moduleFolders) > 0: +@@ -59,9 +96,13 @@ if len(moduleFolders) > 0: + initFile = os.path.join("__init__.py") + with open(initFile, "w") as f: + for moduleFolder, _ in pythonModuleFolders: +- f.write("import %s\n" % moduleFolder) ++ f.write("from . import %s\n" % moduleFolder) + +- dataFiles += [(os.path.join("pysgpp", "extensions"), [initFile])] ++ try: ++ shutil.copy2(initFile, os.path.join(extensionspath, initFile)) ++ except shutil.SameFileError as e: ++ pass ++ + + # if the current system is windows we need to rename the dll to pyd + dllLibs = [filename for filename in os.listdir(libpath) +@@ -74,20 +115,27 @@ for dllLib in dllLibs: + + # setup pysgpp + setup(name='pysgpp', +- version="1.0.0", +- url='sgpp.sparsegrids.org', +- author="Fabian Franzelin", +- description='', +- license='', ++ version="0.0.0", ++ url='https://github.com/SGpp/SGpp', ++ author="Dirk.Pflueger@ipvs.uni-stuttgart.de", ++ description='''The sparse grids toolkit SG++ ++ SG++ is a collection of numerical algorithms for sparse grids. It ++ contains modules for interpolation, quadrature, data mining ++ (regression, classification, clustering), optimization, PDEs, and ++ more. SG++ implements algorithms for spatially adaptive grids and ++ also provides a module for the combination technique. Many of the ++ implemented algorithms are also available as a high-performance ++ version, often orders of magnitude faster than standard ++ implementations.''', ++ license='BSD-style license', + long_description="README", +- platforms='any', + zip_safe=False, + package_dir={'': 'lib'}, +- packages=['pysgpp'], +- package_data={'pysgpp': ['*.so', '*.lib', '*.pyd']}, +- data_files=dataFiles ++ packages=find_packages(where='lib', include=['pysgpp', 'pysgpp.extensions*']), ++ package_data={'pysgpp': ['_pysgpp_swig.so', '*.lib', '*.pyd']}, + ) + + # cleanup + if len(moduleFolders) > 0 and os.path.exists(initFile): + os.remove(initFile) ++ shutil.rmtree(extensionspath, ignore_errors=True) diff --git a/var/spack/repos/builtin/packages/sgpp/ocl.patch b/var/spack/repos/builtin/packages/sgpp/ocl.patch new file mode 100644 index 00000000000..fbdca6ff188 --- /dev/null +++ b/var/spack/repos/builtin/packages/sgpp/ocl.patch @@ -0,0 +1,13 @@ +diff --git a/datadriven/examplesOCL/multiEvalPerformance.cpp b/datadriven/examplesOCL/multiEvalPerformance.cpp +index 60c281353..373e8509d 100644 +--- a/datadriven/examplesOCL/multiEvalPerformance.cpp ++++ b/datadriven/examplesOCL/multiEvalPerformance.cpp +@@ -17,7 +17,7 @@ int main(int argc, char** argv) { + std::string fileName = "debugging.arff"; + + sgpp::datadriven::ARFFTools arffTools; +- sgpp::datadriven::Dataset dataset = arffTools.readARFFFromeFile(fileName); ++ sgpp::datadriven::Dataset dataset = arffTools.readARFFFromFile(fileName); + + // sgpp::base::DataVector *classes = dataset.getClasses(); + sgpp::base::DataMatrix& trainingData = dataset.getData(); diff --git a/var/spack/repos/builtin/packages/sgpp/package.py b/var/spack/repos/builtin/packages/sgpp/package.py new file mode 100644 index 00000000000..7e5b907374e --- /dev/null +++ b/var/spack/repos/builtin/packages/sgpp/package.py @@ -0,0 +1,205 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Sgpp(SConsPackage): + """SGpp is a library and framework for sparse grids in different flavors. + SGpp supports both hierarchical spatially-adaptive sparse grids and the + dimensionally-adaptive sparse grid combination technique.""" + + homepage = "https://sgpp.sparsegrids.org" + url = "https://github.com/SGpp/SGpp/archive/v3.2.0.tar.gz" + git = "https://github.com/SGpp/SGpp.git" + + maintainers = ['G-071', 'leiterrl', 'pfluegdk'] + + # Versions with Python 3 bindings: + version('master', branch='master') + version('3.3.0', sha256='ca4d5b79f315b425ce69b04940c141451a76848bf1bd7b96067217304c68e2d4') + version('3.2.0', sha256='dab83587fd447f92ed8546eacaac6b8cbe65b8db5e860218c0fa2e42f776962d') + # Versions with Python 2 bindings: + version('3.1.0', sha256='6b46bc5b3966e92567d6754130666bdffb7be1d1d2c1b427d7ce964b8eaab526') + version('3.0.0', sha256='4dd9049e664abd7db78c355fea5e192167812f443115d4bf686a51bb1e9bda9c') + + # Patches with bugfixes that are necessary to build old SGpp versions + # with spack. Patches are submitted upstream, but need to applied + # for versions too old to include them as they will not be + # backported for old releases: + + # Patch that ensures libraries will actually + # be copied into prefix/lib upon installation + # (otherwise it would be prefix/lib/sgpp) + # Fixed in SGpp in PR https://github.com/SGpp/SGpp/pull/222 + patch('directory.patch', when='@:3.2.0') + # Fix faulty setup.py introduced in 3.2.0 + # Fixed in SGpp in version 3.3.0 + patch('fix-setup-py.patch', when='@3.2.0') + # Fix compilation issue with opencl introduced in 3.2.0 + # Fixed in SGpp in PR https://github.com/SGpp/SGpp/pull/219 + patch('ocl.patch', when='@3.2.0+opencl') + # Fixes compilation with AVX512 and datadriven + # Fixed in SGpp in PR https://github.com/SGpp/SGpp/pull/229 + patch('avx512_datadriven_compilation.patch', when='@:3.3.0+datadriven') + + variant('python', default=True, + description='Provide Python bindings for SGpp') + variant('optimization', default=True, + description='Builds the optimization module of SGpp') + variant('pde', default=True, + description='Builds the datadriven module of SGpp') + variant('quadrature', default=True, + description='Builds the datadriven module of SGpp') + variant('datadriven', default=False, + description='Builds the datadriven module of SGpp') + variant('misc', default=False, + description='Builds the misc module of SGpp') + variant('combigrid', default=False, + description='Builds the combigrid module of SGpp') + variant('solver', default=True, + description='Builds the solver module of SGpp') + variant('opencl', default=False, + description='Enables support for OpenCL accelerated operations') + variant('mpi', default=False, + description='Enables support for MPI-distributed operations') + + # Java variant deactivated due to spack issue #987 + # variant('java', default=False, + # description='Provide Java bindings for SGpp') + # depends_on('swig@3:', when='+java', type=('build')) + # extends('openjdk', when='+java') + + # Mandatory dependencies + depends_on('scons@2.5.1', when='@:3.1.0', type=('build')) + depends_on('scons@3:', when='@3.2.0:', type=('build')) + depends_on('zlib', type=('link')) + # Python dependencies + extends('python', when='+python') + depends_on('py-setuptools', when='+python', type=('build')) + # Python 3 support was added in version 3.2.0 + depends_on('python@2.7:2.8', when='@:3.1.0+python', type=('build', 'run')) + depends_on('python@3:', when='@3.2.0:+python', type=('build', 'run')) + depends_on('swig@3:', when='+python', type=('build')) + # Python libraries (version depends on whether we use Python 2 or 3) + depends_on('py-numpy@:1.16', when='@:3.1.0+python', type=('build', 'run')) + depends_on('py-numpy@1.17:', when='@3.2.0:+python', type=('build', 'run')) + depends_on('py-scipy@:1.2.3', when='@:3.1.0+python', type=('build', 'run')) + depends_on('py-scipy@1.3.0:', when='@3.2.0:+python', type=('build', 'run')) + # OpenCL dependency + depends_on('opencl@1.1:', when='+opencl', type=('build', 'run')) + # MPI dependency + depends_on('mpi', when='+mpi', type=('build', 'run')) + # Testing requires boost test + depends_on('boost+test', type=('test')) + + # Compiler with C++11 support is required + conflicts('%gcc@:4.8.4', msg='Compiler with c++11 support is required!') + conflicts('%clang@:3.2', msg='Compiler with c++11 support is required!') + conflicts('%intel@:14', msg='Compiler with c++11 support is required!') + # Solver python bindings are actually using the pde module at one point: + conflicts('-pde', when='+python+solver') + # some modules depend on each other (notably datadriven and misc) + conflicts('+pde', when='-solver') + # Datadriven module requirements + conflicts('+datadriven', when='-solver') + conflicts('+datadriven', when='-optimization') + conflicts('+datadriven', when='-pde') + # Misc module requirements + conflicts('+misc', when='-datadriven') + conflicts('+misc', when='-solver') + conflicts('+misc', when='-optimization') + conflicts('+misc', when='-pde') + conflicts('+misc', when='@:3.1.0', + msg='The misc module was introduced in version 3.2.0') + # Combigrid module requirements (for 3.2.0 or older) + # newer combigrids have no dependencies + conflicts('+combigrid', when='@:3.2.0~optimization') + conflicts('+combigrid', when='@:3.2.0~pde') + conflicts('+combigrid', when='@:3.2.0~solver') + conflicts('+combigrid', when='@:3.2.0~quadrature') + + def build_args(self, spec, prefix): + # Testing parameters + if self.run_tests: + self.args = ['COMPILE_BOOST_TESTS=1', + 'RUN_BOOST_TESTS=1'] + if ('+python' in spec): + self.args.append('RUN_PYTHON_TESTS=1') + if spec.satisfies('@:3.2.0'): + self.args.append('RUN_CPPLINT=1') + else: # argument was renamed after 3.2.0 + self.args.append('CHECK_STYLE=1') + else: + self.args = ['COMPILE_BOOST_TESTS=0', + 'RUN_BOOST_TESTS=0', + 'RUN_PYTHON_TESTS=0'] + if spec.satisfies('@:3.2.0'): + self.args.append('RUN_CPPLINT=0') + else: # argument was renamed after 3.2.0 + self.args.append('CHECK_STYLE=0') + + # Install direction + self.args.append('PREFIX={0}'.format(prefix)) + + # Generate swig bindings? + self.args.append('SG_PYTHON={0}'.format( + '1' if '+python' in spec else '0')) + + # Java variant deactivated due to spack issue #987 + # self.args.append('SG_JAVA={0}'.format( + # '1' if '+java' in spec else '0')) + self.args.append('SG_JAVA=0') + + # Which modules to build? + self.args.append('SG_OPTIMIZATION={0}'.format( + '1' if '+optimization' in spec else '0')) + self.args.append('SG_QUADRATURE={0}'.format( + '1' if '+quadrature' in spec else '0')) + self.args.append('SG_PDE={0}'.format( + '1' if '+pde' in spec else '0')) + self.args.append('SG_DATADRIVEN={0}'.format( + '1' if '+datadriven' in spec else '0')) + self.args.append('SG_COMBIGRID={0}'.format( + '1' if '+combigrid' in spec else '0')) + self.args.append('SG_SOLVER={0}'.format( + '1' if '+solver' in spec else '0')) + + # Misc flag did not exist in older versions + if spec.satisfies('@3.2.0:'): + self.args.append('SG_MISC={0}'.format( + '1' if '+misc' in spec else '0')) + + # SIMD scons parameter (pick according to simd spec) + if 'avx512' in self.spec.target: + self.args.append('ARCH=avx512') + elif 'avx2' in self.spec.target: + self.args.append('ARCH=avx2') + elif 'avx' in self.spec.target: + self.args.append('ARCH=avx') + elif 'fma4' in self.spec.target: + self.args.append('ARCH=fma4') + elif 'sse42' in self.spec.target: + self.args.append('ARCH=sse42') + elif 'sse3' in self.spec.target: + self.args.append('ARCH=sse3') + + # OpenCL Flags + self.args.append('USE_OCL={0}'.format( + '1' if '+opencl' in spec else '0')) + + # Get the mpicxx compiler from the Spack spec + # (makes certain we use the one from spack): + if ('+mpi' in spec): + self.args.append('CXX={0}'.format( + self.spec['mpi'].mpicxx)) + + return self.args + + def install_args(self, spec, prefix): + # Everything is already built, time to install our python bindings: + if '+python' in spec: + setup_py('install', '--prefix={0}'.format(prefix)) + return self.args From f3aceddbfbfa287595a5a0b5baab8ae3cd06d723 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 21 Apr 2020 23:09:14 +0200 Subject: [PATCH 034/802] py-tap-py: Add 3.0 and 2.6.2 (#16169) --- .../builtin/packages/py-tap-py/package.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-tap-py/package.py b/var/spack/repos/builtin/packages/py-tap-py/package.py index e3f453763d7..a0c9c84ee6b 100644 --- a/var/spack/repos/builtin/packages/py-tap-py/package.py +++ b/var/spack/repos/builtin/packages/py-tap-py/package.py @@ -9,14 +9,18 @@ class PyTapPy(PythonPackage): """Python TAP interface module for unit tests""" - homepage = "https://github.com/mblayman/tappy" - url = "https://pypi.io/packages/source/t/tap.py/tap.py-1.6.tar.gz" + homepage = "https://github.com/python-tap/tappy" + url = "https://pypi.io/packages/source/t/tap.py/tap.py-3.0.tar.gz" - version('1.6', sha256='3ee315567cd1cf444501c405b7f7146ffdb2e630bac58d0840d378a3b9a0dbe4') + version('3.0', sha256='f5eeeeebfd64e53d32661752bb4c288589a3babbb96db3f391a4ec29f1359c70') + version('2.6.2', sha256='5f219d92dbad5e378f8f7549cdfe655b0d5fd2a778f9c83bee51b61c6ca40efb') + version('1.6', sha256='3ee315567cd1cf444501c405b7f7146ffdb2e630bac58d0840d378a3b9a0dbe4') extends('python', ignore='bin/nosetests|bin/pygmentize') - depends_on('python@2.6:2.8,3.2:3.4') - depends_on('py-nose', type=('build', 'run')) - depends_on('py-pygments', type=('build', 'run')) - depends_on('py-setuptools', type='build') + depends_on('python@3.5:3.7', when='@3.0:') + depends_on('python@2.7:2.8,3.5:3.7', when='@2.6') + depends_on('python@2.6:2.8,3.2:3.4', when='@:1.8') + depends_on('py-nose', type=('build', 'run'), when='@:1.99') + depends_on('py-pygments', type=('build', 'run'), when='@:1.99') + depends_on('py-setuptools', type=('build', 'run')) From 54ca52943d885d32964c7f5ea8a36070127484c8 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 21 Apr 2020 16:20:11 -0500 Subject: [PATCH 035/802] PyTorch: add 1.5.0 (#16212) --- var/spack/repos/builtin/packages/py-torch/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 619a621c2b3..6428d6cb8e5 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -50,6 +50,7 @@ class PyTorch(PythonPackage, CudaPackage): ] version('master', branch='master', submodules=True) + version('1.5.0', tag='v1.5.0', submodules=True) version('1.4.1', tag='v1.4.1', submodules=True) # see https://github.com/pytorch/pytorch/issues/35149 version('1.4.0', tag='v1.4.0', submodules=True, @@ -115,6 +116,7 @@ class PyTorch(PythonPackage, CudaPackage): # Use Ninja generator to speed up build times # Automatically used if found depends_on('ninja@1.5:', type='build') + depends_on('python@3.5:', when='@1.5:', type=('build', 'run')) depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') depends_on('py-numpy', type=('build', 'run')) From 272c47207d5ce7f1e6f5f6b4e3958f5b99283c2c Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 21 Apr 2020 14:20:45 -0700 Subject: [PATCH 036/802] Updated the 'opengl' package to include all older versions of the library. (#16219) --- var/spack/repos/builtin/packages/opengl/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/opengl/package.py b/var/spack/repos/builtin/packages/opengl/package.py index 603dc9cb88d..413b8e0f453 100644 --- a/var/spack/repos/builtin/packages/opengl/package.py +++ b/var/spack/repos/builtin/packages/opengl/package.py @@ -20,6 +20,17 @@ class Opengl(Package): provides('gl@:4.2', when='@4.2:') provides('gl@:4.1', when='@4.1:') provides('gl@:3.3', when='@3.3:') + provides('gl@:3.2', when='@3.2:') + provides('gl@:3.1', when='@3.1:') + provides('gl@:3.0', when='@3.0:') + provides('gl@:2.1', when='@2.1:') + provides('gl@:2.0', when='@2.0:') + provides('gl@:1.5', when='@1.5:') + provides('gl@:1.4', when='@1.4:') + provides('gl@:1.3', when='@1.3:') + provides('gl@:1.2', when='@1.2:') + provides('gl@:1.1', when='@1.1:') + provides('gl@:1.0', when='@1.0:') if sys.platform != 'darwin': provides('glx@1.4') From ca4c0b97ecf13b4a9c9007bb7ff4912cddae820c Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 21 Apr 2020 14:22:30 -0700 Subject: [PATCH 037/802] Doc: Conflict Msg Pkg Guide (#16201) Document the nice `msg=` argument in conflicts. Super useful for less generic conflict guidance. --- lib/spack/docs/packaging_guide.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 26f843aa0e8..7abadaac820 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2169,13 +2169,17 @@ Adding the following to a package: .. code-block:: python - conflicts('%intel', when='@1.2') + conflicts('%intel', when='@:1.2', + msg=' <= v1.2 cannot be built with Intel ICC, ' + 'please use a newer release.') we express the fact that the current package *cannot be built* with the Intel -compiler when we are trying to install version "1.2". The ``when`` argument can -be omitted, in which case the conflict will always be active. +compiler when we are trying to install a version "<=1.2". The ``when`` argument +can be omitted, in which case the conflict will always be active. Conflicts are always evaluated after the concretization step has been performed, and if any match is found a detailed error message is shown to the user. +You can add an additional message via the ``msg=`` parameter to a conflict that +provideds more specific instructions for users. .. _packaging_extensions: From 667fee0703799fc78606d0628ff42b0f5a318f2c Mon Sep 17 00:00:00 2001 From: Andrew Gaspar Date: Tue, 21 Apr 2020 17:52:50 -0600 Subject: [PATCH 038/802] catch2 2.12.1 (#16211) --- var/spack/repos/builtin/packages/catch2/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/catch2/package.py b/var/spack/repos/builtin/packages/catch2/package.py index 5d3d25d7631..96b1534b183 100644 --- a/var/spack/repos/builtin/packages/catch2/package.py +++ b/var/spack/repos/builtin/packages/catch2/package.py @@ -14,6 +14,7 @@ class Catch2(CMakePackage): url = "https://github.com/catchorg/Catch2/archive/v2.9.1.tar.gz" maintainers = ['ax3l'] + version('2.12.1', sha256='e5635c082282ea518a8dd7ee89796c8026af8ea9068cd7402fb1615deacd91c3') version('2.12.0', sha256='6606b754363d3a4521bfecf717dc1972c50dca282bd428dfb1370ec8b9c26918') version('2.11.3', sha256='9a6967138062688f04374698fce4ce65908f907d8c0fe5dfe8dc33126bd46543') version('2.11.2', sha256='a96203fa531092375678ad2d81c43317ee58c684787f24b2a55748f6c6839799') From 2f7e940872f0361bc28a21b665ad2986da21d246 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 21 Apr 2020 20:36:02 -0700 Subject: [PATCH 039/802] Fix: Flex Reconfigure (#16194) * Fix: Flex Reconfigure Learn the `flex` package how to reconfigure itself when needed. Fix #11551 Co-authored-by: Andrew W Elble * Autoreconf: only when actually desired Co-authored-by: Andrew W Elble --- var/spack/repos/builtin/packages/flex/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index 3c9f51a0eb0..83214099f2c 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -43,6 +43,11 @@ class Flex(AutotoolsPackage): # - https://github.com/westes/flex/issues/241 patch('https://github.com/westes/flex/commit/24fd0551333e7eded87b64dd36062da3df2f6380.patch', sha256='09c22e5c6fef327d3e48eb23f0d610dcd3a35ab9207f12e0f875701c677978d3', when='@2.6.4') + @when('@:2.6.0,2.6.4') + def autoreconf(self, spec, prefix): + autogen = Executable('./autogen.sh') + autogen() + @property def force_autoreconf(self): # The patch for 2.6.4 touches configure From 1289d3589aeaf5ad5cc8068ce4851d1fabb72bec Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 22 Apr 2020 12:01:49 +0800 Subject: [PATCH 040/802] Add new package: cmockery (#16225) --- .../builtin/packages/cmockery/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cmockery/package.py diff --git a/var/spack/repos/builtin/packages/cmockery/package.py b/var/spack/repos/builtin/packages/cmockery/package.py new file mode 100644 index 00000000000..bb4cf5b22cf --- /dev/null +++ b/var/spack/repos/builtin/packages/cmockery/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Cmockery(AutotoolsPackage): + """A lightweight library to simplify and generalize the process of + writing unit tests for C applications.""" + + homepage = "https://github.com/google/cmockery" + url = "https://github.com/google/cmockery/archive/v0.1.2.tar.gz" + + version('0.1.2', sha256='d40135ae9179201c01bde725fa64fc32d86b5899972e0ce4ad51668d261edbae') + version('0.1.1', sha256='a801d17976f781fff6dc49042ff109e55ca4ebe8efb13757fa1a511ca52316be') + version('0.1.0', sha256='9e017d48e56ab9d2ebcf5286fa54e37d42fe308d3c01fbc367793da2b9ad95e7') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + + def autoreconf(self, spec, prefix): + bash = which('bash') + bash('./autogen.sh') From ac228050ab4955f996869dad886b5edd89d8443e Mon Sep 17 00:00:00 2001 From: jthies Date: Wed, 22 Apr 2020 06:10:11 +0200 Subject: [PATCH 041/802] Phist int64 variant (#16209) * phist: add int64 variant and resulting conflicts and dependencies * phist: use Trilinos TPLs as soon as they are in the spec, not just if +trilinos isexplicitly set and remove a redundant depends-statement * phist: use int as gotype for Trilinos dependency if ~int64 * phist: new version 1.9.0 * phist: remove trailing whitespace * phist: updated checksum (version tag was moved) --- .../repos/builtin/packages/phist/package.py | 33 ++++++++++++----- .../phist/update_tpetra_gotypes.patch | 35 +++++++++++++++++++ 2 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 var/spack/repos/builtin/packages/phist/update_tpetra_gotypes.patch diff --git a/var/spack/repos/builtin/packages/phist/package.py b/var/spack/repos/builtin/packages/phist/package.py index 42ad816dfa8..797d09a8463 100644 --- a/var/spack/repos/builtin/packages/phist/package.py +++ b/var/spack/repos/builtin/packages/phist/package.py @@ -26,6 +26,7 @@ class Phist(CMakePackage): version('develop', branch='devel') version('master', branch='master') + version('1.9.0', sha256='990d3308fc0083ed0f9f565d00c649ee70c3df74d44cbe5f19dfe05263d06559') version('1.8.0', sha256='ee42946bce187e126452053b5f5c200b57b6e40ee3f5bcf0751f3ced585adeb0') version('1.7.5', sha256='f11fe27f2aa13d69eb285cc0f32c33c1603fa1286b84e54c81856c6f2bdef500') version('1.7.4', sha256='ef0c97fda9984f53011020aff3e61523833320f5f5719af2f2ed84463cccb98b') @@ -44,9 +45,12 @@ class Phist(CMakePackage): 'eigen', 'ghost']) + variant(name='int64', default=True, + description='Use 64-bit global indices.') + variant(name='outlev', default='2', values=['0', '1', '2', '3', '4', '5'], description='verbosity. 0: errors 1: +warnings 2: +info ' - '3: +verbose 4: +extreme 5; +debug') + '3: +verbose 4: +extreme 5: +debug') variant('host', default=True, description='allow PHIST to use compiler flags that lead to host-' @@ -86,6 +90,13 @@ class Phist(CMakePackage): # in older versions, it is not possible to turn off the use of host- # specific compiler flags in Release mode. conflicts('~host', when='@:1.7.3') + # builtin always uses 64-bit indices + conflicts('~int64', when='kernel_lib=builtin') + conflicts('+int64', when='kernel_lib=eigen') + + # ###################### Patches ########################## + + patch('update_tpetra_gotypes.patch', when='@:1.9.0') # ###################### Dependencies ########################## @@ -97,16 +108,18 @@ class Phist(CMakePackage): # the feature (e.g. use the '~fortran' variant) depends_on('python@3:', when='@1.7: +fortran', type='build') depends_on('mpi', when='+mpi') - depends_on('trilinos+anasazi+belos+teuchos', when='+trilinos') - depends_on('trilinos@12:+tpetra', when='kernel_lib=tpetra') + depends_on('trilinos@12:+tpetra gotype=long_long', when='kernel_lib=tpetra +int64') + depends_on('trilinos@12:+tpetra gotype=int', when='kernel_lib=tpetra ~int64') # Epetra backend also works with older Trilinos versions depends_on('trilinos+epetra', when='kernel_lib=epetra') - depends_on('petsc', when='kernel_lib=petsc') + depends_on('petsc +int64', when='kernel_lib=petsc +int64') + depends_on('petsc ~int64', when='kernel_lib=petsc ~int64') depends_on('eigen', when='kernel_lib=eigen') depends_on('ghost', when='kernel_lib=ghost') - depends_on('trilinos', when='+trilinos') - depends_on('parmetis ^metis+int64', when='+parmetis') + depends_on('trilinos+anasazi+belos+teuchos', when='+trilinos') + depends_on('parmetis ^metis+int64', when='+parmetis +int64') + depends_on('parmetis ^metis~int64', when='+parmetis ~int64') # Fortran 2003 bindings were included in version 1.7, previously they # required a separate package @@ -139,13 +152,15 @@ def cmake_args(self): '-DPHIST_ENABLE_SCAMAC:BOOL=%s' % ('ON' if '+scamac' in spec else 'OFF'), '-DPHIST_USE_TRILINOS_TPLS:BOOL=%s' - % ('ON' if '+trilinos' in spec else 'OFF'), + % ('ON' if '^trilinos' in spec else 'OFF'), '-DPHIST_USE_SOLVER_TPLS:BOOL=%s' - % ('ON' if '+trilinos' in spec else 'OFF'), + % ('ON' if '^trilinos+belos+anasazi' in spec else 'OFF'), '-DPHIST_USE_PRECON_TPLS:BOOL=%s' - % ('ON' if '+trilinos' in spec else 'OFF'), + % ('ON' if '^trilinos' in spec else 'OFF'), '-DXSDK_ENABLE_Fortran:BOOL=%s' % ('ON' if '+fortran' in spec else 'OFF'), + '-DXSDK_INDEX_SIZE=%s' + % ('64' if '+int64' in spec else '32'), '-DPHIST_HOST_OPTIMIZE:BOOL=%s' % ('ON' if '+host' in spec else 'OFF'), ] diff --git a/var/spack/repos/builtin/packages/phist/update_tpetra_gotypes.patch b/var/spack/repos/builtin/packages/phist/update_tpetra_gotypes.patch new file mode 100644 index 00000000000..2db579fc340 --- /dev/null +++ b/var/spack/repos/builtin/packages/phist/update_tpetra_gotypes.patch @@ -0,0 +1,35 @@ +commit 8df8ad0e56e3bbd3d0c133fcdb7d2af6ab4dd229 +Author: Jonas Thies +Date: Tue Apr 21 18:24:53 2020 +0200 + + tpetra: use 'int' and 'long long' as gidx type for 32 and 64-bit compilations, respectively + because Trilinos allows to instantiate those variants (before I had 'int'/'ptrdiff_t') + +diff --git a/src/kernels/tpetra/phist_typedefs.h b/src/kernels/tpetra/phist_typedefs.h +index 1f6b6c6c..3a351c27 100644 +--- a/src/kernels/tpetra/phist_typedefs.h ++++ b/src/kernels/tpetra/phist_typedefs.h +@@ -34,19 +34,18 @@ + using phist_s_complex = std::complex; + //! double precision complex type + using phist_d_complex = std::complex; +-//! type of global indices +-using phist_gidx = std::ptrdiff_t; + #else + typedef float complex phist_s_complex; + typedef double complex phist_d_complex; ++#endif ++ + //! type of global indices + #ifdef PHIST_FORCE_32BIT_GIDX + typedef int phist_gidx; + #define PRgidx "d" + #else +-typedef ptrdiff_t phist_gidx; +-#define PRgidx "ld" +-#endif ++typedef long long phist_gidx; ++#define PRgidx "lld" + #endif + + // we want ptrdiff_t (aka long long int on 64 bit systems) as local index, From 1e243023d835925502abfdde9a42ca890be9ee07 Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 22 Apr 2020 14:56:13 +0800 Subject: [PATCH 042/802] cmaq: added new package at v5.3.1 (#16224) Co-Authored-By: Adam J. Stewart --- .../repos/builtin/packages/cmaq/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cmaq/package.py diff --git a/var/spack/repos/builtin/packages/cmaq/package.py b/var/spack/repos/builtin/packages/cmaq/package.py new file mode 100644 index 00000000000..2f8d35e5c48 --- /dev/null +++ b/var/spack/repos/builtin/packages/cmaq/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Cmaq(Package): + """Code base for the U.S. EPA's Community Multiscale Air Quality Model + (CMAQ).""" + homepage = "http://www.epa.gov/CMAQ" + url = "https://github.com/USEPA/CMAQ/archive/CMAQv5.3.1_19Dec2019.tar.gz" + + version('5.3.1', sha256='659156bba27f33010e0fdc157a8d33f3b5b779b95511e2ade870284b6bcb4bc8', + url='https://github.com/USEPA/CMAQ/archive/CMAQv5.3.1_19Dec2019.tar.gz') + version('5.3', sha256='e245c291c7e88d481b13f577d1af9aeb5aef4de8c59f7fa06fa41d19bb2ed18c', + url='https://github.com/USEPA/CMAQ/archive/CMAQv5.3_27Aug2019.tar.gz') + + def install(self, spec, prefix): + install_tree('.', prefix) From 4c9c6b2a68ec26413cfbd9fccd73187db84c8337 Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 22 Apr 2020 16:53:28 +0800 Subject: [PATCH 043/802] linux-pam: added package at v1.3.1 (#16137) Co-authored-by: Adam J. Stewart --- .../builtin/packages/linux-pam/package.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 var/spack/repos/builtin/packages/linux-pam/package.py diff --git a/var/spack/repos/builtin/packages/linux-pam/package.py b/var/spack/repos/builtin/packages/linux-pam/package.py new file mode 100644 index 00000000000..0dff1e0654b --- /dev/null +++ b/var/spack/repos/builtin/packages/linux-pam/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class LinuxPam(AutotoolsPackage): + """Linux PAM (Pluggable Authentication Modules for Linux) project.""" + + homepage = "http://www.linux-pam.org/" + url = "https://github.com/linux-pam/linux-pam/releases/download/v1.3.1/Linux-PAM-1.3.1.tar.xz" + + version('1.3.1', sha256='eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + + def configure_args(self): + config_args = [ + '--includedir=' + self.prefix.include.security + ] + return config_args From ab35780fae9135752b8882e3726c810e4100ae53 Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 22 Apr 2020 16:55:07 +0800 Subject: [PATCH 044/802] buddy: added package at v2.4 (#16166) --- .../repos/builtin/packages/buddy/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/buddy/package.py diff --git a/var/spack/repos/builtin/packages/buddy/package.py b/var/spack/repos/builtin/packages/buddy/package.py new file mode 100644 index 00000000000..d6e92bb9b38 --- /dev/null +++ b/var/spack/repos/builtin/packages/buddy/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import platform + + +class Buddy(AutotoolsPackage): + """A Binary Decision Diagram library.""" + + homepage = "https://sourceforge.net/projects/buddy/" + url = "https://sourceforge.net/projects/buddy/files/buddy/BuDDy%202.4/buddy-2.4.tar.gz" + list_url = "https://sourceforge.net/projects/buddy/files/buddy" + list_depth = 1 + + version('2.4', sha256='d3df80a6a669d9ae408cb46012ff17bd33d855529d20f3a7e563d0d913358836') + + def configure_args(self): + if platform.machine() == 'aarch64': + config_args = [ + '--build=aarch64-unknown-linux-gnu', + ] + return config_args From 3e9af610e7d51396dad54ec77faf90943b4a7473 Mon Sep 17 00:00:00 2001 From: Servesh Date: Wed, 22 Apr 2020 04:43:02 -0500 Subject: [PATCH 045/802] source-highlight: fix detection of boost (#16102) Co-Authored-By: Massimiliano Culpo --- var/spack/repos/builtin/packages/source-highlight/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/source-highlight/package.py b/var/spack/repos/builtin/packages/source-highlight/package.py index eee706518a6..67d3b368817 100644 --- a/var/spack/repos/builtin/packages/source-highlight/package.py +++ b/var/spack/repos/builtin/packages/source-highlight/package.py @@ -19,3 +19,7 @@ class SourceHighlight(AutotoolsPackage, GNUMirrorPackage): version('3.1.8', sha256='01336a7ea1d1ccc374201f7b81ffa94d0aecb33afc7d6903ebf9fbf33a55ada3') depends_on('boost') + + def configure_args(self): + args = ["--with-boost={0}".format(self.spec['boost'].prefix)] + return args From 0b753b9a7713d16bb905331dd18434dd4a29261b Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Wed, 22 Apr 2020 01:50:36 -0800 Subject: [PATCH 046/802] py-pyproj: added v2.6.0 (#16176) Co-authored-by: Elizabeth Fischer --- var/spack/repos/builtin/packages/py-pyproj/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-pyproj/package.py b/var/spack/repos/builtin/packages/py-pyproj/package.py index 3341359a9ad..dfc0edf9246 100644 --- a/var/spack/repos/builtin/packages/py-pyproj/package.py +++ b/var/spack/repos/builtin/packages/py-pyproj/package.py @@ -16,6 +16,7 @@ class PyPyproj(PythonPackage): maintainers = ['citibeth', 'adamjstewart'] import_modules = ['pyproj'] + version('2.6.0', sha256='977542d2f8cf2981cf3ad72cedfebcd6ac56977c7aa830d9b49fa7888b56e83d') version('2.2.0', sha256='0a4f793cc93539c2292638c498e24422a2ec4b25cb47545addea07724b2a56e5') version('2.1.3', sha256='99c52788b01a7bb9a88024bf4d40965c0a66a93d654600b5deacf644775f424d') version('1.9.6', sha256='e0c02b1554b20c710d16d673817b2a89ff94738b0b537aead8ecb2edc4c4487b') @@ -23,8 +24,10 @@ class PyPyproj(PythonPackage): depends_on('python@:2', when='@:1.9.5.1') depends_on('python@3:', when='@2.3:') + depends_on('python@3.5:', when='@2.6.0:') depends_on('py-setuptools', type='build') depends_on('py-cython', type='build') + depends_on('py-cython@0.28:', when='@2.6.0:') depends_on('py-aenum', type=('build', 'run'), when='@2.2:^python@:3.5') depends_on('proj') depends_on('proj@:5', when='@:1') From b065150354ee708c202b952cd3f3712a98ea3529 Mon Sep 17 00:00:00 2001 From: Jeffrey Salmond Date: Wed, 22 Apr 2020 11:18:38 +0100 Subject: [PATCH 047/802] metis: fix build when version > 5.0 (#16186) --- var/spack/repos/builtin/packages/metis/package.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 12d1223a727..524561310b9 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -171,11 +171,10 @@ def install(self, spec, prefix): @when('@5:') def install(self, spec, prefix): source_directory = self.stage.source_path - build_directory = join_path(source_directory, 'build') + build_directory = join_path(self.stage.path, 'build') - options = std_cmake_args[:] + options = CMakePackage._std_args(self) options.append('-DGKLIB_PATH:PATH=%s/GKlib' % source_directory) - options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) # Normally this is available via the 'CMakePackage' object, but metis # IS-A 'Package' (not a 'CMakePackage') to support non-cmake metis@:5. From be0aed9d8acc1948c3eb43a0b4abcd9ab8f142b2 Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 22 Apr 2020 19:19:01 +0800 Subject: [PATCH 048/802] libcgroup: added package at v0.41 (#16229) --- .../builtin/packages/libcgroup/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libcgroup/package.py diff --git a/var/spack/repos/builtin/packages/libcgroup/package.py b/var/spack/repos/builtin/packages/libcgroup/package.py new file mode 100644 index 00000000000..797e10d7a43 --- /dev/null +++ b/var/spack/repos/builtin/packages/libcgroup/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Libcgroup(AutotoolsPackage): + """Library of control groups.""" + + homepage = "https://sourceforge.net/projects/libcg/" + url = "https://sourceforge.net/projects/libcg/files/libcgroup/v0.41/libcgroup-0.41.tar.bz2" + + version('0.41', sha256='e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51') + version('0.37', sha256='15c8f3febb546530d3495af4e4904b3189c273277ca2d8553dec882cde1cd0f6') + version('0.36', sha256='8dcd2ae220435b3de736d3efb0023fdf1192d7a7f4032b439f3cf5342cff7b4c') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('bison', type='build') + depends_on('flex', type='build') + depends_on('linux-pam') From 9c2819bdb3f96c2632c45e4a7dcf3a410c04f73c Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 22 Apr 2020 06:53:01 -0600 Subject: [PATCH 049/802] libsm: added libuuid as dependency (#16226) While building _visit_, I ran into an undefined symbol at link time. I tracked the missing dependency to _libsm_ needing to know about _libuuid_ at link time. --- var/spack/repos/builtin/packages/libsm/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libsm/package.py b/var/spack/repos/builtin/packages/libsm/package.py index cabd2aae3d5..269f2ededbf 100644 --- a/var/spack/repos/builtin/packages/libsm/package.py +++ b/var/spack/repos/builtin/packages/libsm/package.py @@ -20,3 +20,4 @@ class Libsm(AutotoolsPackage, XorgPackage): depends_on('xtrans', type='build') depends_on('pkgconfig', type='build') depends_on('util-macros', type='build') + depends_on('libuuid') From 0419f2c6dff724fd95507160719e8df674baf4b8 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Wed, 22 Apr 2020 07:29:40 -0700 Subject: [PATCH 050/802] Updated 'qt' to support '@5.12.7', '+debug', and '+opengl' with older OpenGL versions. (#16220) --- var/spack/repos/builtin/packages/qt/package.py | 9 +++++++-- .../builtin/packages/qt/qt5-12-configure.patch | 13 +++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/qt/qt5-12-configure.patch diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 408ebc9f591..08721e85c24 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -28,6 +28,7 @@ class Qt(Package): version('5.14.1', sha256='6f17f488f512b39c2feb57d83a5e0a13dcef32999bea2e2a8f832f54a29badb8') version('5.14.0', sha256='be9a77cd4e1f9d70b58621d0753be19ea498e6b0da0398753e5038426f76a8ba') version('5.13.1', sha256='adf00266dc38352a166a9739f1a24a1e36f1be9c04bf72e16e142a256436974e') + version('5.12.7', sha256='873783a0302129d98a8f63de9afe4520fb5f8d5316be8ad7b760c59875cd8a8d') version('5.12.5', sha256='a2299e21db7767caf98242767bffb18a2a88a42fee2d6a393bedd234f8c91298') version('5.12.2', sha256='59b8cb4e728450b21224dcaaa40eb25bafc5196b6988f2225c394c6b7f881ff5') version('5.11.3', sha256='859417642713cee2493ee3646a7fee782c9f1db39e41d7bb1322bba0c5f0ff4d') @@ -48,6 +49,8 @@ class Qt(Package): version('4.8.5', sha256='eb728f8268831dc4373be6403b7dd5d5dde03c169ad6882f9a8cb560df6aa138') version('3.3.8b', sha256='1b7a1ff62ec5a9cb7a388e2ba28fda6f960b27f27999482ebeceeadb72ac9f6e') + variant('debug', default=False, + description="Build debug version.") variant('gtk', default=False, description="Build with gtkplus.") variant('webkit', default=False, @@ -111,6 +114,8 @@ class Qt(Package): # https://github.com/spack/spack/issues/14400 patch('qt5-11-intel-overflow.patch', when='@5.11 %intel') patch('qt5-12-intel-overflow.patch', when='@5.12:5.14.0 %intel') + # https://bugreports.qt.io/browse/QTBUG-78937 + patch('qt5-12-configure.patch', when='@5.12') # Build-only dependencies depends_on("pkgconfig", type='build') @@ -140,7 +145,7 @@ class Qt(Package): depends_on("glib", when='@4:') depends_on("libpng", when='@4:') depends_on("dbus", when='@4:+dbus') - depends_on("gl@3.2:", when='@4:+opengl') + depends_on("gl", when='@4:+opengl') depends_on("harfbuzz", when='@5:') depends_on("double-conversion", when='@5.7:') @@ -358,7 +363,7 @@ def common_config_args(self): '-v', '-opensource', '-{0}opengl'.format('' if '+opengl' in self.spec else 'no-'), - '-release', + '-{0}'.format('debug' if '+debug' in self.spec else 'release'), '-confirm-license', '-optimized-qmake', '-no-pch', diff --git a/var/spack/repos/builtin/packages/qt/qt5-12-configure.patch b/var/spack/repos/builtin/packages/qt/qt5-12-configure.patch new file mode 100644 index 00000000000..42681a16255 --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/qt5-12-configure.patch @@ -0,0 +1,13 @@ +diff --git a/qtbase/src/corelib/tools/qsimd_p.h b/qtbase/src/corelib/tools/qsimd_p.h +index 2130a1f..3a14715 100644 +--- a/qtbase/src/corelib/tools/qsimd_p.h ++++ b/qtbase/src/corelib/tools/qsimd_p.h +@@ -346,7 +346,7 @@ extern Q_CORE_EXPORT QBasicAtomicInteger qt_cpu_features[2]; + #endif + Q_CORE_EXPORT void qDetectCpuFeatures(); + +-#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND) ++#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND) && !defined(QT_BOOTSTRAPPED) + Q_CORE_EXPORT qsizetype qRandomCpu(void *, qsizetype) Q_DECL_NOTHROW; + #else + static inline qsizetype qRandomCpu(void *, qsizetype) Q_DECL_NOTHROW From d65b809f9b3239ad1c1c402530fd929785ee3d02 Mon Sep 17 00:00:00 2001 From: asmaahassan90 <31959389+asmaahassan90@users.noreply.github.com> Date: Wed, 22 Apr 2020 16:44:03 +0200 Subject: [PATCH 051/802] Add new versions to Avizo (#16204) * Add new versions add versions 2019.3 and 2019.4 and adjust the install stage accordingly * one small fix * fix lint * re-ordering the versions --- .../repos/builtin/packages/avizo/package.py | 38 +++++++++++++++---- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/avizo/package.py b/var/spack/repos/builtin/packages/avizo/package.py index cf14c76d22d..352af737632 100644 --- a/var/spack/repos/builtin/packages/avizo/package.py +++ b/var/spack/repos/builtin/packages/avizo/package.py @@ -17,12 +17,31 @@ class Avizo(Package): interface.""" homepage = "https://www.thermofisher.com/sa/en/home/industrial/electron-microscopy/electron-microscopy-instruments-workflow-solutions/3d-visualization-analysis-software.html" - version('9.7.0', '9c9b9e81957387f4218df0c5adbb80717e9ae80ab3ca6ff8da523f7f499dcc5b', + + version('2019.4', + sha256='a637720535bcbe254ab56368004a9544c64ec36186373fa24f26cee279685248', + url="file://{0}/Avizo-20194-Linux64-gcc48.bin".format(os.getcwd()), + expand=False) + version('2019.3', + sha256='be109df81e2f7238f234862367841dae05e76cc62218c1f36b1d9bc9514ce5f7', + url="file://{0}/Avizo-20193-Linux64-gcc48.bin".format(os.getcwd()), + expand=False) + version('9.7.0', + sha256='9c9b9e81957387f4218df0c5adbb80717e9ae80ab3ca6ff8da523f7f499dcc5b', + url="file://{0}/Avizo-970-Linux64-gcc44.bin".format(os.getcwd()), expand=False) - def url_for_version(self, version): - return "file://{0}/Avizo-{1}-Linux64-gcc44.bin".format(os.getcwd(), - version.joined) + gcc_ver = { + "9.7.0": "44", + "2019.3": "48", + "2019.4": "48" + } + + install_dir = { + "9.7.0": 'Avizo-9.7.0', + "2019.3": join_path('..', 'Avizo'), + "2019.4": join_path('..', 'Avizo') + } # Licensing license_required = True @@ -37,14 +56,17 @@ def setup_run_environment(self, env): def install(self, spec, prefix): ver = self.version.joined sh = which('sh') - sh('Avizo-{0}-Linux64-gcc44.bin'.format(ver), '--noexec', '--keep') + sh('Avizo-{0}-Linux64-gcc{1}.bin' + .format(ver, self.gcc_ver[self.version.string]), + '--noexec', '--keep') with working_dir('Avizo'): - avizo_tar = tarfile.open(name='Avizo-{0}-Linux64-gcc44.tar.bz2' - .format(self.version)) + avizo_tar = tarfile.open(name='Avizo-{0}-Linux64-gcc{1}.tar.bz2' + .format(self.version, self.gcc_ver + [self.version.string])) avizo_tar.extractall() - with working_dir('Avizo-{0}'.format(self.version)): + with working_dir(self.install_dir[self.version.string]): install_tree('bin', prefix.bin) install_tree('lib', prefix.lib) install_tree('data', prefix.data) From 2a5592f4196b61c043f61f26031de1c302f1affe Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 22 Apr 2020 22:47:45 +0800 Subject: [PATCH 052/802] Add new package: py-pid (#16202) * Add new package: py-pid * fix depends_on --- .../repos/builtin/packages/py-pid/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pid/package.py diff --git a/var/spack/repos/builtin/packages/py-pid/package.py b/var/spack/repos/builtin/packages/py-pid/package.py new file mode 100644 index 00000000000..b9b20428a9a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pid/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPid(PythonPackage): + """Pidfile featuring stale detection and file-locking, can also be + used as context-manager or decorator.""" + + homepage = "https://pypi.org/project/pid/" + url = "https://github.com/trbs/pid/archive/3.0.3.tar.gz" + + version('3.0.3', sha256='082281e2f6b99b4aaa02a24ae4796c604ac17f19cdd0327b8c1ba9c2e73aadc8') + version('3.0.2', sha256='0be7dc260e35788163b3171a5f0e1a8b9888bc2b77232c053c042a65496b8396') + version('3.0.1', sha256='2f51b61210f8e1f009b09a2034717003ca22dcd86995537ecb857863bddca89a') + version('3.0.0', sha256='3d251eadedc6fbd1fe4b43d521e76b83afd244b8b1951a2cd96864406bc96381') + version('2.2.5', sha256='d4c68554bf4b2fc7d0b50749f535f5c1fceb74ff025ce1a3f06745d15c595d40') + version('2.2.4', sha256='de3cc35e18c5409d8424813ab422b637af4d25bfdcf2c15ee6c5af447778de22') + version('2.2.3', sha256='14555fc214e0dfee7d94598b759523349832597e163415d1a7b0d87d9902cc47') + version('2.2.2', sha256='716bb5803fed50facdb62be0e48d08dd95e7392fcfb03f5540915623f9c4ee44') + version('2.2.1', sha256='2c5b398d348b8b1901ccb29b5c914c583187692acfbc3c28fc4ee483b9909357') + version('2.2.0', sha256='f2c3beb5742159794379b73088eb3f592a4b7b93bfef95f8bbc27ab98e5394ed') + + depends_on('py-setuptools', type='build') From 5f285fdd053b14b6a05ea1a48add80fa79b4cefb Mon Sep 17 00:00:00 2001 From: Sajid Ali <30510036+s-sajid-ali@users.noreply.github.com> Date: Wed, 22 Apr 2020 09:49:07 -0500 Subject: [PATCH 053/802] fix code-signing on macOS (#15592) * rebase * move if statement location * remove whitespace * spec to self.spec * switch statements as per review * fix erronous indent * add missing cmake arg * minor placement fix for cmake args * edit comment * fix erronous return * clarify conflicts with messages * remove duplicate comment * simplify logic * macos wasn't a variant, fix that * remove extra blank line * address reviewer comments on spaces --- .../repos/builtin/packages/llvm/package.py | 67 ++++++++++++------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index f56a68403b9..bf8a77933c1 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -119,6 +119,8 @@ class Llvm(CMakePackage, CudaPackage): default=False, description="Build with OpenMP capable thread sanitizer", ) + variant('code_signing', default=False, + description="Enable code-signing on macOS") variant("python", default=False, description="Install python bindings") extends("python", when="+python") @@ -176,6 +178,20 @@ class Llvm(CMakePackage, CudaPackage): # MLIR exists in > 10.x conflicts("+mlir", when="@:9") + # code signing is only necessary on macOS", + conflicts('+code_signing', when='platform=linux') + conflicts('+code_signing', when='platform=bgq') + conflicts('+code_signing', when='platform=cray') + + conflicts( + '+code_signing', + when='~lldb platform=darwin', + msg="code signing is only necessary for building the " + "in-tree debug server on macOS. Turning this variant " + "off enables a build of llvm with lldb that uses the " + "system debug server", + ) + # Github issue #4986 patch("llvm_gcc7.patch", when="@4.0.0:4.0.1+lldb %gcc@7.0:") # Backport from llvm master + additional fix @@ -192,31 +208,31 @@ class Llvm(CMakePackage, CudaPackage): # https://bugs.llvm.org/show_bug.cgi?id=39696 patch("thread-p9.patch", when="@develop+libcxx") - @run_before("cmake") - def check_darwin_lldb_codesign_requirement(self): - if not self.spec.satisfies("+lldb platform=darwin"): - return - codesign = which("codesign") - mkdir("tmp") - llvm_check_file = join_path("tmp", "llvm_check") - copy("/usr/bin/false", llvm_check_file) - - try: - codesign("-f", "-s", "lldb_codesign", "--dryrun", llvm_check_file) - - except ProcessError: - # Newer LLVM versions have a simple script that sets up - # automatically - setup = Executable("./lldb/scripts/macos-setup-codesign.sh") + @run_before('cmake') + def codesign_check(self): + if self.spec.satisfies("+code_signing"): + codesign = which('codesign') + mkdir('tmp') + llvm_check_file = join_path('tmp', 'llvm_check') + copy('/usr/bin/false', llvm_check_file) try: - setup() - except Exception: - raise RuntimeError( - 'The "lldb_codesign" identity must be available to build ' - "LLVM with LLDB. See https://lldb.llvm.org/resources/" - "build.html#code-signing-on-macos for details on how to " - "create this identity." - ) + codesign('-f', '-s', 'lldb_codesign', '--dryrun', + llvm_check_file) + + except ProcessError: + # Newer LLVM versions have a simple script that sets up + # automatically when run with sudo priviliges + setup = Executable("./lldb/scripts/macos-setup-codesign.sh") + try: + setup() + except Exception: + raise RuntimeError( + 'spack was unable to either find or set up' + 'code-signing on your system. Please refer to' + 'https://lldb.llvm.org/resources/build.html#' + 'code-signing-on-macos for details on how to' + 'create this identity.' + ) def setup_build_environment(self, env): env.append_flags("CXXFLAGS", self.compiler.cxx11_flag) @@ -355,6 +371,9 @@ def cmake_args(self): ): cmake_args.append("-DCMAKE_BUILD_WITH_INSTALL_RPATH=1") + if self.spec.satisfies("~code_signing platform=darwin"): + cmake_args.append('-DLLDB_USE_SYSTEM_DEBUGSERVER=ON') + # Semicolon seperated list of projects to enable cmake_args.append( "-DLLVM_ENABLE_PROJECTS:STRING={0}".format(";".join(projects)) From e7906d650787ce785d1d49875f746647547227f2 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Wed, 22 Apr 2020 12:11:55 -0400 Subject: [PATCH 054/802] kokkos: generate_makefile calls cmake (#16237) --- var/spack/repos/builtin/packages/kokkos/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index 4b8e02e4955..82b93893e60 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -142,6 +142,9 @@ class Kokkos(Package): depends_on('qthreads', when='+qthreads') depends_on('cuda', when='+cuda') + # generate_makefile.bash calls cmake + depends_on('cmake@3.10:', type='build') + def install(self, spec, prefix): generate = which(join_path(self.stage.source_path, 'generate_makefile.bash')) From d77576d85daba7e456e919ad28edd4593078f4ce Mon Sep 17 00:00:00 2001 From: Rao Garimella Date: Wed, 22 Apr 2020 10:12:28 -0600 Subject: [PATCH 055/802] update Jali version and dependent MSTK version (#16236) Co-authored-by: Rao Garimella --- var/spack/repos/builtin/packages/jali/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/jali/package.py b/var/spack/repos/builtin/packages/jali/package.py index cc2e025c889..e75dc7fb92f 100644 --- a/var/spack/repos/builtin/packages/jali/package.py +++ b/var/spack/repos/builtin/packages/jali/package.py @@ -13,11 +13,12 @@ class Jali(CMakePackage): homepage = "https://github.com/lanl/jali" git = "https://github.com/lanl/jali" - url = "https://github.com/lanl/jali/archive/1.1.1.tar.gz" + url = "https://github.com/lanl/jali/archive/1.1.4.tar.gz" maintainers = ['raovgarimella'] version('master', branch='master') + version('1.1.4', sha256='135ab02be1487fcdfb039613cbed630bce336d581a66468c66209db0a9d8a104') version('1.1.1', sha256='c96c000b3893ea7f15bbc886524476dd466ae145e77deedc27e412fcc3541207') version('1.1.0', sha256='783dfcd6a9284af83bb380ed257fa8b0757dc2f7f9196d935eb974fb6523c644') version('1.0.5', sha256='979170615d33a7bf20c96bd4d0285e05a2bbd901164e377a8bccbd9af9463801') @@ -31,7 +32,7 @@ class Jali(CMakePackage): depends_on('boost') - depends_on('mstk@3.3.0: +exodusii+parallel~use_markers partitioner=all', when='+mstk') + depends_on('mstk@3.3.5: +exodusii+parallel~use_markers partitioner=all', when='+mstk') depends_on('zoltan -fortran') depends_on('metis') From 769f350802b78ffa9c74bc5b9a1e912b64ab718d Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 23 Apr 2020 00:16:49 +0800 Subject: [PATCH 056/802] Add new package: py-asgiref (#16233) --- .../builtin/packages/py-asgiref/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-asgiref/package.py diff --git a/var/spack/repos/builtin/packages/py-asgiref/package.py b/var/spack/repos/builtin/packages/py-asgiref/package.py new file mode 100644 index 00000000000..6819d27aa92 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-asgiref/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyAsgiref(PythonPackage): + """ASGI specification and utilities.""" + + homepage = "https://asgi.readthedocs.io/en/latest/" + url = "https://github.com/django/asgiref/archive/3.2.7.tar.gz" + + version('3.2.7', sha256='8a0b556b9e936418475f6670d59e14592c41d15d00b5ea4ad26f2b46f9f4fb9a') + version('3.2.6', sha256='29788163bdad8d494475a0137eba39b111fd86fbe825534a9376f9f2ab44251a') + version('3.2.5', sha256='eeb01ba02e86859746ee2a7bc8a75c484a006dc9575723563f24642a12b2bba8') + version('3.2.4', sha256='89e47532340338b7eafd717ab28658e8b48f4565d8384628c88d2d41565c8da0') + version('3.2.3', sha256='d38e16141c7189e23bfe03342d9cd3dbfd6baab99217892bfa7bc5646315b6bd') + version('3.2.2', sha256='47edf327aa70f317c9bc810d469ce681f1b35a7f499f68cf2b5da3ba6a651e69') + version('3.2.1', sha256='06a21df1f4456d29079f3c475c09ac31167bcc5f024c637dedf4e00d2dd9020b') + version('3.2.0', sha256='5db8c7a6c1ff54ea04a52f994d8af959427f1cab8e427aa802492a89fb0b635a') + version('3.1.4', sha256='bf01c52111ef7af2adc1e6d90282d2a32c5ebe09e84ae448389ceff7cef53fa9') + version('3.1.3', sha256='5b8bb7b3719b8c12a6c2363784a4d8c0eb5e980d8b4fdb6f38eccb52071dfab5') + + depends_on('python@3.5:', type=('build', 'run')) + depends_on('py-setuptools', type='build') From 169b9bebd88b16ab4374271d12ace035417a8811 Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 23 Apr 2020 00:17:30 +0800 Subject: [PATCH 057/802] Add new package: kea (#16232) --- .../repos/builtin/packages/kea/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/kea/package.py diff --git a/var/spack/repos/builtin/packages/kea/package.py b/var/spack/repos/builtin/packages/kea/package.py new file mode 100644 index 00000000000..acb6516f397 --- /dev/null +++ b/var/spack/repos/builtin/packages/kea/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Kea(AutotoolsPackage): + """Modern, open source DHCPv4 & DHCPv6 server.""" + + homepage = "https://www.isc.org/kea/" + url = "https://downloads.isc.org/isc/kea/1.6.2/kea-1.6.2.tar.gz" + + version('1.6.2', sha256='2af7336027143c3e98d8d1d44165b2c2cbb0252a92bd88f6dd4d2c6adb69d7b5') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('log4cplus') + depends_on('boost') From b874b3e1fe90d48bdcb0058b35082114a81b9e21 Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 23 Apr 2020 00:23:40 +0800 Subject: [PATCH 058/802] Add new package: isc-dhcp (#16230) --- .../builtin/packages/isc-dhcp/package.py | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 var/spack/repos/builtin/packages/isc-dhcp/package.py diff --git a/var/spack/repos/builtin/packages/isc-dhcp/package.py b/var/spack/repos/builtin/packages/isc-dhcp/package.py new file mode 100644 index 00000000000..9a5ab764556 --- /dev/null +++ b/var/spack/repos/builtin/packages/isc-dhcp/package.py @@ -0,0 +1,32 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class IscDhcp(AutotoolsPackage): + """ISC DHCP offers a complete open source solution for + implementing DHCP servers, relay agents, and clients. ISC + DHCP supports both IPv4 and IPv6, and is suitable for use + in high-volume and high-reliability applications.""" + + homepage = "https://www.isc.org/dhcp/" + url = "https://downloads.isc.org/isc/dhcp/4.4.2/dhcp-4.4.2.tar.gz" + list_url = "https://downloads.isc.org/isc/dhcp" + list_depth = 1 + + parallel = False + + version('4.4.2', sha256='1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521') + version('4.4.1', sha256='2a22508922ab367b4af4664a0472dc220cc9603482cf3c16d9aff14f3a76b608') + version('4.4.0', sha256='4a90be0f22ad81c987f5584661b60a594f1b21c581b82bfba3ae60f89ae44397') + version('4.3.6', sha256='a41eaf6364f1377fe065d35671d9cf82bbbc8f21207819b2b9f33f652aec6f1b') + version('4.3.5', sha256='eb95936bf15d2393c55dd505bc527d1d4408289cec5a9fa8abb99f7577e7f954') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('bind9', type='build') From 63ff1219807242bbb4bea5767fb2d5fd6c632331 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Wed, 22 Apr 2020 13:04:17 -0700 Subject: [PATCH 059/802] spack environments documentation: -E -> -e (#16242) To specify an environment for a comment, the user can specify "spack -e ". The documentation incorrectly specified "-E" (which is actually used to ignore any implicit use of environments). --- lib/spack/docs/environments.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst index a51c3012fd7..c26f81d9142 100644 --- a/lib/spack/docs/environments.rst +++ b/lib/spack/docs/environments.rst @@ -281,7 +281,7 @@ in the lockfile, nor does it install the spec. The ``spack add`` command is environment aware. It adds to the currently active environment. All environment aware commands can also -be called using the ``spack -E`` flag to specify the environment. +be called using the ``spack -e`` flag to specify the environment. .. code-block:: console @@ -292,7 +292,7 @@ or .. code-block:: console - $ spack -E myenv add python + $ spack -e myenv add python .. _environments_concretization: From 0d2ebbf996d0ad3fa049b8f50304cd51b8c40467 Mon Sep 17 00:00:00 2001 From: Tim Haines Date: Wed, 22 Apr 2020 15:34:32 -0500 Subject: [PATCH 060/802] hwloc: Add netloc variant (#16001) hwloc depends on MPI when netloc is enabled. Note that OpenMPI depends on netloc, so hwloc cannot use OpenMPI as the MPI provider when netloc is enabled (this would result in a cyclic dependency). --- var/spack/repos/builtin/packages/hwloc/package.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index 2b7968a37a5..547327e60ba 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -57,6 +57,14 @@ class Hwloc(AutotoolsPackage): default=False, description='Enable the Cairo back-end of hwloc\'s lstopo command' ) + variant( + 'netloc', + default=False, + description="Enable netloc [requires MPI]" + ) + + # netloc isn't available until version 2.0.0 + conflicts('+netloc', when="@:1.99.99") depends_on('pkgconfig', type='build') depends_on('m4', type='build', when='@master') @@ -71,6 +79,10 @@ class Hwloc(AutotoolsPackage): depends_on('cairo', when='+cairo') depends_on('numactl', when='@:1.11.11 platform=linux') + # When mpi=openmpi, this introduces an unresolvable dependency. + # See https://github.com/spack/spack/issues/15836 for details + depends_on('mpi', when='+netloc') + def url_for_version(self, version): return "http://www.open-mpi.org/software/hwloc/v%s/downloads/hwloc-%s.tar.gz" % (version.up_to(2), version) @@ -81,7 +93,7 @@ def configure_args(self): # (Alternatively, we could require OpenCL as dependency.) "--disable-opencl", ] - if '@2.0.0:' in self.spec: + if '+netloc' in self.spec: args.append('--enable-netloc') args.extend(self.enable_or_disable('cairo')) From 46e90692e829457b133521f7dc5c6d7c1f7502da Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 22 Apr 2020 15:47:14 -0500 Subject: [PATCH 061/802] PyTorch: add conflict for Apple Clang 11.0.3 (#16238) * PyTorch: add conflict for Apple Clang 11.0.3 * Flake8 fix --- var/spack/repos/builtin/packages/py-torch/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 6428d6cb8e5..f786ad14bc5 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -52,7 +52,6 @@ class PyTorch(PythonPackage, CudaPackage): version('master', branch='master', submodules=True) version('1.5.0', tag='v1.5.0', submodules=True) version('1.4.1', tag='v1.4.1', submodules=True) - # see https://github.com/pytorch/pytorch/issues/35149 version('1.4.0', tag='v1.4.0', submodules=True, submodules_delete=['third_party/fbgemm']) version('1.3.1', tag='v1.3.1', submodules=True) @@ -104,8 +103,11 @@ class PyTorch(PythonPackage, CudaPackage): conflicts('+redis', when='@:1.0') conflicts('+zstd', when='@:1.0') conflicts('+tbb', when='@:1.1') - # see https://github.com/pytorch/pytorch/issues/35149 + # https://github.com/pytorch/pytorch/issues/35149 conflicts('+fbgemm', when='@1.4.0') + # https://github.com/pytorch/pytorch/issues/35478 + conflicts('%clang@11.0.3-apple', + msg='Apple Clang 11.0.3 segfaults at build-time') conflicts('cuda_arch=none', when='+cuda', msg='Must specify CUDA compute capabilities of your GPU, see ' From ec23e4ffe5af7f59c1cb7ad3c5485e83379f5a23 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Wed, 22 Apr 2020 14:26:29 -0700 Subject: [PATCH 062/802] update compiler config with bootstrapped compiler when already installed (#16221) Update compiler config with bootstrapped compiler when it was already installed and added config defaults to code so mutable_config test fixture works. --- lib/spack/spack/build_environment.py | 2 +- lib/spack/spack/cmd/common/arguments.py | 2 +- lib/spack/spack/fetch_strategy.py | 2 +- lib/spack/spack/installer.py | 6 ++++ lib/spack/spack/test/cmd/install.py | 30 ++++++++++++++++++- .../builtin.mock/packages/gcc/package.py | 23 ++++++++++++++ 6 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 var/spack/repos/builtin.mock/packages/gcc/package.py diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 21ab6895ec1..5e6ea00ce62 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -415,7 +415,7 @@ def _set_variables_for_single_module(pkg, module): if getattr(module, marker, False): return - jobs = spack.config.get('config:build_jobs') if pkg.parallel else 1 + jobs = spack.config.get('config:build_jobs', 16) if pkg.parallel else 1 jobs = min(jobs, multiprocessing.cpu_count()) assert jobs is not None, "no default set for config:build_jobs" diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py index b93f265c7ab..e5945bda9c3 100644 --- a/lib/spack/spack/cmd/common/arguments.py +++ b/lib/spack/spack/cmd/common/arguments.py @@ -111,7 +111,7 @@ def __call__(self, parser, namespace, jobs, option_string): def default(self): # This default is coded as a property so that look-up # of this value is done only on demand - return min(spack.config.get('config:build_jobs'), + return min(spack.config.get('config:build_jobs', 16), multiprocessing.cpu_count()) @default.setter diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index d7613ae58af..c6200565e5b 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -336,7 +336,7 @@ def _fetch_from_url(self, url): else: curl_args.append('-sS') # just errors when not. - connect_timeout = spack.config.get('config:connect_timeout') + connect_timeout = spack.config.get('config:connect_timeout', 10) if self.extra_options: cookie = self.extra_options.get('cookie') diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index 213a85f0dc7..2bad1e88183 100644 --- a/lib/spack/spack/installer.py +++ b/lib/spack/spack/installer.py @@ -1466,6 +1466,12 @@ def install(self, **kwargs): if lock is not None: self._update_installed(task) _print_installed_pkg(pkg.prefix) + + # It's an already installed compiler, add it to the config + if task.compiler: + spack.compilers.add_compilers_to_config( + spack.compilers.find_compilers([pkg.spec.prefix])) + else: # At this point we've failed to get a write or a read # lock, which means another process has taken a write diff --git a/lib/spack/spack/test/cmd/install.py b/lib/spack/spack/test/cmd/install.py index 1d4a0c68273..dd52cea406f 100644 --- a/lib/spack/spack/test/cmd/install.py +++ b/lib/spack/spack/test/cmd/install.py @@ -15,11 +15,12 @@ import llnl.util.filesystem as fs import spack.config +import spack.compilers as compilers import spack.hash_types as ht import spack.package import spack.cmd.install from spack.error import SpackError -from spack.spec import Spec +from spack.spec import Spec, CompilerSpec from spack.main import SpackCommand import spack.environment as ev @@ -718,3 +719,30 @@ def test_cdash_auth_token(tmpdir, install_mockery, capfd): '--log-format=cdash', 'a') assert 'Using CDash auth token from environment' in out + + +def test_compiler_bootstrap( + install_mockery, mock_packages, mock_fetch, mock_archive, + mutable_config, monkeypatch): + monkeypatch.setattr(spack.concretize.Concretizer, + 'check_for_compiler_existence', False) + spack.config.set('config:install_missing_compilers', True) + assert CompilerSpec('gcc@2.0') not in compilers.all_compiler_specs() + + # Test succeeds if it does not raise an error + install('a%gcc@2.0') + + +@pytest.mark.regression('16221') +def test_compiler_bootstrap_already_installed( + install_mockery, mock_packages, mock_fetch, mock_archive, + mutable_config, monkeypatch): + monkeypatch.setattr(spack.concretize.Concretizer, + 'check_for_compiler_existence', False) + spack.config.set('config:install_missing_compilers', True) + + assert CompilerSpec('gcc@2.0') not in compilers.all_compiler_specs() + + # Test succeeds if it does not raise an error + install('gcc@2.0') + install('a%gcc@2.0') diff --git a/var/spack/repos/builtin.mock/packages/gcc/package.py b/var/spack/repos/builtin.mock/packages/gcc/package.py new file mode 100644 index 00000000000..03b45a6e12c --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/gcc/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Gcc(Package): + """Simple compiler package.""" + + homepage = "http://www.example.com" + url = "http://www.example.com/gcc-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + version('2.0', '2.0_a_hash') + + def install(self, spec, prefix): + # Create the minimal compiler that will fool `spack compiler find` + mkdirp(prefix.bin) + with open(prefix.bin.gcc, 'w') as f: + f.write('#!/bin/bash\necho "%s"' % str(spec.version)) + set_executable(prefix.bin.gcc) From 650745746af7c7e2160c6552926d301453e1e8e0 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 22 Apr 2020 15:34:58 -0600 Subject: [PATCH 063/802] Provide new version 0.6.10. (#16240) --- var/spack/repos/builtin/packages/py-cmake-format/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-cmake-format/package.py b/var/spack/repos/builtin/packages/py-cmake-format/package.py index a8f6f862298..b300b97379f 100644 --- a/var/spack/repos/builtin/packages/py-cmake-format/package.py +++ b/var/spack/repos/builtin/packages/py-cmake-format/package.py @@ -14,6 +14,7 @@ class PyCmakeFormat(PythonPackage): homepage = "https://pypi.python.org/pypi/cmake-format" url = "https://pypi.io/packages/source/c/cmake_format/cmake_format-0.6.9.tar.gz" + version('0.6.10', sha256='82f0ef16236225cb43f45bfb6983ef7f6f72634727a1a6c26290402527bdd793') version('0.6.9', sha256='b2f8bf2e9c6651126f2f2954b7803222b0faf6b8649eabc4d965ea97483a4d20') depends_on('py-setuptools', type=('build', 'run')) From ec54f86c0b4be3aa6b6d4c95ccf6e0da39c6c668 Mon Sep 17 00:00:00 2001 From: "Mark W. Krentel" Date: Wed, 22 Apr 2020 16:48:41 -0500 Subject: [PATCH 064/802] gotcha: add version 1.0.3 (#16239) --- var/spack/repos/builtin/packages/gotcha/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gotcha/package.py b/var/spack/repos/builtin/packages/gotcha/package.py index 006b74a49af..f0cb3a7233d 100644 --- a/var/spack/repos/builtin/packages/gotcha/package.py +++ b/var/spack/repos/builtin/packages/gotcha/package.py @@ -15,6 +15,7 @@ class Gotcha(CMakePackage): version('develop', branch='develop') version('master', branch='master') + version('1.0.3', tag='1.0.3') version('1.0.2', tag='1.0.2') version('0.0.2', tag='0.0.2') From 4166c97a8263f0314836963a049b8adf3fdf2c05 Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Wed, 22 Apr 2020 19:54:55 -0400 Subject: [PATCH 065/802] vtk-m: update Vtk-m pkg to its latest version v1.5.1 (#16192) Last month VTK-m releases its lastest version named `v1.5.1`. This new release only contains bugfixes related to compiler error / warnings. - Depends on CMake >= 3.12 - Set VTKm_NO_ASSERT=ON by default - add maintainers Signed-off-by: Vicente Adolfo Bolea Sanchez --- var/spack/repos/builtin/packages/vtk-m/package.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/vtk-m/package.py b/var/spack/repos/builtin/packages/vtk-m/package.py index 0a22efb357b..5fd77da94dd 100644 --- a/var/spack/repos/builtin/packages/vtk-m/package.py +++ b/var/spack/repos/builtin/packages/vtk-m/package.py @@ -18,10 +18,13 @@ class VtkM(CMakePackage, CudaPackage): architectures.""" homepage = "https://m.vtk.org/" - url = "https://gitlab.kitware.com/vtk/vtk-m/-/archive/v1.5.0/vtk-m-v1.5.0.tar.gz" + maintainers = ['robertmaynard', 'kmorel', 'vicentebolea'] + + url = "https://gitlab.kitware.com/vtk/vtk-m/-/archive/v1.5.1/vtk-m-v1.5.1.tar.gz" git = "https://gitlab.kitware.com/vtk/vtk-m.git" version('master', branch='master') + version('1.5.1', sha256="64c19e66c0d579cfb21bb0df10d649b523b470b0c9a6c2ea5fd979dfeda2c25e") version('1.5.0', sha256="b1b13715c7fcc8d17f5c7166ff5b3e9025f6865dc33eb9b06a63471c21349aa8") version('1.4.0', sha256="8d83cca7cd5e204d10da151ce4f1846c1f7414c7c1e579173d15c5ea0631555a") version('1.3.0', sha256="f88c1b0a1980f695240eeed9bcccfa420cc089e631dc2917c9728a2eb906df2e") @@ -44,7 +47,7 @@ class VtkM(CMakePackage, CudaPackage): variant("64bitids", default=False, description="enable 64 bits ids") - depends_on("cmake") + depends_on("cmake@3.12:", type="build") # CMake >= 3.12 depends_on("tbb", when="+tbb") depends_on("cuda", when="+cuda") depends_on("mpi", when="+mpi") @@ -145,4 +148,8 @@ def cmake_args(self): print("64 bit ids enabled") else: options.append("-DVTKm_USE_64BIT_IDS:BOOL=OFF") + + if spec.variants["build_type"].value != 'Release': + options.append("-DVTKm_NO_ASSERT:BOOL=ON") + return options From d0bff870a6b3af5122c251d697c6d5a3f221d96c Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 22 Apr 2020 17:41:33 -0700 Subject: [PATCH 066/802] macOS+GCC: Conflicts CMake, libuv, CPython (#16249) The major building blocks in many software stacks: - CPython - CMake (libuv) do not build on macOS with GCC. The main problem is that some macOS framework includes pull in objective-c code and that code does get misinterpreted as (invalid) C by GCC by default. --- var/spack/repos/builtin/packages/cmake/package.py | 7 +++++++ var/spack/repos/builtin/packages/libuv/package.py | 6 ++++++ var/spack/repos/builtin/packages/python/package.py | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index ce436d2ea9f..cc69eac5f77 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -92,6 +92,13 @@ class Cmake(Package): variant('openssl', default=True, description="Enables CMake's OpenSSL features") variant('ncurses', default=True, description='Enables the build of the ncurses gui') + # Tries to build an Objective-C file from libuv with GCC's C frontend + # https://gitlab.kitware.com/cmake/cmake/-/issues/20620 + # https://github.com/libuv/libuv/issues/2805 + conflicts('%gcc platform=darwin', + msg='CMake does not compile with GCC on macOS yet, use clang. ' + 'See: https://gitlab.kitware.com/cmake/cmake/-/issues/20620') + # Really this should conflict since it's enabling or disabling openssl for # CMake's internal copy of curl. Ideally we'd want a way to have the # openssl variant disabled when ~ownlibs but there's not really a way to diff --git a/var/spack/repos/builtin/packages/libuv/package.py b/var/spack/repos/builtin/packages/libuv/package.py index 55d7dcebba0..309270a3ff6 100644 --- a/var/spack/repos/builtin/packages/libuv/package.py +++ b/var/spack/repos/builtin/packages/libuv/package.py @@ -19,6 +19,12 @@ class Libuv(AutotoolsPackage): depends_on('autoconf', type='build') depends_on('libtool', type='build') + # Tries to build an Objective-C file with GCC's C frontend + # https://github.com/libuv/libuv/issues/2805 + conflicts('%gcc platform=darwin', + msg='libuv does not compile with GCC on macOS yet, use clang. ' + 'See: https://github.com/libuv/libuv/issues/2805') + def autoreconf(self, spec, prefix): # This is needed because autogen.sh generates on-the-fly # an m4 macro needed during configuration diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 8270ce7329c..fd7438d605e 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -166,6 +166,12 @@ class Python(AutotoolsPackage): # https://github.com/python/cpython/pull/16717 patch('intel-3.6.7.patch', when='@3.6.7:3.6.8,3.7.1:3.7.5 %intel') + # CPython tries to build an Objective-C file with GCC's C frontend + # https://github.com/spack/spack/pull/16222 + # https://github.com/python/cpython/pull/13306 + conflicts('%gcc platform=darwin', + msg='CPython does not compile with GCC on macOS yet, use clang. ' + 'See: https://github.com/python/cpython/pull/13306') # For more information refer to this bug report: # https://bugs.python.org/issue29712 conflicts( From 6f9373dd66503d6751030fb425fd24dc1685a63c Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 23 Apr 2020 02:48:52 +0200 Subject: [PATCH 067/802] spack info: replace "True, False" with "on, off" (#16235) fixes #16184 --- lib/spack/spack/cmd/info.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index 81a68dae966..f8db9e10cb3 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -114,10 +114,8 @@ def lines(self): '{0} [{1}]'.format(k, self.default(v)), width=self.column_widths[0] ) - allowed = textwrap.wrap( - v.allowed_values, - width=self.column_widths[1] - ) + allowed = v.allowed_values.replace('True, False', 'on, off') + allowed = textwrap.wrap(allowed, width=self.column_widths[1]) description = textwrap.wrap( v.description, width=self.column_widths[2] From 7299de74c6919b58f582c08de3991fd74b4ea07a Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 23 Apr 2020 09:40:25 +0800 Subject: [PATCH 068/802] Add new package py-sqlparse (#16231) * Update var/spack/repos/builtin/packages/py-sqlparse/package.py Co-Authored-By: Adam J. Stewart * Add new package py-sqlparse Co-authored-by: Adam J. Stewart --- .../builtin/packages/py-sqlparse/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-sqlparse/package.py diff --git a/var/spack/repos/builtin/packages/py-sqlparse/package.py b/var/spack/repos/builtin/packages/py-sqlparse/package.py new file mode 100644 index 00000000000..73916d40e54 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-sqlparse/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PySqlparse(PythonPackage): + """A non-validating SQL parser module for Python.""" + + homepage = "https://github.com/andialbrecht/sqlparse" + url = "https://github.com/andialbrecht/sqlparse/archive/0.3.1.tar.gz" + + version('0.3.1', sha256='344b539482b75c244ac69fbb160d0f4d63a288a392475c8418ca692c594561f9') + version('0.3.0', sha256='a75fddae009fba1d66786203c9dd3a842aa4415475c466d15484139117108474') + version('0.2.4', sha256='7087a2bd385c06ac1a5cf343e2e5ea7ce2bb6386849e59ef214e02af68f73fb4') + version('0.2.3', sha256='12470ab41df1a7003a2957a79c6da9cd4ded180c8a193aa112fe0899b935ef30') + + depends_on('py-setuptools', type='build') + depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) From 15882d786807ae59bed364af9948de7d6a7680e5 Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 23 Apr 2020 12:09:06 +0800 Subject: [PATCH 069/802] Add new package: py-django (#16234) --- .../builtin/packages/py-django/package.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-django/package.py diff --git a/var/spack/repos/builtin/packages/py-django/package.py b/var/spack/repos/builtin/packages/py-django/package.py new file mode 100644 index 00000000000..0dc1fa13885 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-django/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyDjango(PythonPackage): + """The Web framework for perfectionists with deadlines.""" + + homepage = "https://www.djangoproject.com/" + url = "https://github.com/django/django/archive/3.0.5.tar.gz" + + version('3.0.5', sha256='ef2d4f26414dc9598afce9c56cee4578313b88861cedfc5b3d9a71078e5cc79b') + version('3.0.4', sha256='99699643d83acfab51d3ad73c2c2904173e03a4f59fe24c3d494e4fafc0b679f') + version('3.0.3', sha256='d953c950f0c395db065c8bc39d20e87faded376632a3aacf889ae92d5adaac8b') + version('3.0.2', sha256='ca316b1179a16931ed872ce970aabefcf3d41fe0d4b1a8e1301ec59e1e0ab45b') + version('3.0.1', sha256='85349b9366364847264b2b707ffcff5a27a022afa29aac0e904ca672cbe5ee65') + version('2.2.12', sha256='ec490c67bd2780b4ec4f5355cd99fa2fa6007f81695dd45a9e8f7ccc5ff17772') + version('2.2.11', sha256='f4274181973f0f021cc00419cfa342f1a6f862406e766ae93e7fbba9d84c680c') + version('2.2.10', sha256='3741536cf122d6695e8575b2fcf67c18812751fd3143393ea75c01a277afdacc') + + depends_on('py-setuptools', type='build') + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-pytz', type=('build', 'run')) + depends_on('py-sqlparse', type=('build', 'run')) + depends_on('py-asgiref', type=('build', 'run')) From fb1498abaca07e3594d2f24edc1596fb03225dea Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 23 Apr 2020 12:13:04 +0800 Subject: [PATCH 070/802] Add new package: dnsmasq (#16253) --- .../repos/builtin/packages/dnsmasq/package.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/dnsmasq/package.py diff --git a/var/spack/repos/builtin/packages/dnsmasq/package.py b/var/spack/repos/builtin/packages/dnsmasq/package.py new file mode 100644 index 00000000000..8f0ff1bcf89 --- /dev/null +++ b/var/spack/repos/builtin/packages/dnsmasq/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Dnsmasq(MakefilePackage): + """A lightweight, caching DNS proxy with integrated DHCP server.""" + + homepage = "http://www.thekelleys.org.uk/dnsmasq/doc.html" + url = "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.70.tar.gz" + + version('2.81', sha256='3c28c68c6c2967c3a96e9b432c0c046a5df17a426d3a43cffe9e693cf05804d0') + version('2.80', sha256='9e4a58f816ce0033ce383c549b7d4058ad9b823968d352d2b76614f83ea39adc') + version('2.79', sha256='77512dd6f31ffd96718e8dcbbf54f02c083f051d4cca709bd32540aea269f789') + version('2.78', sha256='c92e5d78aa6353354d02aabf74590d08980bb1385d8a00b80ef9bc80430aa1dc') + version('2.77', sha256='ae97a68c4e64f07633f31249eb03190d673bdb444a05796a3a2d3f521bfe9d38') + version('2.76', sha256='777c4762d2fee3738a0380401f2d087b47faa41db2317c60660d69ad10a76c32') + version('2.75', sha256='f8252c0a0ba162c2cd45f81140c7c17cc40a5fca2b869d1a420835b74acad294') + version('2.74', sha256='27b95a8b933d7eb88e93a4c405b808d09268246d4e108606e423ac518aede78f') + version('2.73', sha256='9f350f74ae2c7990b1c7c6c8591d274c37b674aa987f54dfee7ca856fae0d02d') + version('2.72', sha256='635f1b47417d17cf32e45cfcfd0213ac39fd09918479a25373ba9b2ce4adc05d') + version('2.71', sha256='7d8c64f66a396442e01b639df3ea6b4e02ba88cbe206c80be8de68b6841634c4') + version('2.70', sha256='8eb7bf53688d6aaede5c90cfd2afcce04803a4efbddfbeecc6297180749e98af') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('./src/dnsmasq', prefix.bin) From 04457fe03118515c8bb85fedaf58f35b4b52cc29 Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 23 Apr 2020 12:13:44 +0800 Subject: [PATCH 071/802] Py coilmq (#16203) * Add new package: py-coilmq * remove FIXME comment * fix depends_on --- .../builtin/packages/py-coilmq/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-coilmq/package.py diff --git a/var/spack/repos/builtin/packages/py-coilmq/package.py b/var/spack/repos/builtin/packages/py-coilmq/package.py new file mode 100644 index 00000000000..fc2f404e51e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-coilmq/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyCoilmq(PythonPackage): + """Lightweight Python STOMP message broker.""" + + homepage = "https://github.com/hozn/coilmq" + url = "https://github.com/hozn/coilmq/archive/1.0.0.tar.gz" + + version('1.0.0', sha256='95d12de9b007fc679d4ad2eba0253aee8f6ecf42b79a94be6a2e0349f91086b0') + version('0.6.1', sha256='402a5f88631a848926c442385248d7ae7bd05607bba8f20605e31fd49c3677f9') + version('0.6.0', sha256='50d22fde72f058720bb48ad96bdd7c87594372d7917dd5d2cca40a9d195fde27') + version('0.5.0', sha256='ffe2648e0a336ff61f729ad76090f8a16e681b3d3d6b14ba7ce3ef840de32cd9') + version('0.4.4', sha256='2a0d494c73412e76075d2a72698948fb1d84c9c5719b134c364c07bcc6a3eacf') + version('0.4.3', sha256='7a051f4fd2b76c8accf0b3f435267566910085c18483726e9eb56416e40703b7') + + depends_on('py-setuptools', type='build') + depends_on('py-python-daemon', type=('build', 'run')) + depends_on('py-pid', type=('build', 'run')) + depends_on('py-wheel', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) + depends_on('py-click', type=('build', 'run')) From 7c0aee41271b5a59fca2ce4849de21f25c402d1a Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 23 Apr 2020 15:35:14 +0800 Subject: [PATCH 072/802] cpp-httplib: added package at v0.5.9 (#16228) --- .../builtin/packages/cpp-httplib/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cpp-httplib/package.py diff --git a/var/spack/repos/builtin/packages/cpp-httplib/package.py b/var/spack/repos/builtin/packages/cpp-httplib/package.py new file mode 100644 index 00000000000..2774a95bd1c --- /dev/null +++ b/var/spack/repos/builtin/packages/cpp-httplib/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class CppHttplib(CMakePackage): + """A C++ header-only HTTP/HTTPS server and client library.""" + + homepage = "https://github.com/yhirose/cpp-httplib/" + url = "https://github.com/yhirose/cpp-httplib/archive/v0.5.10.tar.gz" + + version('0.5.9', sha256='c9e7aef3b0d4e80ee533d10413508d8a6e09a67d0d59646c43111f3993de006e') + version('0.5.8', sha256='184d4fe79fc836ee26aa8635b3240879af4c6f17257fc7063d0b77a0cf856dfc') + version('0.5.7', sha256='27b7f6346bdeb1ead9d17bd7cea89d9ad491f50f0479081053cc6e5742a89e64') + version('0.5.6', sha256='06ebc94edcdf23d66692bf1d128f6c65bb0ec36ce5e2f8ee61990bc74e838868') + version('0.5.5', sha256='e18dab82b3b395290514baf3804c7b74892beb654bd8020600a9d9dfdc49c32a') + version('0.5.4', sha256='40dcce66ec002e2631ef918e1b3bfc9ec1662d02007291ea4743e17ac9c7d43f') + version('0.5.3', sha256='d9d62ae15d5a2f4404286d5f6ec48daef27e24b5aab98d0505e24ee2b187d3f5') + version('0.5.2', sha256='a28cc74d3b46e2ba60311b9229375599b513151e39a7d8df6fe1fb797fc1be3a') + version('0.5.1', sha256='e079d1803e4fdbaf8bed5b414f6045c78273082eec7ac0d4802029175f2a1448') + version('0.4.2', sha256='ceaf50e2a9fce48910b244d33c6824e55aef688ad5bc181f4b9504242c2447ff') + version('0.3.3', sha256='476471c6fcd4b39fc79a5dd6ad343a2428cb69b4d528557abb6a0b7bf8186e34') + version('0.2.6', sha256='8678afc0e69bc198edcb8fe0066e46a87373221232ebabde2d78c237f31d3c3d') + version('0.2.1', sha256='94a6ddd25088b66b7b9e57b9d0ea138c984967e91b21395401642027bf279438') From 044985af80f1310b16898a5c693c0bb4b49cdc27 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Thu, 23 Apr 2020 00:38:10 -0700 Subject: [PATCH 073/802] cryptopp : added 'shared' variant and sse detection (#16213) --- .../builtin/packages/cryptopp/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/var/spack/repos/builtin/packages/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py index a96e358d2a8..fa586eca4b0 100644 --- a/var/spack/repos/builtin/packages/cryptopp/package.py +++ b/var/spack/repos/builtin/packages/cryptopp/package.py @@ -25,11 +25,30 @@ class Cryptopp(MakefilePackage): version('5.6.2', sha256='5cbfd2fcb4a6b3aab35902e2e0f3b59d9171fee12b3fc2b363e1801dfec53574') version('5.6.1', sha256='98e74d8cb17a38033354519ac8ba9c5d98a6dc00bf5d1ec3c533c2e8ec86f268') + variant('shared', default=True, description="Build shared object versions of libraries.") + depends_on('gmake', type='build') def url_for_version(self, version): url = '{0}/{1}{2}.zip' return url.format(self.homepage, self.name, version.joined) + def build(self, spec, prefix): + cxx_flags = [] + + if '+shared' in spec: + cxx_flags.append(self.compiler.cxx_pic_flag) + + target = self.spec.target + if 'sse4.1' not in target: + cxx_flags.append('-DCRYPTOPP_DISABLE_SSE4') + if 'ssse3' not in target: + cxx_flags.append('-DCRYPTOPP_DISABLE_SSSE3') + if 'sse2' not in target: + cxx_flags.append('-DCRYPTOPP_DISABLE_SSE2') + + make_target = 'dynamic' if '+shared' in spec else 'static' + make(make_target, 'CXXFLAGS={0}'.format(' '.join(cxx_flags))) + def install(self, spec, prefix): make('install', 'PREFIX={0}'.format(prefix)) From 807a08a69bec1b66327b7e7d8e402852f5b14964 Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 23 Apr 2020 15:59:32 +0800 Subject: [PATCH 074/802] enca: added package at v1.19 (#16255) --- .../repos/builtin/packages/enca/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/enca/package.py diff --git a/var/spack/repos/builtin/packages/enca/package.py b/var/spack/repos/builtin/packages/enca/package.py new file mode 100644 index 00000000000..9324a22652f --- /dev/null +++ b/var/spack/repos/builtin/packages/enca/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Enca(AutotoolsPackage): + """Extremely Naive Charset Analyser.""" + + homepage = "https://cihar.com/software/enca/" + url = "https://github.com/nijel/enca/archive/1.19.tar.gz" + + version('1.19', sha256='c4fd9a3d7c086803138842b18eed6072ec8810859b0e1ef091f1e1138d283f25') + version('1.18', sha256='b87c8d1bffc7d06ba74f82ae86eb21a921e94629203b2a971c966064c7eadab2') + version('1.17', sha256='b20372440c500e6463bd61dab0e68131cdfe857c6b7ca139b5c6cbf01e24fdc7') + version('1.16', sha256='14457b185c77b947ca2f8e09a2c3ec66940d97a2ccea28b8e61a6e0f3a0033f6') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + + def autoreconf(self, spec, prefix): + bash = which('bash') + bash('./autogen.sh') From f07cdd7f7a5254cf2065c0973b0155e81b21bac4 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Thu, 23 Apr 2020 10:01:23 +0200 Subject: [PATCH 075/802] openssl: added 1.1.1g (#16247) --- var/spack/repos/builtin/packages/openssl/package.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index fe650f71337..0ab87827831 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -25,6 +25,7 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package # The latest stable version is the 1.1.1 series. This is also our Long Term # Support (LTS) version, supported until 11th September 2023. + version('1.1.1g', sha256='ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46') version('1.1.1f', sha256='186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35') version('1.1.1e', sha256='694f61ac11cb51c9bf73f54e771ff6022b0327a43bbdfa1b2f19de1662a6dcbe') version('1.1.1d', sha256='1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2') @@ -33,8 +34,7 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package version('1.1.1a', sha256='fc20130f8b7cbd2fb918b2f14e2f429e109c31ddd0fb38fc5d71d9ffed3f9f41') version('1.1.1', sha256='2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d') - # The 1.1.0 series is currently only receiving security fixes and will go - # out of support on 11th September 2019. + # The 1.1.0 series is out of support and should not be used. version('1.1.0l', sha256='74a2f756c64fd7386a29184dc0344f4831192d61dc2481a93a4c5dd727f41148') version('1.1.0k', sha256='efa4965f4f773574d6cbda1cf874dbbe455ab1c0d4f906115f867d30444470b1') version('1.1.0j', sha256='31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246') @@ -44,9 +44,7 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package version('1.1.0d', sha256='7d5ebb9e89756545c156ff9c13cf2aa6214193b010a468a3bc789c3c28fe60df') version('1.1.0c', sha256='fc436441a2e05752d31b4e46115eb89709a28aef96d4fe786abe92409b2fd6f5') - # Our previous LTS version (1.0.2 series) will continue to be supported - # until 31st December 2019 (security fixes only during the last year of - # support). + # The 1.0.2 series is out of support and should not be used. version('1.0.2u', sha256='ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16') version('1.0.2t', sha256='14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc') version('1.0.2s', sha256='cabd5c9492825ce5bd23f3c3aeed6a97f8142f606d893df216411f07d1abab96') @@ -64,7 +62,7 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package version('1.0.2e', sha256='e23ccafdb75cfcde782da0151731aa2185195ac745eea3846133f2e05c0e0bff') version('1.0.2d', sha256='671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8') - # The 1.0.1 version is now out of support and should not be used. + # The 1.0.1 version is out of support and should not be used. version('1.0.1u', sha256='4312b4ca1215b6f2c97007503d80db80d5157f76f8f7d3febbe6b4c56ff26739') version('1.0.1t', sha256='4a6ee491a2fdb22e519c76fdc2a628bb3cec12762cd456861d207996c8a07088') version('1.0.1r', sha256='784bd8d355ed01ce98b812f873f8b2313da61df7c7b5677fcf2e57b0863a3346') From b1133cb5db3b1d0d6a65ac9954330fb2c550d058 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Thu, 23 Apr 2020 10:09:09 +0200 Subject: [PATCH 076/802] py-setuptools: added v44.1.0 and v46.1.3 (#16171) --- var/spack/repos/builtin/packages/py-setuptools/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index affd23eebdf..877cf7ece97 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -21,6 +21,8 @@ class PySetuptools(PythonPackage): 'easy_install' ] + version('46.1.3', sha256='795e0475ba6cd7fa082b1ee6e90d552209995627a2a227a47c6ea93282f4bfb1') + version('44.1.0', sha256='794a96b0c1dc6f182c36b72ab70d7e90f1d59f7a132e6919bb37b4fd4d424aca') version('41.4.0', sha256='7eae782ccf36b790c21bde7d86a4f303a441cd77036b25c559a602cf5186ce4d') version('41.0.1', sha256='a222d126f5471598053c9a77f4b5d4f26eaa1f150ad6e01dcf1a42e185d05613') version('41.0.0', sha256='79d30254b6fe7a8e672e43cd85f13a9f3f2a50080bc81d851143e2219ef0dcb1') @@ -40,7 +42,9 @@ class PySetuptools(PythonPackage): version('16.0', sha256='aa86255dee2c4a0056509750008007667c29306b7a6c13801468515b2c672845') version('11.3.1', sha256='bd25f17de4ecf00116a9f7368b614a54ca1612d7945d2eafe5d97bc08c138bc5') - depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) + depends_on('python@3.5:', type=('build', 'run'), when='@45.0.0:') + depends_on('python@2.7:2.8,3.5:', type=('build', 'run'), when='@44.0.0:44.99.99') + depends_on('python@2.7:2.8,3.4:', type=('build', 'run'), when='@:43.99.99') # Previously, setuptools vendored all of its dependencies to allow # easy bootstrapping. As of version 34.0.0, this is no longer done From 19c58438713d2fae596ae61c7747788fb0d46887 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 23 Apr 2020 11:40:23 +0200 Subject: [PATCH 077/802] Travis: change the spec we concretize on MacOS (#16256) Since CMake can't build with GCC on MacOS, choose a spec that doesn't have CMake in the DAG. --- share/spack/qa/run-unit-tests | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests index 01f564e5e1f..4bd04bcbb98 100755 --- a/share/spack/qa/run-unit-tests +++ b/share/spack/qa/run-unit-tests @@ -37,7 +37,11 @@ bin/spack -h bin/spack help -a # Profile and print top 20 lines for a simple call to spack spec -spack -p --lines 20 spec mpileaks%gcc ^elfutils@0.170 +if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + spack -p --lines 20 spec openmpi +else + spack -p --lines 20 spec mpileaks%gcc ^elfutils@0.170 +fi #----------------------------------------------------------- # Run unit tests with code coverage From df2cfd26cd03e29b9898fe79c804c78f2d29cbd0 Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 23 Apr 2020 18:43:12 +0800 Subject: [PATCH 078/802] ambari: added package at v2.7.5 (#16149) --- .../repos/builtin/packages/ambari/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ambari/package.py diff --git a/var/spack/repos/builtin/packages/ambari/package.py b/var/spack/repos/builtin/packages/ambari/package.py new file mode 100644 index 00000000000..6e54f0a44e7 --- /dev/null +++ b/var/spack/repos/builtin/packages/ambari/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Ambari(PythonPackage): + """Apache Ambari is a tool for provisioning, managing, and monitoring + Apache Hadoop clusters. Ambari consists of a set of RESTful APIs and + a browser-based management interface.""" + + homepage = "https://cwiki.apache.org/confluence/display/AMBARI/Ambari" + url = "https://github.com/apache/ambari/archive/release-2.7.5.tar.gz" + + version('2.7.5', sha256='f8c8687b7a61b633b92f83b1c104fd75b1e13836cd8a0e0df6db7b483b23a354') + version('2.7.4', sha256='d6796c7ea913d39c93dad52b4cb74ef411a7dce4ebf68f11b12718117f2c01a4') + version('2.7.3', sha256='30fe72e60fa6b62fe032bd193ebd0cef20b65c54b57cad92f6f44daabd3771cf') + version('2.7.1', sha256='ea4eb28f377ce9d0b9b7648f2020dda4be974c6d9a22ebaafbf1bc97890e4e42') + + depends_on('python@:2.7.999', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-mock', type='test') + depends_on('py-coilmq', type=('build', 'run')) From 6cad7a585de5e79d3f2b1c928b61896eecca74b4 Mon Sep 17 00:00:00 2001 From: darmac Date: Fri, 24 Apr 2020 00:01:20 +0800 Subject: [PATCH 079/802] Go: support for aarch64 (#16083) --- var/spack/repos/builtin/packages/go/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 600d426a7ae..abea06b5a2e 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -6,6 +6,7 @@ import os import llnl.util.tty as tty from spack import * +import platform # - vanilla CentOS 7, and possibly other systems, fail a test: # TestCloneNEWUSERAndRemapRootDisableSetgroups @@ -87,7 +88,10 @@ class Go(Package): depends_on('git', type=('build', 'link', 'run')) # TODO: Make non-c self-hosting compilers feasible without backflips # should be a dep on external go compiler - depends_on('go-bootstrap', type='build') + if platform.machine() == 'aarch64': + depends_on('gcc languages=go', type='build') + else: + depends_on('go-bootstrap', type='build') # https://github.com/golang/go/issues/17545 patch('time_test.patch', when='@1.6.4:1.7.4') From ca67df6e3d61cdbc615d85cc223dcc2314bc6b6c Mon Sep 17 00:00:00 2001 From: jthies Date: Thu, 23 Apr 2020 18:11:54 +0200 Subject: [PATCH 080/802] phist: don't apply patch to 1.9.0 (#16257) --- var/spack/repos/builtin/packages/phist/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/phist/package.py b/var/spack/repos/builtin/packages/phist/package.py index 797d09a8463..cdbd84ed7ff 100644 --- a/var/spack/repos/builtin/packages/phist/package.py +++ b/var/spack/repos/builtin/packages/phist/package.py @@ -96,7 +96,7 @@ class Phist(CMakePackage): # ###################### Patches ########################## - patch('update_tpetra_gotypes.patch', when='@:1.9.0') + patch('update_tpetra_gotypes.patch', when='@:1.8.99') # ###################### Dependencies ########################## From d5d232e20767b8c0abc56ba75f07c4537449e333 Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Thu, 23 Apr 2020 12:14:09 -0400 Subject: [PATCH 081/802] tensorflow: compile against spack-provided protobuf (#16258) This allows horovod to be built with frameworks=pytorch,tensorflow. I tracked down the crash I observed in #15719, where loading torch before tensorflow would cause a crash in: google::protobuf::internal::(anonymous namespace)::InitSCC_DFS(google::protobuf::internal::SCCInfoBase*) The solution is to make tensorflow compile against the protobuf version Spack provides, instead of allowing it to use it's own. It's likely we'll want to go after some of the others that are listed in third_party/systemlibs/syslibs_configure.bzl in the future. --- .../repos/builtin/packages/py-tensorflow/package.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 64b97b05b26..b46cfbb4cea 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -152,6 +152,7 @@ class PyTensorflow(Package, CudaPackage): depends_on('py-protobuf@3.0.0', type=('build', 'run'), when='@0.11.0') depends_on('py-protobuf@3.0.0b2', type=('build', 'run'), when='@0.7.1:0.10') depends_on('py-protobuf@3.0.0a3', type=('build', 'run'), when='@0.6:0.7.0') + depends_on('protobuf') # tensorboard # tensorflow-estimator depends_on('py-termcolor@1.1.0:', type=('build', 'run'), when='@1.6:') @@ -498,6 +499,11 @@ def setup_build_environment(self, env): mkdirp(tmp_path) env.set('TEST_TMPDIR', tmp_path) + env.set('TF_SYSTEM_LIBS', 'com_google_protobuf') + # NOTE: INCLUDEDIR is not just relevant to protobuf + # see third_party/systemlibs/jsoncpp.BUILD + env.set('INCLUDEDIR', spec['protobuf'].prefix.include) + def configure(self, spec, prefix): # NOTE: configure script is interactive. If you set the appropriate # environment variables, this interactivity is skipped. If you don't, @@ -626,6 +632,7 @@ def build(self, spec, prefix): # Ask bazel to explain what it's up to # Needs a filename as argument '--explain=explainlogfile.txt', + '--incompatible_no_support_tools_in_action_inputs=false', # Increase verbosity of explanation, '--verbose_explanations', ] @@ -679,9 +686,6 @@ def build(self, spec, prefix): if spec.satisfies('@2:'): args.append('--config=v2') - if spec.satisfies('%gcc@5:'): - args.append('--cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0') - args.append('//tensorflow/tools/pip_package:build_pip_package') bazel(*args) From 2a3942fa4cc893cbd29a7676bf61993b49e30018 Mon Sep 17 00:00:00 2001 From: Andrew Gaspar Date: Thu, 23 Apr 2020 11:33:02 -0600 Subject: [PATCH 082/802] Rust 1.43.0 (#16260) --- var/spack/repos/builtin/packages/rust/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py index 4434c5efbd8..8c0e6430e48 100644 --- a/var/spack/repos/builtin/packages/rust/package.py +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -85,6 +85,7 @@ class Rust(Package): # The `x.py` bootstrapping script did not exist prior to Rust 1.17. It # would be possible to support both, but for simplicitly, we only support # Rust 1.17 and newer + version('1.43.0', sha256='75f6ac6c9da9f897f4634d5a07be4084692f7ccc2d2bb89337be86cfc18453a1') version('1.42.0', sha256='d2e8f931d16a0539faaaacd801e0d92c58df190269014b2360c6ab2a90ee3475') version('1.41.1', sha256='38c93d016e6d3e083aa15e8f65511d3b4983072c0218a529f5ee94dd1de84573') version('1.41.0', sha256='5546822c09944c4d847968e9b7b3d0e299f143f307c00fa40e84a99fabf8d74b') @@ -124,6 +125,12 @@ class Rust(Package): # This dictionary contains a version: hash dictionary for each supported # Rust target. rust_releases = { + '1.43.0': { + 'x86_64-unknown-linux-gnu': '069f34fa5cef92551724c83c36360df1ac66fe3942bc1d0e4d341ce79611a029', + 'powerpc64le-unknown-linux-gnu': 'c75c7ae4c94715fd6cc43d1d6fdd0952bc151f7cbe3054f66d99a529d5bb996f', + 'aarch64-unknown-linux-gnu': 'e5fa55f333c10cdae43d147438a80ffb435d6c7b9681cd2e2f0857c024556856', + 'x86_64-apple-darwin': '504e8efb2cbb36f5a3db7bb36f339a1e5216082c910ad19039c370505cfbde99' + }, '1.42.0': { 'x86_64-unknown-linux-gnu': '7d1e07ad9c8a33d8d039def7c0a131c5917aa3ea0af3d0cc399c6faf7b789052', 'powerpc64le-unknown-linux-gnu': '805b08fa1e0aad4d706301ca1f13e2d80810d385cece2c15070360b3c4bd6e4a', From 686f0e21de510a12ee3d6af410448eb405d3e7b6 Mon Sep 17 00:00:00 2001 From: "Mark W. Krentel" Date: Thu, 23 Apr 2020 12:34:19 -0500 Subject: [PATCH 083/802] libunwind: add 1.4.0 release and 1.5 stable branch (#16261) --- .../builtin/packages/libunwind/package.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/libunwind/package.py b/var/spack/repos/builtin/packages/libunwind/package.py index 971840f5e04..1a4ae5524c5 100644 --- a/var/spack/repos/builtin/packages/libunwind/package.py +++ b/var/spack/repos/builtin/packages/libunwind/package.py @@ -16,9 +16,12 @@ class Libunwind(AutotoolsPackage): maintainers = ['mwkrentel'] version('master', branch='master') + version('1.5-head', branch='v1.5-stable') + version('1.5-rc1', sha256='3e0cbc6dee326592097ef06e97cf76ef597987eddd0df8bea49b0594e587627a') version('1.4-head', branch='v1.4-stable') + version('1.4.0', sha256='df59c931bd4d7ebfd83ee481c943edf015138089b8e50abed8d9c57ba9338435', preferred=True) version('1.4-rc1', sha256='1928459139f048f9b4aca4bb5010540cb7718d44220835a2980b85429007fa9f') - version('1.3.1', sha256='43997a3939b6ccdf2f669b50fdb8a4d3205374728c2923ddc2354c65260214f8', preferred=True) + version('1.3.1', sha256='43997a3939b6ccdf2f669b50fdb8a4d3205374728c2923ddc2354c65260214f8') version('1.2.1', sha256='3f3ecb90e28cbe53fba7a4a27ccce7aad188d3210bb1964a923a731a27a75acb') version('1.1', sha256='9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a') @@ -26,15 +29,15 @@ class Libunwind(AutotoolsPackage): description='Support xz (lzma) compressed symbol tables.') variant('zlib', default=False, - description='Support zlib compressed symbol tables (master ' - 'branch only).') + description='Support zlib compressed symbol tables ' + '(1.5 and later).') # The libunwind releases contain the autotools generated files, # but the git repo snapshots do not. - depends_on('autoconf', type='build', when='@master,1.4-head') - depends_on('automake', type='build', when='@master,1.4-head') - depends_on('libtool', type='build', when='@master,1.4-head') - depends_on('m4', type='build', when='@master,1.4-head') + depends_on('autoconf', type='build', when='@master,1.4-head,1.5-head') + depends_on('automake', type='build', when='@master,1.4-head,1.5-head') + depends_on('libtool', type='build', when='@master,1.4-head,1.5-head') + depends_on('m4', type='build', when='@master,1.4-head,1.5-head') depends_on('xz', type='link', when='+xz') depends_on('zlib', type='link', when='+zlib') @@ -55,8 +58,8 @@ def configure_args(self): else: args.append('--disable-minidebuginfo') - # zlib support is only in the master branch (for now). - if spec.satisfies('@master'): + # zlib support is available in 1.5.x and later + if spec.satisfies('@1.5:'): if '+zlib' in spec: args.append('--enable-zlibdebuginfo') else: From 0c0f11caf681cf8e1405c8579b5dffaec16d360a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 23 Apr 2020 12:14:40 -0700 Subject: [PATCH 084/802] spack info: allow variants section to be as wide as the terminal (#16254) The variants table in `spack info` is cramped, as the *widest* it can be is 80 columns. And that's actually only sort of true -- the padding calculation is off, so it still wraps on terminals of size 80 because it comes out *slightly* wider. This change looks at the terminal size and calculates the width of the description column based on it. On larger terminals, the output looks much nicer, and on small terminals, the output no longer wraps. Here's an example for `spack info qmcpack` with 110 columns. Before: Name [Default] Allowed values Description ==================== ==================== ============================== afqmc [off] on, off Install with AFQMC support. NOTE that if used in combination with CUDA, only AFQMC will have CUDA. build_type [Release] Debug, Release, The build type to build RelWithDebInfo complex [off] on, off Build the complex (general twist/k-point) version cuda [off] on, off Build with CUDA After: Name [Default] Allowed values Description ==================== ==================== ======================================================== afqmc [off] on, off Install with AFQMC support. NOTE that if used in combination with CUDA, only AFQMC will have CUDA. build_type [Release] Debug, Release, The build type to build RelWithDebInfo complex [off] on, off Build the complex (general twist/k-point) version cuda [off] on, off Build with CUDA --- lib/spack/spack/cmd/info.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index f8db9e10cb3..fa674317ab7 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -8,6 +8,7 @@ import textwrap from six.moves import zip_longest +import llnl.util.tty as tty import llnl.util.tty.color as color from llnl.util.tty.colify import colify @@ -53,11 +54,9 @@ def variant(s): class VariantFormatter(object): - def __init__(self, variants, max_widths=(30, 20, 30)): + def __init__(self, variants): self.variants = variants self.headers = ('Name [Default]', 'Allowed values', 'Description') - # Set max headers lengths - self.max_column_widths = max_widths # Formats fmt_name = '{0} [{1}]' @@ -67,7 +66,7 @@ def __init__(self, variants, max_widths=(30, 20, 30)): # than that self.column_widths = [len(x) for x in self.headers] - # Update according to line lengths + # Expand columns based on max line lengths for k, v in variants.items(): candidate_max_widths = ( len(fmt_name.format(k, self.default(v))), # Name [Default] @@ -81,12 +80,18 @@ def __init__(self, variants, max_widths=(30, 20, 30)): max(self.column_widths[2], candidate_max_widths[2]) ) - # Reduce to at most the maximum allowed - self.column_widths = ( - min(self.column_widths[0], self.max_column_widths[0]), - min(self.column_widths[1], self.max_column_widths[1]), - min(self.column_widths[2], self.max_column_widths[2]) + # Don't let name or possible values be less than max widths + _, cols = tty.terminal_size() + max_name = min(self.column_widths[0], 30) + max_vals = min(self.column_widths[1], 20) + + # allow the description column to extend as wide as the terminal. + max_description = min( + self.column_widths[2], + # min width 70 cols, 14 cols of margins and column spacing + max(cols, 70) - max_name - max_vals - 14, ) + self.column_widths = (max_name, max_vals, max_description) # Compute the format self.fmt = "%%-%ss%%-%ss%%s" % ( From a844467c258c91a71dcd636897acc82306c82758 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Thu, 23 Apr 2020 15:53:51 -0600 Subject: [PATCH 085/802] eospac: prefer 6.4.0 (#16266) --- var/spack/repos/builtin/packages/eospac/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/eospac/package.py b/var/spack/repos/builtin/packages/eospac/package.py index f73274ca464..0d9221e7dfc 100644 --- a/var/spack/repos/builtin/packages/eospac/package.py +++ b/var/spack/repos/builtin/packages/eospac/package.py @@ -15,7 +15,7 @@ class Eospac(Package): homepage = "http://laws.lanl.gov/projects/data/eos.html" list_url = "http://laws.lanl.gov/projects/data/eos/eospacReleases.php" - version('6.4.0', sha256='15a953beac735c68431afe86ffe33323d540d0fbbbec03ba79438dd29736051d', + version('6.4.0', sha256='15a953beac735c68431afe86ffe33323d540d0fbbbec03ba79438dd29736051d', preferred=True, url="http://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.4.0_612ea8c9b8ffa6d9175d9118955571d9107f1e3c.tgz") version('6.4.0beta.4', sha256='0ebfd8badff575ea77444aa978629dbdca3135a0b5eb373b8daba058773d4635', url="http://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.4.0beta.4_aff6429bb6868de31a980278bafa13487c2ce83f.tgz") @@ -25,7 +25,7 @@ class Eospac(Package): url="http://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.4.0beta.2_69196eadbc77506561eef711f19d2f03b4ab0ffa.tgz") version('6.4.0beta.1', sha256='14c5c804e5f628f41e8ed80bcee5a80adeb6c6f3d130715421ca99a30c7eb7e2', url="http://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.4.0beta.1_r20171213193219.tgz") - version('6.3.1', sha256='aa1112c4251c9c3c2883a7ab2c7f2abff2c339f29dbbf8421ef88b0c9df904f8', preferred=True, + version('6.3.1', sha256='aa1112c4251c9c3c2883a7ab2c7f2abff2c339f29dbbf8421ef88b0c9df904f8', url="http://laws.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.3.1_r20161202150449.tgz") # This patch allows the use of spack's compile wrapper 'flang' From 9b3a0355bb0d49c51a137532c7f7f42eff8345bd Mon Sep 17 00:00:00 2001 From: Jeffrey Salmond Date: Fri, 24 Apr 2020 01:50:05 +0100 Subject: [PATCH 086/802] add fontconfig as vim dependency (#16268) --- var/spack/repos/builtin/packages/vim/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/vim/package.py b/var/spack/repos/builtin/packages/vim/package.py index a022af0218f..5539adfc025 100644 --- a/var/spack/repos/builtin/packages/vim/package.py +++ b/var/spack/repos/builtin/packages/vim/package.py @@ -58,6 +58,7 @@ class Vim(AutotoolsPackage): depends_on('ncurses', when="@7.4:") depends_on('findutils', type='build') + depends_on('fontconfig', when="+gui") def configure_args(self): spec = self.spec From 433a0b243ffa97add96bc0f51477c4bda3449c12 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 23 Apr 2020 19:50:22 -0500 Subject: [PATCH 087/802] oneDNN: add new version (#16267) --- var/spack/repos/builtin/packages/onednn/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/onednn/package.py b/var/spack/repos/builtin/packages/onednn/package.py index 8318d70d901..995cf40942a 100644 --- a/var/spack/repos/builtin/packages/onednn/package.py +++ b/var/spack/repos/builtin/packages/onednn/package.py @@ -30,6 +30,7 @@ class Onednn(CMakePackage): version('1.0.2', sha256='9281715436adb7b9eef63fad419a581f397218824bc1271e557c134725c03916') version('1.0.1', sha256='8fee2324267811204c1f877a1dea70b23ab3d5f4c3ea0198d81f0921aa70d76e') version('1.0', sha256='7bfe11cac1d1f5dc1b60c1258e79d8cc84944d459e3758d50c1f7feba05bc6d7') + version('0.21.5', sha256='ebb146cadda1c14767251ded54219c8215daee84aa1ac773cf43b5c2ae53160b') version('0.21.4', sha256='00ace1ce08cab3408bc83e6b9d55ccba661761e044c03175d58caccedddf93b3') version('0.21.3', sha256='a0211aeb5e7dad50b97fa5dffc1a2fe2fe732572d4164e1ee8750a2ede43fbec') version('0.21.2', sha256='5897bfd0e321a761de0c57ba1dfe0ebc753cc0d8a18bda2056af48022706a297') From c6ada206af08f66817fe1c2aeeee8f45f92a192e Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 23 Apr 2020 18:21:49 -0700 Subject: [PATCH 088/802] tests: each mock package now has its own class (#16157) Packages in Spack are classes, and we need to be able to execute class methods on mock packages. The previous design used instances of a single MockPackage class; this version gives each package its own class that can spider depenencies. This allows us to implement class methods like `possible_dependencies()` on mock packages. This design change moves mock package creation into the `MockPackageMultiRepo`, and mock packages now *must* be created from a repo. This is required for us to mock `possible_dependencies()`, which needs to be able to get dependency packages from the package repo. Changes include: * `MockPackage` is now `MockPackageBase` * `MockPackageBase` instances must now be created with `MockPackageMultiRepo.add_package()` * add `possible_dependencies()` method to `MockPackageBase` * refactor tests to use new code structure * move package mocking infrastructure into `spack.util.mock_package`, as it's becoming a more sophisticated class and it gets lots in `conftest.py` --- lib/spack/spack/test/cmd/ci.py | 19 ++- lib/spack/spack/test/cmd/env.py | 30 ++-- lib/spack/spack/test/concretize.py | 10 +- lib/spack/spack/test/conftest.py | 73 ---------- lib/spack/spack/test/database.py | 37 +++-- lib/spack/spack/test/spec_dag.py | 40 +++--- lib/spack/spack/test/spec_yaml.py | 19 ++- lib/spack/spack/test/util/mock_package.py | 43 ++++++ lib/spack/spack/util/mock_package.py | 161 ++++++++++++++++++++++ 9 files changed, 279 insertions(+), 153 deletions(-) create mode 100644 lib/spack/spack/test/util/mock_package.py create mode 100644 lib/spack/spack/util/mock_package.py diff --git a/lib/spack/spack/test/cmd/ci.py b/lib/spack/spack/test/cmd/ci.py index 89ed4718687..36236b0cc16 100644 --- a/lib/spack/spack/test/cmd/ci.py +++ b/lib/spack/spack/test/cmd/ci.py @@ -18,7 +18,7 @@ import spack.paths as spack_paths import spack.repo as repo from spack.spec import Spec -from spack.test.conftest import MockPackage, MockPackageMultiRepo +from spack.util.mock_package import MockPackageMultiRepo import spack.util.executable as exe import spack.util.spack_yaml as syaml import spack.util.gpg @@ -101,15 +101,14 @@ def test_specs_staging(config): """ default = ('build', 'link') - g = MockPackage('g', [], []) - f = MockPackage('f', [], []) - e = MockPackage('e', [], []) - d = MockPackage('d', [f, g], [default, default]) - c = MockPackage('c', [], []) - b = MockPackage('b', [d, e], [default, default]) - a = MockPackage('a', [b, c], [default, default]) - - mock_repo = MockPackageMultiRepo([a, b, c, d, e, f, g]) + mock_repo = MockPackageMultiRepo() + g = mock_repo.add_package('g', [], []) + f = mock_repo.add_package('f', [], []) + e = mock_repo.add_package('e', [], []) + d = mock_repo.add_package('d', [f, g], [default, default]) + c = mock_repo.add_package('c', [], []) + b = mock_repo.add_package('b', [d, e], [default, default]) + mock_repo.add_package('a', [b, c], [default, default]) with repo.swap(mock_repo): spec_a = Spec('a') diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 4f3abb4438d..f35b0a4bc13 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -20,7 +20,7 @@ from spack.stage import stage_prefix from spack.spec_list import SpecListError -from spack.test.conftest import MockPackage, MockPackageMultiRepo +from spack.util.mock_package import MockPackageMultiRepo import spack.util.spack_json as sjson @@ -733,10 +733,10 @@ def create_v1_lockfile_dict(roots, all_specs): def test_read_old_lock_and_write_new(tmpdir): build_only = ('build',) - y = MockPackage('y', [], []) - x = MockPackage('x', [y], [build_only]) + mock_repo = MockPackageMultiRepo() + y = mock_repo.add_package('y', [], []) + mock_repo.add_package('x', [y], [build_only]) - mock_repo = MockPackageMultiRepo([x, y]) with spack.repo.swap(mock_repo): x = Spec('x') x.concretize() @@ -765,9 +765,9 @@ def test_read_old_lock_creates_backup(tmpdir): """When reading a version-1 lockfile, make sure that a backup of that file is created. """ - y = MockPackage('y', [], []) + mock_repo = MockPackageMultiRepo() + y = mock_repo.add_package('y', [], []) - mock_repo = MockPackageMultiRepo([y]) with spack.repo.swap(mock_repo): y = Spec('y') y.concretize() @@ -796,11 +796,10 @@ def test_indirect_build_dep(): default = ('build', 'link') build_only = ('build',) - z = MockPackage('z', [], []) - y = MockPackage('y', [z], [build_only]) - x = MockPackage('x', [y], [default]) - - mock_repo = MockPackageMultiRepo([x, y, z]) + mock_repo = MockPackageMultiRepo() + z = mock_repo.add_package('z', [], []) + y = mock_repo.add_package('y', [z], [build_only]) + mock_repo.add_package('x', [y], [default]) def noop(*args): pass @@ -838,11 +837,10 @@ def test_store_different_build_deps(): default = ('build', 'link') build_only = ('build',) - z = MockPackage('z', [], []) - y = MockPackage('y', [z], [build_only]) - x = MockPackage('x', [y, z], [default, build_only]) - - mock_repo = MockPackageMultiRepo([x, y, z]) + mock_repo = MockPackageMultiRepo() + z = mock_repo.add_package('z', [], []) + y = mock_repo.add_package('y', [z], [build_only]) + mock_repo.add_package('x', [y, z], [default, build_only]) def noop(*args): pass diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 9024c99cadf..232dfaeb4be 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -15,7 +15,7 @@ from spack.package_prefs import PackagePrefs from spack.spec import Spec, CompilerSpec, ConflictsInSpecError from spack.version import ver -from spack.test.conftest import MockPackage, MockPackageMultiRepo +from spack.util.mock_package import MockPackageMultiRepo import spack.compilers import spack.platforms.test @@ -235,10 +235,10 @@ def test_architecture_deep_inheritance(self): """ default_dep = ('link', 'build') - bazpkg = MockPackage('bazpkg', [], []) - barpkg = MockPackage('barpkg', [bazpkg], [default_dep]) - foopkg = MockPackage('foopkg', [barpkg], [default_dep]) - mock_repo = MockPackageMultiRepo([foopkg, barpkg, bazpkg]) + mock_repo = MockPackageMultiRepo() + bazpkg = mock_repo.add_package('bazpkg', [], []) + barpkg = mock_repo.add_package('barpkg', [bazpkg], [default_dep]) + mock_repo.add_package('foopkg', [barpkg], [default_dep]) with spack.repo.swap(mock_repo): spec = Spec('foopkg %clang@3.3 os=CNL target=footar' + diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index 8912c0219b7..736c5a55638 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -14,7 +14,6 @@ import tempfile import xml.etree.ElementTree -import ordereddict_backport import py import pytest import ruamel.yaml as yaml @@ -38,11 +37,8 @@ import spack.util.gpg from spack.util.pattern import Bunch -from spack.dependency import Dependency from spack.fetch_strategy import FetchStrategyComposite, URLFetchStrategy from spack.fetch_strategy import FetchError -from spack.spec import Spec -from spack.version import Version @pytest.fixture @@ -1004,75 +1000,6 @@ def installation_dir_with_headers(tmpdir_factory): return root -########## -# Mock packages -########## - - -class MockPackage(object): - def __init__(self, name, dependencies, dependency_types, conditions=None, - versions=None): - self.name = name - self.spec = None - self.dependencies = ordereddict_backport.OrderedDict() - self._installed_upstream = False - - assert len(dependencies) == len(dependency_types) - for dep, dtype in zip(dependencies, dependency_types): - d = Dependency(self, Spec(dep.name), type=dtype) - if not conditions or dep.name not in conditions: - self.dependencies[dep.name] = {Spec(name): d} - else: - dep_conditions = conditions[dep.name] - dep_conditions = dict( - (Spec(x), Dependency(self, Spec(y), type=dtype)) - for x, y in dep_conditions.items()) - self.dependencies[dep.name] = dep_conditions - - if versions: - self.versions = versions - else: - versions = list(Version(x) for x in [1, 2, 3]) - self.versions = dict((x, {'preferred': False}) for x in versions) - - self.variants = {} - self.provided = {} - self.conflicts = {} - self.patches = {} - - def provides(self, vname): - return vname in self.provided - - @property - def virtuals_provided(self): - return [v.name for v, c in self.provided] - - -class MockPackageMultiRepo(object): - def __init__(self, packages): - self.spec_to_pkg = dict((x.name, x) for x in packages) - self.spec_to_pkg.update( - dict(('mockrepo.' + x.name, x) for x in packages)) - - def get(self, spec): - if not isinstance(spec, spack.spec.Spec): - spec = Spec(spec) - return self.spec_to_pkg[spec.name] - - def get_pkg_class(self, name): - return self.spec_to_pkg[name] - - def exists(self, name): - return name in self.spec_to_pkg - - def is_virtual(self, name): - return False - - def repo_for_pkg(self, name): - import collections - Repo = collections.namedtuple('Repo', ['namespace']) - return Repo('mockrepo') - ########## # Specs of various kind ########## diff --git a/lib/spack/spack/test/database.py b/lib/spack/spack/test/database.py index 28311c7501d..70f9bffe59b 100644 --- a/lib/spack/spack/test/database.py +++ b/lib/spack/spack/test/database.py @@ -28,7 +28,7 @@ import spack.database import spack.package import spack.spec -from spack.test.conftest import MockPackage, MockPackageMultiRepo +from spack.util.mock_package import MockPackageMultiRepo from spack.util.executable import Executable @@ -73,11 +73,11 @@ def test_installed_upstream(upstream_and_downstream_db): downstream_db, downstream_layout = (upstream_and_downstream_db) default = ('build', 'link') - x = MockPackage('x', [], []) - z = MockPackage('z', [], []) - y = MockPackage('y', [z], [default]) - w = MockPackage('w', [x, y], [default, default]) - mock_repo = MockPackageMultiRepo([w, x, y, z]) + mock_repo = MockPackageMultiRepo() + x = mock_repo.add_package('x', [], []) + z = mock_repo.add_package('z', [], []) + y = mock_repo.add_package('y', [z], [default]) + mock_repo.add_package('w', [x, y], [default, default]) with spack.repo.swap(mock_repo): spec = spack.spec.Spec('w') @@ -116,9 +116,9 @@ def test_removed_upstream_dep(upstream_and_downstream_db): downstream_db, downstream_layout = (upstream_and_downstream_db) default = ('build', 'link') - z = MockPackage('z', [], []) - y = MockPackage('y', [z], [default]) - mock_repo = MockPackageMultiRepo([y, z]) + mock_repo = MockPackageMultiRepo() + z = mock_repo.add_package('z', [], []) + mock_repo.add_package('y', [z], [default]) with spack.repo.swap(mock_repo): spec = spack.spec.Spec('y') @@ -150,8 +150,8 @@ def test_add_to_upstream_after_downstream(upstream_and_downstream_db): upstream_write_db, upstream_db, upstream_layout,\ downstream_db, downstream_layout = (upstream_and_downstream_db) - x = MockPackage('x', [], []) - mock_repo = MockPackageMultiRepo([x]) + mock_repo = MockPackageMultiRepo() + mock_repo.add_package('x', [], []) with spack.repo.swap(mock_repo): spec = spack.spec.Spec('x') @@ -183,8 +183,8 @@ def test_cannot_write_upstream(tmpdir_factory, test_store, gen_mock_layout): roots = [str(tmpdir_factory.mktemp(x)) for x in ['a', 'b']] layouts = [gen_mock_layout(x) for x in ['/ra/', '/rb/']] - x = MockPackage('x', [], []) - mock_repo = MockPackageMultiRepo([x]) + mock_repo = MockPackageMultiRepo() + mock_repo.add_package('x', [], []) # Instantiate the database that will be used as the upstream DB and make # sure it has an index file @@ -209,11 +209,10 @@ def test_recursive_upstream_dbs(tmpdir_factory, test_store, gen_mock_layout): layouts = [gen_mock_layout(x) for x in ['/ra/', '/rb/', '/rc/']] default = ('build', 'link') - z = MockPackage('z', [], []) - y = MockPackage('y', [z], [default]) - x = MockPackage('x', [y], [default]) - - mock_repo = MockPackageMultiRepo([x, y, z]) + mock_repo = MockPackageMultiRepo() + z = mock_repo.add_package('z', [], []) + y = mock_repo.add_package('y', [z], [default]) + mock_repo.add_package('x', [y], [default]) with spack.repo.swap(mock_repo): spec = spack.spec.Spec('x') @@ -675,7 +674,7 @@ def test_115_reindex_with_packages_not_in_repo(mutable_database): # Dont add any package definitions to this repository, the idea is that # packages should not have to be defined in the repository once they # are installed - with spack.repo.swap(MockPackageMultiRepo([])): + with spack.repo.swap(MockPackageMultiRepo()): spack.store.store.reindex() _check_db_sanity(mutable_database) diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index e031f02c255..0b638ada04f 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -12,7 +12,7 @@ from spack.spec import Spec from spack.dependency import all_deptypes, Dependency, canonical_deptype -from spack.test.conftest import MockPackage, MockPackageMultiRepo +from spack.util.mock_package import MockPackageMultiRepo def check_links(spec_to_check): @@ -69,12 +69,12 @@ def test_test_deptype(): default = ('build', 'link') test_only = ('test',) - x = MockPackage('x', [], []) - z = MockPackage('z', [], []) - y = MockPackage('y', [z], [test_only]) - w = MockPackage('w', [x, y], [test_only, default]) + mock_repo = MockPackageMultiRepo() + x = mock_repo.add_package('x', [], []) + z = mock_repo.add_package('z', [], []) + y = mock_repo.add_package('y', [z], [test_only]) + w = mock_repo.add_package('w', [x, y], [test_only, default]) - mock_repo = MockPackageMultiRepo([w, x, y, z]) with spack.repo.swap(mock_repo): spec = Spec('w') spec.concretize(tests=(w.name,)) @@ -93,8 +93,9 @@ def test_installed_deps(): default = ('build', 'link') build_only = ('build',) - e = MockPackage('e', [], []) - d = MockPackage('d', [], []) + mock_repo = MockPackageMultiRepo() + e = mock_repo.add_package('e', [], []) + d = mock_repo.add_package('d', [], []) c_conditions = { d.name: { 'c': 'd@2' @@ -103,11 +104,10 @@ def test_installed_deps(): 'c': 'e@2' } } - c = MockPackage('c', [d, e], [build_only, default], - conditions=c_conditions) - b = MockPackage('b', [d, e], [default, default]) - a = MockPackage('a', [b, c], [default, default]) - mock_repo = MockPackageMultiRepo([a, b, c, d, e]) + c = mock_repo.add_package('c', [d, e], [build_only, default], + conditions=c_conditions) + b = mock_repo.add_package('b', [d, e], [default, default]) + mock_repo.add_package('a', [b, c], [default, default]) with spack.repo.swap(mock_repo): c_spec = Spec('c') @@ -133,10 +133,10 @@ def test_specify_preinstalled_dep(): """ default = ('build', 'link') - c = MockPackage('c', [], []) - b = MockPackage('b', [c], [default]) - a = MockPackage('a', [b], [default]) - mock_repo = MockPackageMultiRepo([a, b, c]) + mock_repo = MockPackageMultiRepo() + c = mock_repo.add_package('c', [], []) + b = mock_repo.add_package('b', [c], [default]) + mock_repo.add_package('a', [b], [default]) with spack.repo.swap(mock_repo): b_spec = Spec('b') @@ -161,15 +161,15 @@ def test_conditional_dep_with_user_constraints(): """ default = ('build', 'link') - y = MockPackage('y', [], []) + mock_repo = MockPackageMultiRepo() + y = mock_repo.add_package('y', [], []) x_on_y_conditions = { y.name: { 'x@2:': 'y' } } - x = MockPackage('x', [y], [default], conditions=x_on_y_conditions) + mock_repo.add_package('x', [y], [default], conditions=x_on_y_conditions) - mock_repo = MockPackageMultiRepo([x, y]) with spack.repo.swap(mock_repo): spec = Spec('x ^y@2') spec.concretize() diff --git a/lib/spack/spack/test/spec_yaml.py b/lib/spack/spack/test/spec_yaml.py index f9b41df19a1..03129a7eb9b 100644 --- a/lib/spack/spack/test/spec_yaml.py +++ b/lib/spack/spack/test/spec_yaml.py @@ -26,7 +26,7 @@ from spack import repo from spack.spec import Spec, save_dependency_spec_yamls from spack.util.spack_yaml import syaml_dict -from spack.test.conftest import MockPackage, MockPackageMultiRepo +from spack.util.mock_package import MockPackageMultiRepo def check_yaml_round_trip(spec): @@ -301,15 +301,14 @@ def test_save_dependency_spec_yamls_subset(tmpdir, config): default = ('build', 'link') - g = MockPackage('g', [], []) - f = MockPackage('f', [], []) - e = MockPackage('e', [], []) - d = MockPackage('d', [f, g], [default, default]) - c = MockPackage('c', [], []) - b = MockPackage('b', [d, e], [default, default]) - a = MockPackage('a', [b, c], [default, default]) - - mock_repo = MockPackageMultiRepo([a, b, c, d, e, f, g]) + mock_repo = MockPackageMultiRepo() + g = mock_repo.add_package('g', [], []) + f = mock_repo.add_package('f', [], []) + e = mock_repo.add_package('e', [], []) + d = mock_repo.add_package('d', [f, g], [default, default]) + c = mock_repo.add_package('c', [], []) + b = mock_repo.add_package('b', [d, e], [default, default]) + mock_repo.add_package('a', [b, c], [default, default]) with repo.swap(mock_repo): spec_a = Spec('a') diff --git a/lib/spack/spack/test/util/mock_package.py b/lib/spack/spack/test/util/mock_package.py new file mode 100644 index 00000000000..376ac581bd5 --- /dev/null +++ b/lib/spack/spack/test/util/mock_package.py @@ -0,0 +1,43 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import spack.repo +from spack.util.mock_package import MockPackageMultiRepo + + +def test_mock_package_possible_dependencies(): + mock_repo = MockPackageMultiRepo() + e = mock_repo.add_package('e') + d = mock_repo.add_package('d', [e]) + c = mock_repo.add_package('c', [d]) + b = mock_repo.add_package('b', [d]) + a = mock_repo.add_package('a', [b, c]) + + with spack.repo.swap(mock_repo): + assert set(a.possible_dependencies()) == set(['a', 'b', 'c', 'd', 'e']) + assert set(b.possible_dependencies()) == set(['b', 'd', 'e']) + assert set(c.possible_dependencies()) == set(['c', 'd', 'e']) + assert set(d.possible_dependencies()) == set(['d', 'e']) + assert set(e.possible_dependencies()) == set(['e']) + + assert set( + a.possible_dependencies(transitive=False)) == set(['a', 'b', 'c']) + assert set( + b.possible_dependencies(transitive=False)) == set(['b', 'd']) + assert set( + c.possible_dependencies(transitive=False)) == set(['c', 'd']) + assert set( + d.possible_dependencies(transitive=False)) == set(['d', 'e']) + assert set( + e.possible_dependencies(transitive=False)) == set(['e']) + + +def test_mock_repo_is_virtual(): + mock_repo = MockPackageMultiRepo() + + # current implementation is always false + assert mock_repo.is_virtual("foo") is False + assert mock_repo.is_virtual("bar") is False + assert mock_repo.is_virtual("baz") is False diff --git a/lib/spack/spack/util/mock_package.py b/lib/spack/spack/util/mock_package.py new file mode 100644 index 00000000000..3d8ae30b103 --- /dev/null +++ b/lib/spack/spack/util/mock_package.py @@ -0,0 +1,161 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +"""Infrastructure used by tests for mocking packages and repos.""" + +import ordereddict_backport + +import spack.util.naming +from spack.dependency import Dependency +from spack.spec import Spec +from spack.version import Version + +__all__ = ["MockPackageMultiRepo"] + + +class MockPackageBase(object): + """Internal base class for mocking ``spack.package.PackageBase``. + + Use ``MockPackageMultiRepo.add_package()`` to create new instances. + + """ + def __init__(self, dependencies, dependency_types, + conditions=None, versions=None): + """Instantiate a new MockPackageBase. + + This is not for general use; it needs to be constructed by a + ``MockPackageMultiRepo``, as we need to know about *all* packages + to find possible depenencies. + + """ + self.spec = None + self._installed_upstream = False + + def provides(self, vname): + return vname in self.provided + + @property + def virtuals_provided(self): + return [v.name for v, c in self.provided] + + @classmethod + def possible_dependencies( + cls, transitive=True, deptype='all', visited=None, virtuals=None): + visited = {} if visited is None else visited + + for name, conditions in cls.dependencies.items(): + # check whether this dependency could be of the type asked for + types = [dep.type for cond, dep in conditions.items()] + types = set.union(*types) + if not any(d in types for d in deptype): + continue + + visited.setdefault(cls.name, set()) + for dep_name in cls.dependencies: + if dep_name in visited: + continue + + visited.setdefault(dep_name, set()) + + if not transitive: + continue + + cls._repo.get(dep_name).possible_dependencies( + transitive, deptype, visited, virtuals) + + return visited + + +class MockPackageMultiRepo(object): + """Mock package repository, mimicking ``spack.repo.Repo``.""" + + def __init__(self): + self.spec_to_pkg = {} + + def get(self, spec): + if not isinstance(spec, spack.spec.Spec): + spec = Spec(spec) + return self.spec_to_pkg[spec.name] + + def get_pkg_class(self, name): + return self.spec_to_pkg[name] + + def exists(self, name): + return name in self.spec_to_pkg + + def is_virtual(self, name): + return False + + def repo_for_pkg(self, name): + import collections + Repo = collections.namedtuple('Repo', ['namespace']) + return Repo('mockrepo') + + def add_package(self, name, dependencies=None, dependency_types=None, + conditions=None): + """Factory method for creating mock packages. + + This creates a new subclass of ``MockPackageBase``, ensures that its + ``name`` and ``__name__`` properties are set up correctly, and + returns a new instance. + + We use a factory function here because many functions and properties + of packages need to be class functions. + + Args: + name (str): name of the new package + dependencies (list): list of mock packages to be dependencies + for this new package (optional; no deps if not provided) + dependency_type (list): list of deptypes for each dependency + (optional; will be default_deptype if not provided) + conditions (list): condition specs for each dependency (optional) + + """ + if not dependencies: + dependencies = [] + + if not dependency_types: + dependency_types = [ + spack.dependency.default_deptype] * len(dependencies) + + assert len(dependencies) == len(dependency_types) + + # new class for the mock package + class MockPackage(MockPackageBase): + pass + MockPackage.__name__ = spack.util.naming.mod_to_class(name) + MockPackage.name = name + MockPackage._repo = self + + # set up dependencies + MockPackage.dependencies = ordereddict_backport.OrderedDict() + for dep, dtype in zip(dependencies, dependency_types): + d = Dependency(MockPackage, Spec(dep.name), type=dtype) + if not conditions or dep.name not in conditions: + MockPackage.dependencies[dep.name] = {Spec(name): d} + else: + dep_conditions = conditions[dep.name] + dep_conditions = dict( + (Spec(x), Dependency(MockPackage, Spec(y), type=dtype)) + for x, y in dep_conditions.items()) + MockPackage.dependencies[dep.name] = dep_conditions + + # each package has some fake versions + versions = list(Version(x) for x in [1, 2, 3]) + MockPackage.versions = dict( + (x, {'preferred': False}) for x in versions + ) + + MockPackage.variants = {} + MockPackage.provided = {} + MockPackage.conflicts = {} + MockPackage.patches = {} + + mock_package = MockPackage( + dependencies, dependency_types, conditions, versions) + self.spec_to_pkg[name] = mock_package + self.spec_to_pkg["mockrepo." + name] = mock_package + + return mock_package From 95a03f6759b99701dfa9bd7c299b838057b5a28a Mon Sep 17 00:00:00 2001 From: Jeffrey Salmond Date: Fri, 24 Apr 2020 08:31:03 +0100 Subject: [PATCH 089/802] Add vscode files to gitignore (#16270) --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index da05b2bcf04..96947860ee0 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,7 @@ lib/spack/spack/test/.cache .project .cproject .pydevproject + +# VSCode files +.vscode +.devcontainer \ No newline at end of file From 051d0d935aeb96f01497356c515877faa8cc8484 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Sat, 25 Apr 2020 01:56:10 +0900 Subject: [PATCH 090/802] Chainer: New Package. (#16251) * Chainer: New Package. * 1. Add maintainers. 2. fix dependency. 3. Add typing-extention@3.6.6 and fix version dependency. * afixed dependency. * remove python dependency for version 6. --- .../builtin/packages/py-chainer/package.py | 36 +++++++++++++++++++ .../packages/py-typing-extensions/package.py | 4 ++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/py-chainer/package.py diff --git a/var/spack/repos/builtin/packages/py-chainer/package.py b/var/spack/repos/builtin/packages/py-chainer/package.py new file mode 100644 index 00000000000..c75383b4694 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-chainer/package.py @@ -0,0 +1,36 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyChainer(PythonPackage): + """ + Chainer is a Python-based deep learning framework aiming at flexibility. + + It provides automatic differentiation APIs based on the define-by-run + approach (a.k.a. dynamic computational graphs) as well as object-oriented + high-level APIs to build and train neural networks. + It also supports CUDA/cuDNN using CuPy for high performance training + and inference. + """ + + homepage = "https://chainer.org/" + url = "https://github.com/chainer/chainer/archive/v7.2.0.tar.gz" + + maintainers = ['adamjstewart'] + + version('7.2.0', sha256='6e2fba648cc5b8a5421e494385b76fe5ec154f1028a1c5908557f5d16c04f0b3') + version('6.7.0', sha256='87cb3378a35e7c5c695028ec91d58dc062356bc91412384ea939d71374610389') + + depends_on('python@3.5.1:', when='@7:', type=('build', 'run')) + depends_on('py-setuptools', type=('build', 'run')) + depends_on('py-numpy@1.9:', type=('build', 'run')) + depends_on('py-six@1.9.0:', type=('build', 'run')) + depends_on('py-typing-extensions', type=('build', 'run')) + depends_on('py-typing-extensions@:3.6.6', when='@:6', type=('build', 'run')) + depends_on('py-filelock', type=('build', 'run')) + depends_on('py-protobuf@3:', type=('build', 'run')) + depends_on('py-typing@:3.6.6', when='@:6', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-typing-extensions/package.py b/var/spack/repos/builtin/packages/py-typing-extensions/package.py index 7a2b3ab5fb1..02376449f03 100644 --- a/var/spack/repos/builtin/packages/py-typing-extensions/package.py +++ b/var/spack/repos/builtin/packages/py-typing-extensions/package.py @@ -17,7 +17,9 @@ class PyTypingExtensions(PythonPackage): version('3.7.4', sha256='2ed632b30bb54fc3941c382decfd0ee4148f5c591651c9272473fea2c6397d95') version('3.7.2', sha256='fb2cd053238d33a8ec939190f30cfd736c00653a85a2919415cecf7dc3d9da71') + version('3.6.6', sha256='51e7b7f3dcabf9ad22eed61490f3b8d23d9922af400fe6656cb08e66656b701f') depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) depends_on('py-setuptools', type='build') - depends_on('py-typing@3.7.4:', when='^python@:3.4', type=('build', 'run')) + depends_on('py-typing@3.7.4:', when='@3.7: ^python@:3.4', type=('build', 'run')) + depends_on('py-typing@3.6.2:', when='^python@:3.4', type=('build', 'run')) From 5828a8f7e6472e01f542f339fc44b7ebfc3edfd9 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 24 Apr 2020 13:24:52 -0700 Subject: [PATCH 091/802] spack env: activate note (#16279) print a note on how to activate a newly created environment --- lib/spack/spack/cmd/env.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index a8bc1e5bbea..43c125e8f24 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -208,10 +208,14 @@ def _env_create(name_or_path, init_file=None, dir=False, with_view=None): env = ev.Environment(name_or_path, init_file, with_view) env.write() tty.msg("Created environment in %s" % env.path) + tty.msg("You can activate this environment with:") + tty.msg(" spack env activate %s" % env.path) else: env = ev.create(name_or_path, init_file, with_view) env.write() tty.msg("Created environment '%s' in %s" % (name_or_path, env.path)) + tty.msg("You can activate this environment with:") + tty.msg(" spack env activate %s" % (name_or_path)) return env From 0606091775a52ae233d5450f153956b3c6b96dac Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 19:59:15 -0500 Subject: [PATCH 092/802] py-tqdm: add new version (#16284) --- var/spack/repos/builtin/packages/py-tqdm/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-tqdm/package.py b/var/spack/repos/builtin/packages/py-tqdm/package.py index be2ed3cecb1..ff7b9947590 100644 --- a/var/spack/repos/builtin/packages/py-tqdm/package.py +++ b/var/spack/repos/builtin/packages/py-tqdm/package.py @@ -10,8 +10,9 @@ class PyTqdm(PythonPackage): """A Fast, Extensible Progress Meter""" homepage = "https://github.com/tqdm/tqdm" - url = "https://pypi.io/packages/source/t/tqdm/tqdm-4.36.1.tar.gz" + url = "https://pypi.io/packages/source/t/tqdm/tqdm-4.45.0.tar.gz" + version('4.45.0', sha256='00339634a22c10a7a22476ee946bbde2dbe48d042ded784e4d88e0236eca5d81') version('4.36.1', sha256='abc25d0ce2397d070ef07d8c7e706aede7920da163c64997585d42d3537ece3d') version('4.8.4', sha256='bab05f8bb6efd2702ab6c532e5e6a758a66c0d2f443e09784b73e4066e6b3a37') From 89914f521e878e10adc168403e6f3468b6e89945 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 19:59:30 -0500 Subject: [PATCH 093/802] py-wheel: add new version (#16285) --- var/spack/repos/builtin/packages/py-wheel/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-wheel/package.py b/var/spack/repos/builtin/packages/py-wheel/package.py index 567eefbc520..476b7b9e07a 100644 --- a/var/spack/repos/builtin/packages/py-wheel/package.py +++ b/var/spack/repos/builtin/packages/py-wheel/package.py @@ -14,6 +14,7 @@ class PyWheel(PythonPackage): version('0.33.4', sha256='62fcfa03d45b5b722539ccbc07b190e4bfff4bb9e3a4d470dd9f6a0981002565') version('0.33.1', sha256='66a8fd76f28977bb664b098372daef2b27f60dc4d1688cfab7b37a09448f0e9d') + version('0.32.3', sha256='029703bf514e16c8271c3821806a1c171220cc5bdd325cbf4e7da1e056a01db6') version('0.29.0', sha256='1ebb8ad7e26b448e9caa4773d2357849bf80ff9e313964bcaf79cbf0201a1648') version('0.26.0', sha256='eaad353805c180a47545a256e6508835b65a8e830ba1093ed8162f19a50a530c') From 441c16bafb935a69e64e121bcc8ac3d952e03db1 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 19:59:48 -0500 Subject: [PATCH 094/802] py-blis: add new package (#16286) --- .../repos/builtin/packages/py-blis/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-blis/package.py diff --git a/var/spack/repos/builtin/packages/py-blis/package.py b/var/spack/repos/builtin/packages/py-blis/package.py new file mode 100644 index 00000000000..ce7f6c4c655 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-blis/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyBlis(PythonPackage): + """Cython BLIS: Fast BLAS-like operations from Python and Cython, + without the tears""" + + homepage = "https://github.com/explosion/cython-blis" + url = "https://pypi.io/packages/source/b/blis/blis-0.4.1.tar.gz" + + version('0.4.1', sha256='d69257d317e86f34a7f230a2fd1f021fd2a1b944137f40d8cdbb23bd334cd0c4') + + depends_on('py-setuptools', type='build') + depends_on('py-numpy@1.15:', type=('build', 'run')) + depends_on('py-hypothesis', type='test') From 3153610bb8200a2a9f528cc5ad95e166f2b17b95 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 20:00:02 -0500 Subject: [PATCH 095/802] py-catalogue: add new package (#16287) --- .../builtin/packages/py-catalogue/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-catalogue/package.py diff --git a/var/spack/repos/builtin/packages/py-catalogue/package.py b/var/spack/repos/builtin/packages/py-catalogue/package.py new file mode 100644 index 00000000000..799f5bb2ff3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-catalogue/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyCatalogue(PythonPackage): + """catalogue: Super lightweight function registries for your library.""" + + homepage = "https://github.com/explosion/catalogue" + url = "https://pypi.io/packages/source/c/catalogue/catalogue-2.0.0.tar.gz" + + version('2.0.0', sha256='34f8416ec5e7ed08e55c10414416e67c3f4d66edf83bc67320c3290775293816') + version('1.0.0', sha256='d74d1d856c6b36a37bf14aa6dbbc27d0582667b7ab979a6108e61a575e8723f5') + + depends_on('python@3.6:', when='@2:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-importlib-metadata@0.20:', when='^python@:3.7', type=('build', 'run')) From ab87617d5513a1345e773f9b64fe4754557e6c1b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 20:00:15 -0500 Subject: [PATCH 096/802] py-cymem: add new package (#16288) --- .../repos/builtin/packages/py-cymem/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-cymem/package.py diff --git a/var/spack/repos/builtin/packages/py-cymem/package.py b/var/spack/repos/builtin/packages/py-cymem/package.py new file mode 100644 index 00000000000..fa076b88361 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cymem/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyCymem(PythonPackage): + """Manage calls to calloc/free through Cython.""" + + homepage = "https://github.com/explosion/cymem" + url = "https://pypi.io/packages/source/c/cymem/cymem-2.0.3.tar.gz" + + version('2.0.3', sha256='5083b2ab5fe13ced094a82e0df465e2dbbd9b1c013288888035e24fd6eb4ed01') + + depends_on('py-setuptools', type='build') + depends_on('py-wheel@0.32.0:0.32.999', type='build') From 0ee023d29f613f718f5b88c158b120adb8b2fe2e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 20:00:28 -0500 Subject: [PATCH 097/802] py-murmurhash: add new package (#16289) --- .../builtin/packages/py-murmurhash/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-murmurhash/package.py diff --git a/var/spack/repos/builtin/packages/py-murmurhash/package.py b/var/spack/repos/builtin/packages/py-murmurhash/package.py new file mode 100644 index 00000000000..3cb59de262c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-murmurhash/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyMurmurhash(PythonPackage): + """Cython bindings for MurmurHash.""" + + homepage = "https://github.com/explosion/murmurhash" + url = "https://pypi.io/packages/source/m/murmurhash/murmurhash-1.0.2.tar.gz" + + version('1.0.2', sha256='c7a646f6b07b033642b4f52ae2e45efd8b80780b3b90e8092a0cec935fbf81e2') + + depends_on('py-setuptools', type='build') + depends_on('py-wheel@0.32.0:0.32.999', type='build') From 510d8821e5e7d59481b1c8e882226aa5cec1a3b7 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 20:00:42 -0500 Subject: [PATCH 098/802] py-nltk: add new package (#16290) --- .../repos/builtin/packages/py-nltk/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-nltk/package.py diff --git a/var/spack/repos/builtin/packages/py-nltk/package.py b/var/spack/repos/builtin/packages/py-nltk/package.py new file mode 100644 index 00000000000..9dbbcc26515 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-nltk/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyNltk(PythonPackage): + """The Natural Language Toolkit (NLTK) is a Python package for + natural language processing.""" + + homepage = "https://www.nltk.org/" + url = "https://pypi.io/packages/source/n/nltk/nltk-3.5.zip" + + version('3.5', sha256='845365449cd8c5f9731f7cb9f8bd6fd0767553b9d53af9eb1b3abf7700936b35') + + depends_on('python@3.5:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-click', type=('build', 'run')) + depends_on('py-regex', type=('build', 'run')) + depends_on('py-tqdm', type=('build', 'run')) + + # May require additional third-party software: + # https://github.com/nltk/nltk/wiki/Installing-Third-Party-Software From 7a2f47d1815be83902d2b063e9b1b4ebaf9eaa4b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 20:00:55 -0500 Subject: [PATCH 099/802] py-plac: add new package (#16291) --- .../repos/builtin/packages/py-plac/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-plac/package.py diff --git a/var/spack/repos/builtin/packages/py-plac/package.py b/var/spack/repos/builtin/packages/py-plac/package.py new file mode 100644 index 00000000000..098dbb65c3d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-plac/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyPlac(PythonPackage): + """The smartest command line arguments parser in the world.""" + + homepage = "https://github.com/micheles/plac" + url = "https://pypi.io/packages/source/p/plac/plac-1.1.3.tar.gz" + + version('1.1.3', sha256='398cb947c60c4c25e275e1f1dadf027e7096858fb260b8ece3b33bcff90d985f') + + depends_on('py-setuptools', type='build') + depends_on('py-argparse', type=('build', 'run')) From dbd0fe8190ab373cdc6d386767d3deea91ee9b8b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 20:01:09 -0500 Subject: [PATCH 100/802] py-wasabi: add new package (#16296) --- .../repos/builtin/packages/py-wasabi/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-wasabi/package.py diff --git a/var/spack/repos/builtin/packages/py-wasabi/package.py b/var/spack/repos/builtin/packages/py-wasabi/package.py new file mode 100644 index 00000000000..c03d14f3e1b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-wasabi/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyWasabi(PythonPackage): + """wasabi: A lightweight console printing and formatting toolkit.""" + + homepage = "https://ines.io/" + url = "https://pypi.io/packages/source/w/wasabi/wasabi-0.6.0.tar.gz" + + version('0.6.0', sha256='b8dd3e963cd693fde1eb6bfbecf51790171aa3534fa299faf35cf269f2fd6063') + + depends_on('py-setuptools', type='build') + depends_on('py-pytest', type='test') From d0ccab7d176619c9803fd25c579f895cc2a6dfa7 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 20:01:22 -0500 Subject: [PATCH 101/802] py-srsly: add new package (#16294) --- .../builtin/packages/py-srsly/package.py | 29 +++++++++++++++++++ .../packages/py-srsly/subprocess.patch | 12 ++++++++ 2 files changed, 41 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-srsly/package.py create mode 100644 var/spack/repos/builtin/packages/py-srsly/subprocess.patch diff --git a/var/spack/repos/builtin/packages/py-srsly/package.py b/var/spack/repos/builtin/packages/py-srsly/package.py new file mode 100644 index 00000000000..46b1b50af05 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-srsly/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PySrsly(PythonPackage): + """srsly: Modern high-performance serialization utilities for Python.""" + + homepage = "https://github.com/explosion/srsly" + url = "https://pypi.io/packages/source/s/srsly/srsly-2.0.1.tar.gz" + + version('2.0.1', sha256='fa3c7375be8fe75f23c27feafbfb5f738d55ffdbf02964c6896fb7684f519a52') + version('2.0.0', sha256='785b00e00406120dbef4ca82925051e6b60fe870c5f84f0d22b3632d574eb870') + version('1.0.2', sha256='59258b81d567df207f8a0a33c4b5fa232afccf1d927c8ce3ba5395bfd64c0ed8') + + depends_on('python@3.6:', when='@2:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-wheel', when='@2:', type='build') + depends_on('py-cython@0.25:', when='@2:', type='build') + depends_on('py-pathlib@1.0.1', when='^python@:3.3', type=('build', 'run')) + depends_on('py-pytest', type='test') + depends_on('py-mock', type='test') + depends_on('py-numpy', type='test') + depends_on('py-six', when='@:1', type='test') + depends_on('py-pytz', when='@:1', type='test') + + # https://github.com/explosion/srsly/pull/24 + patch('subprocess.patch', when='@2.0.0:2.0.1') diff --git a/var/spack/repos/builtin/packages/py-srsly/subprocess.patch b/var/spack/repos/builtin/packages/py-srsly/subprocess.patch new file mode 100644 index 00000000000..50a053d7548 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-srsly/subprocess.patch @@ -0,0 +1,12 @@ +diff -Naur a/srsly/tests/cloudpickle/testutils.py b/srsly/tests/cloudpickle/testutils.py +--- a/srsly/tests/cloudpickle/testutils.py 2020-04-24 16:10:43.000000000 -0500 ++++ b/srsly/tests/cloudpickle/testutils.py 2020-04-24 16:11:02.000000000 -0500 +@@ -5,7 +5,7 @@ + from subprocess import Popen, check_output, PIPE, STDOUT, CalledProcessError + from srsly.cloudpickle.cloudpickle import dumps + from pickle import loads +-from suprocess import TimeoutExpired ++from subprocess import TimeoutExpired + + + TEST_GLOBALS = "a test value" From b5bf816577005541f29bde1cbca77427b36992b2 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 21:24:33 -0500 Subject: [PATCH 102/802] py-preshed: add new package (#16292) --- .../builtin/packages/py-preshed/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-preshed/package.py diff --git a/var/spack/repos/builtin/packages/py-preshed/package.py b/var/spack/repos/builtin/packages/py-preshed/package.py new file mode 100644 index 00000000000..cb8cc2ed10b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-preshed/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyPreshed(PythonPackage): + """preshed: Cython Hash Table for Pre-Hashed Keys.""" + + homepage = "https://github.com/explosion/preshed" + url = "https://pypi.io/packages/source/p/preshed/preshed-3.0.2.tar.gz" + + version('3.0.2', sha256='61d73468c97c1d6d5a048de0b01d5a6fd052123358aca4823cdb277e436436cb') + + depends_on('py-setuptools', type='build') + depends_on('py-cymem@2.0.2:2.0.999', type=('build', 'run')) + depends_on('py-murmurhash@0.28:1.0', type=('build', 'run')) + depends_on('py-pytest', type='test') From 914f380bb69cd38432a9f189a2805bc6deb3559d Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Fri, 24 Apr 2020 19:25:48 -0700 Subject: [PATCH 103/802] Improved the accuracy of the dependencies for the 'visit' package. (#16297) Added a fix for the 'visit' package when building variant '@3%gcc'. --- .../repos/builtin/packages/visit/package.py | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index 1ee2994c21c..aa791284c0b 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -33,7 +33,8 @@ class Visit(CMakePackage): patch('parallel-hdf5.patch', when='+hdf5+mpi') depends_on('cmake@3.0:', type='build') - depends_on('vtk@8.1.0:+opengl2', when='@3.0:3.0.1') + # https://github.com/visit-dav/visit/issues/3498 + depends_on('vtk@8.1.0:8.1.999+opengl2', when='@3.0:3.0.1') depends_on('vtk@6.1.0~opengl2', when='@:2.999') depends_on('vtk+python', when='+python @3.0:') depends_on('vtk~mpi', when='~mpi') @@ -42,7 +43,11 @@ class Visit(CMakePackage): depends_on('qt@5.10:', when='+gui @3.0:') depends_on('qwt', when='+gui') depends_on('python@2.6:2.8', when='+python') - depends_on('silo+shared', when='+silo') + # VisIt uses Silo's 'ghost zone' data structures, which are only available + # in v4.10+ releases: https://wci.llnl.gov/simulation/computer-codes/silo/releases/release-notes-4.10 + depends_on('silo@4.10:+shared', when='+silo') + depends_on('silo~mpi', when='+silo~mpi') + depends_on('silo+mpi', when='+silo+mpi') depends_on('hdf5~mpi', when='+hdf5~mpi') depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('mpi', when='+mpi') @@ -66,14 +71,23 @@ def patch(self): def cmake_args(self): spec = self.spec + cxx_flags = [self.compiler.cxx_pic_flag] + cc_flags = [self.compiler.cc_pic_flag] + + # NOTE: This is necessary in order to allow VisIt to compile a couple + # of lines of code with 'const char*' to/from 'char*' conversions. + if spec.satisfies('@3:%gcc'): + cxx_flags.append('-fpermissive') + cc_flags.append('-fpermissive') + args = [ '-DVTK_MAJOR_VERSION=' + str(spec['vtk'].version[0]), '-DVTK_MINOR_VERSION=' + str(spec['vtk'].version[1]), '-DVISIT_VTK_DIR:PATH=' + spec['vtk'].prefix, '-DVISIT_ZLIB_DIR:PATH=' + spec['zlib'].prefix, '-DVISIT_USE_GLEW=OFF', - '-DCMAKE_CXX_FLAGS=' + self.compiler.cxx_pic_flag, - '-DCMAKE_C_FLAGS=' + self.compiler.cc_pic_flag, + '-DCMAKE_CXX_FLAGS=' + ' '.join(cxx_flags), + '-DCMAKE_C_FLAGS=' + ' '.join(cc_flags), ] if '+python' in spec: From 5fce2ac96b873d51c19a24c3730a0d22ada6f378 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Apr 2020 23:50:56 -0500 Subject: [PATCH 104/802] py-thinc: add new package (#16295) --- .../builtin/packages/py-thinc/package.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-thinc/package.py diff --git a/var/spack/repos/builtin/packages/py-thinc/package.py b/var/spack/repos/builtin/packages/py-thinc/package.py new file mode 100644 index 00000000000..b081c9db395 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-thinc/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyThinc(PythonPackage): + """Thinc: Practical Machine Learning for NLP in Python.""" + + homepage = "https://github.com/explosion/thinc" + url = "https://pypi.io/packages/source/t/thinc/thinc-7.4.0.tar.gz" + + version('7.4.0', sha256='523e9be1bfaa3ed1d03d406ce451b6b4793a9719d5b83d2ea6b3398b96bc58b8') + + depends_on('py-setuptools', type='build') + depends_on('py-murmurhash@0.28:1.0', type=('build', 'run')) + depends_on('py-cymem@2.0.2:2.0.999', type=('build', 'run')) + depends_on('py-preshed@1.0.1:3.0', type=('build', 'run')) + depends_on('py-blis@0.4.0:0.4.999', type=('build', 'run')) + depends_on('py-wasabi@0.0.9:1.0', type=('build', 'run')) + depends_on('py-srsly@0.0.6:1.0', type=('build', 'run')) + depends_on('py-catalogue@0.0.7:1.0', type=('build', 'run')) + depends_on('py-numpy@1.7:', type=('build', 'run')) + depends_on('py-plac@0.9.6:1.1', type=('build', 'run')) + depends_on('py-tqdm@4.10:4.999', type=('build', 'run')) + depends_on('py-pathlib@1.0.1', when='^python@:3.3', type=('build', 'run')) + depends_on('py-pytest', type='test') + depends_on('py-mock', type='test') + depends_on('py-hypothesis', type='test') From b796d2736caaee4c077c5971be92f66bb5d5477d Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Sat, 25 Apr 2020 09:35:33 -0600 Subject: [PATCH 105/802] Version bump: jdk 14 (#15821) --- var/spack/repos/builtin/packages/jdk/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py index 025d12be659..92af25ae9b6 100644 --- a/var/spack/repos/builtin/packages/jdk/package.py +++ b/var/spack/repos/builtin/packages/jdk/package.py @@ -32,6 +32,8 @@ class Jdk(Package): # found in a link above. The build number can be deciphered from the URL. # Alternatively, run `bin/java -version` after extracting. Replace '+' # symbol in version with '_', otherwise it will be interpreted as a variant + version('14_36', sha256='4639bbaecc9cc606f1a4b99fda1efcaefcbf57a7025b3828b095093a6c866afd', + url='https://download.oracle.com/otn-pub/java/jdk/14+36/076bab302c7b4508975440c56f6cc26a/jdk-14_linux-x64_bin.tar.gz') version('12.0.2_10', sha256='2dde6fda89a4ec6e6560ed464e917861c9e40bf576e7a64856dafc55abaaff51', url='https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz') version('12.0.1_12', sha256='9fd6dcdaf2cfca7da59e39b009a0f5bcd53bec2fb16105f7ca8d689cdab68d75', @@ -57,6 +59,7 @@ class Jdk(Package): version('1.8.0_131-b11', sha256='62b215bdfb48bace523723cdbb2157c665e6a25429c73828a32f00e587301236', url='https://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz') + provides('java@14', when='@14.0:14.999') provides('java@12', when='@12.0:12.999') provides('java@11', when='@11.0:11.999') provides('java@10', when='@10.0:10.999') From 9bd0b0fbe13ee7bb8feaa043df01b9a8fd60c19e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 25 Apr 2020 10:35:57 -0500 Subject: [PATCH 106/802] py-spacy: add new package (#16293) --- .../builtin/packages/py-spacy/package.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-spacy/package.py diff --git a/var/spack/repos/builtin/packages/py-spacy/package.py b/var/spack/repos/builtin/packages/py-spacy/package.py new file mode 100644 index 00000000000..9e343e4e0da --- /dev/null +++ b/var/spack/repos/builtin/packages/py-spacy/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PySpacy(PythonPackage): + """spaCy is a library for advanced Natural Language Processing in + Python and Cython.""" + + homepage = "https://spacy.io/" + url = "https://pypi.io/packages/source/s/spacy/spacy-2.2.4.tar.gz" + + version('2.2.4', sha256='f0f3a67c5841e6e35d62c98f40ebb3d132587d3aba4f4dccac5056c4e90ff5b9') + + depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) + depends_on('py-wheel', type='build') + depends_on('py-cython@0.25:', type='build') + depends_on('py-murmurhash@0.28:1.0', type=('build', 'run')) + depends_on('py-cymem@2.0.2:2.0.999', type=('build', 'run')) + depends_on('py-preshed@3.0.2:3.0.999', type=('build', 'run')) + depends_on('py-thinc@7.4.0', type=('build', 'run')) + depends_on('py-blis@0.4.0:0.4.999', type=('build', 'run')) + depends_on('py-srsly@1.0.2:1.0.999', type=('build', 'run')) + depends_on('py-catalogue@0.0.7:1.0', type=('build', 'run')) + depends_on('py-tqdm@4.38:4.999', type=('build', 'run')) + depends_on('py-setuptools', type=('build', 'run')) + depends_on('py-numpy@1.15:', type=('build', 'run')) + depends_on('py-plac@0.9.6:1.1', type=('build', 'run')) + depends_on('py-requests@2.13:2.999', type=('build', 'run')) + depends_on('py-pathlib@1.0.1', when='^python@:3.3', type=('build', 'run')) From 9b0e4cd20b373678a37e27612fe16e66aa819600 Mon Sep 17 00:00:00 2001 From: Sajid Ali <30510036+s-sajid-ali@users.noreply.github.com> Date: Sat, 25 Apr 2020 12:39:33 -0500 Subject: [PATCH 107/802] ucx : add version, modify variants (#16252) * fixes * remove extra newline --- var/spack/repos/builtin/packages/ucx/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/ucx/package.py b/var/spack/repos/builtin/packages/ucx/package.py index 7def88bd883..b345107c29c 100644 --- a/var/spack/repos/builtin/packages/ucx/package.py +++ b/var/spack/repos/builtin/packages/ucx/package.py @@ -16,6 +16,7 @@ class Ucx(AutotoolsPackage): maintainers = ['hppritcha'] # Current + version('1.8.0', sha256='e400f7aa5354971c8f5ac6b881dc2846143851df868088c37d432c076445628d') version('1.7.0', sha256='6ab81ee187bfd554fe7e549da93a11bfac420df87d99ee61ffab7bb19bdd3371') version('1.6.1', sha256='1425648aa03f5fa40e4bc5c4a5a83fe0292e2fe44f6054352fbebbf6d8f342a1') version('1.6.0', sha256='360e885dd7f706a19b673035a3477397d100a02eb618371697c7f3ee4e143e2c') @@ -43,11 +44,15 @@ class Ucx(AutotoolsPackage): description='Enable assertions') variant('parameter_checking', default=False, description='Enable paramter checking') - variant('pic', default=False, + variant('pic', default=True, description='Builds with PIC support') + variant('java', default=False, + description='Builds with Java bindings') depends_on('numactl') depends_on('rdma-core') + depends_on('java@8', when='+java') + depends_on('maven', when='+java') def configure_args(self): spec = self.spec @@ -82,4 +87,9 @@ def configure_args(self): else: config_args.append('--without-pic') + if '+java' in spec: + config_args.append('--with-java=%s' % spec['java'].prefix) + else: + config_args.append('--without-java') + return config_args From b5be99cdb74490fc0619b52d4c358a1bba64172d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 25 Apr 2020 15:42:40 -0500 Subject: [PATCH 108/802] libyaml: add new version (#16300) --- var/spack/repos/builtin/packages/libyaml/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libyaml/package.py b/var/spack/repos/builtin/packages/libyaml/package.py index d795b2f8a6f..26686dbd524 100644 --- a/var/spack/repos/builtin/packages/libyaml/package.py +++ b/var/spack/repos/builtin/packages/libyaml/package.py @@ -10,10 +10,12 @@ class Libyaml(AutotoolsPackage): """A C library for parsing and emitting YAML.""" homepage = "https://pyyaml.org/wiki/LibYAML" - url = "https://pyyaml.org/download/libyaml/yaml-0.2.2.tar.gz" + url = "https://pyyaml.org/download/libyaml/yaml-0.2.4.tar.gz" git = "https://github.com/yaml/libyaml.git" version('master', branch='master') + version('0.2.4', sha256='d80aeda8747b7c26fbbfd87ab687786e58394a8435ae3970e79cb97882e30557') + version('0.2.3', sha256='08bbb80284d77092e68a6f69f1e480e8ed93e215c47b2ca29290e3bd5a191108') version('0.2.2', sha256='4a9100ab61047fd9bd395bcef3ce5403365cafd55c1e0d0299cde14958e47be9') version('0.2.1', sha256='78281145641a080fb32d6e7a87b9c0664d611dcb4d542e90baf731f51cbb59cd') version('0.1.7', sha256='8088e457264a98ba451a90b8661fcb4f9d6f478f7265d48322a196cec2480729') From 4cd537f6c7153675fde2ce0bb66a2fb9e9fc0a9a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 25 Apr 2020 15:43:14 -0500 Subject: [PATCH 109/802] py-pyyaml: add new version and variant (#16301) --- .../builtin/packages/py-pyyaml/package.py | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pyyaml/package.py b/var/spack/repos/builtin/packages/py-pyyaml/package.py index d7a08ca1b8f..2b00de2d9b0 100644 --- a/var/spack/repos/builtin/packages/py-pyyaml/package.py +++ b/var/spack/repos/builtin/packages/py-pyyaml/package.py @@ -9,14 +9,28 @@ class PyPyyaml(PythonPackage): """PyYAML is a YAML parser and emitter for Python.""" - homepage = "http://pyyaml.org/wiki/PyYAML" - url = "https://pypi.io/packages/source/P/PyYAML/PyYAML-5.1.2.tar.gz" + homepage = "https://pyyaml.org/wiki/PyYAML" + url = "https://pypi.io/packages/source/P/PyYAML/PyYAML-5.3.1.tar.gz" + version('5.3.1', sha256='b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d') version('5.1.2', sha256='01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4') version('5.1', sha256='436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95') version('3.13', sha256='3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf') version('3.12', sha256='592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab') version('3.11', sha256='c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8') - depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) - depends_on('libyaml') + variant('libyaml', default=True, description='Use libYAML bindings') + + depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) + depends_on('libyaml', when='+libyaml') + + def setup_py(self, *args, **kwargs): + # Cast from tuple to list + args = list(args) + + if '+libyaml' in self.spec: + args.insert(0, '--with-libyaml') + else: + args.insert(0, '--without-libyaml') + + super(PyPyyaml, self).setup_py(*args, **kwargs) From 75042c381c9fd1412f0fce99aab9ebd43fd528c8 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sat, 25 Apr 2020 21:36:08 -0700 Subject: [PATCH 110/802] LLVM lldb 10.0: Python Link Dependency (#16299) * LLVM: Python Dependency Effort to expose the linked python library when building LLVM. This might fix the forward propagation of libintl that comes with the static python library build on darwin. * LLDB Py: Remove Ignored Old Flags Changed in LLVM 10.0+ --- var/spack/repos/builtin/packages/llvm/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index bf8a77933c1..53ce3e12c29 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -287,8 +287,12 @@ def cmake_args(self): if "+python" in spec and "+lldb" in spec and spec.satisfies("@5.0.0:"): cmake_args.append("-DLLDB_USE_SYSTEM_SIX:Bool=TRUE") - if "~python" in spec and "+lldb" in spec: - cmake_args.append("-DLLDB_DISABLE_PYTHON:Bool=TRUE") + if "+lldb" in spec and spec.satisfies("@:9.9.9"): + cmake_args.append("-DLLDB_DISABLE_PYTHON:Bool={0}".format( + 'ON' if '~python' in spec else 'OFF')) + if "+lldb" in spec and spec.satisfies("@10.0.0:"): + cmake_args.append("-DLLDB_ENABLE_PYTHON:Bool={0}".format( + 'ON' if '+python' in spec else 'OFF')) if "+gold" in spec: cmake_args.append( From 63a0647282da89a31244ecba920329d48f13990b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 26 Apr 2020 11:29:52 -0500 Subject: [PATCH 111/802] PyTorch: disable XNNPACK build (#16304) --- var/spack/repos/builtin/packages/py-torch/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index f786ad14bc5..7329ba91741 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -74,6 +74,7 @@ class PyTorch(PythonPackage, CudaPackage): variant('mkldnn', default=True, description='Enables use of MKLDNN') variant('nnpack', default=False, description='Enables NNPACK build') variant('qnnpack', default=False, description='Enables QNNPACK build (quantized 8-bit operators)') + variant('xnnpack', default=False, description='Enables XNNPACK build') variant('distributed', default=False, description='Enables distributed (c10d, gloo, mpi, etc.) build') variant('nccl', default=True, description='Use Spack-installed NCCL') variant('caffe2', default=False, description='Enables Caffe2 operators build') @@ -94,6 +95,7 @@ class PyTorch(PythonPackage, CudaPackage): conflicts('+miopen', when='@:0.4') conflicts('+mkldnn', when='@:0.3') conflicts('+qnnpack', when='@:0.4') + conflicts('+xnnpack', when='@:1.4') conflicts('+nccl', when='~cuda') conflicts('+opencv', when='@:0.4') conflicts('+ffmpeg', when='@:0.4') @@ -149,6 +151,8 @@ class PyTorch(PythonPackage, CudaPackage): # TODO: add dependency: https://github.com/Maratyszcza/NNPACK # depends_on('nnpack', when='+nnpack') depends_on('qnnpack', when='+qnnpack') + # TODO: add dependency: https://github.com/google/XNNPACK + # depends_on('xnnpack', when='+xnnpack') depends_on('mpi', when='+distributed') depends_on('nccl', when='+nccl') depends_on('gloo', when='+gloo') @@ -239,6 +243,7 @@ def enable_or_disable(variant, keyword='USE', var=None, newer=False): enable_or_disable('nnpack') enable_or_disable('qnnpack') + enable_or_disable('xnnpack') enable_or_disable('distributed') enable_or_disable('nccl') From 31e8d646afd825b07a7ec571403c2ebc588f65c1 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sun, 26 Apr 2020 09:45:04 -0700 Subject: [PATCH 112/802] py-h5py: master (new version) (#16306) Add the `master` branch of h5py as a version. --- var/spack/repos/builtin/packages/py-h5py/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index 5f05081de17..e652849fd1e 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -12,9 +12,11 @@ class PyH5py(PythonPackage): homepage = "http://www.h5py.org/" url = "https://pypi.io/packages/source/h/h5py/h5py-2.10.0.tar.gz" + git = "https://github.com/h5py/h5py.git" import_modules = ['h5py', 'h5py._hl'] + version('master', branch='master') version('2.10.0', sha256='84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d') version('2.9.0', sha256='9d41ca62daf36d6b6515ab8765e4c8c4388ee18e2a665701fef2b41563821002') version('2.8.0', sha256='e626c65a8587921ebc7fb8d31a49addfdd0b9a9aa96315ea484c09803337b955') From f20202387680aa00767cc76d89ee71701f7d9e44 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sun, 26 Apr 2020 09:46:40 -0700 Subject: [PATCH 113/802] py-blosc (new package) (#16307) Add the py-blosc python package. --- .../builtin/packages/py-blosc/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-blosc/package.py diff --git a/var/spack/repos/builtin/packages/py-blosc/package.py b/var/spack/repos/builtin/packages/py-blosc/package.py new file mode 100644 index 00000000000..da185302ff4 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-blosc/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyBlosc(PythonPackage): + """A Python wrapper for the extremely fast Blosc compression library""" + + homepage = "http://python-blosc.blosc.org" + url = "https://github.com/Blosc/python-blosc/archive/v1.9.1.tar.gz" + git = "https://github.com/Blosc/python-blosc.git" + + version('1.9.1', sha256='ffc884439a12409aa4e8945e21dc920d6bc21807357c51d24c7f0a27ae4f79b9') + + depends_on('cmake@3.11.0:', type='build') + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-scikit-build', type='build') + # depends_on('c-blosc') # shipped internally + depends_on('py-numpy', type='test') + depends_on('py-psutil', type='test') From e8efeda14acbfd0c2c9ca1cc9641b3a1a632809e Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sun, 26 Apr 2020 15:08:21 -0700 Subject: [PATCH 114/802] py-profilehooks (new package) (#16305) Adds the py-profilehooks package. --- .../packages/py-profilehooks/package.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-profilehooks/package.py diff --git a/var/spack/repos/builtin/packages/py-profilehooks/package.py b/var/spack/repos/builtin/packages/py-profilehooks/package.py new file mode 100644 index 00000000000..47b52a455c7 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-profilehooks/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyProfilehooks(PythonPackage): + """Python decorators for profiling/tracing/timing a single function""" + + homepage = "https://mg.pov.lt/profilehooks/" + url = "https://pypi.io/packages/source/p/profilehooks/profilehooks-1.11.2.tar.gz" + + git = "https://github.com/mgedmin/profilehooks.git" + + version('1.11.2', sha256='41a74c1abdc5eeaf7dec024e9e89627f70e158374d263a3098bef31a06d38ab2') + + depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) + depends_on('py-setuptools', type='build') From af7e323f6749198baf3fa5c6e486d1d5e21d6fe9 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sun, 26 Apr 2020 17:06:27 -0700 Subject: [PATCH 115/802] libbsd: mirror (#16313) Add a mirror for `libbsd` to improve fetch stability. libbsd.freedesktop.org sometimes failes in my nightly CI/CD scripts. --- var/spack/repos/builtin/packages/libbsd/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libbsd/package.py b/var/spack/repos/builtin/packages/libbsd/package.py index ce99e985976..8ea91f4d5ab 100644 --- a/var/spack/repos/builtin/packages/libbsd/package.py +++ b/var/spack/repos/builtin/packages/libbsd/package.py @@ -14,7 +14,10 @@ class Libbsd(AutotoolsPackage): """ homepage = "https://libbsd.freedesktop.org/wiki/" - url = "https://libbsd.freedesktop.org/releases/libbsd-0.9.1.tar.xz" + urls = [ + "https://libbsd.freedesktop.org/releases/libbsd-0.9.1.tar.xz", + "https://mirrors.dotsrc.org/pub/mirrors/exherbo/libbsd-0.9.1.tar.xz" + ] version('0.10.0', sha256='34b8adc726883d0e85b3118fa13605e179a62b31ba51f676136ecb2d0bc1a887') version('0.9.1', sha256='56d835742327d69faccd16955a60b6dcf30684a8da518c4eca0ac713b9e0a7a4') From 199ce66a3c42c9351064019059a490809223c4e4 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sun, 26 Apr 2020 17:06:37 -0700 Subject: [PATCH 116/802] libpciaccess: mirror (#16312) Support mirrors for libpciaccess downloads. --- var/spack/repos/builtin/packages/libpciaccess/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/libpciaccess/package.py b/var/spack/repos/builtin/packages/libpciaccess/package.py index 874db157210..4f1337db763 100644 --- a/var/spack/repos/builtin/packages/libpciaccess/package.py +++ b/var/spack/repos/builtin/packages/libpciaccess/package.py @@ -6,11 +6,11 @@ from spack import * -class Libpciaccess(AutotoolsPackage): +class Libpciaccess(AutotoolsPackage, XorgPackage): """Generic PCI access library.""" homepage = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" - url = "http://xorg.freedesktop.org/archive/individual/lib/libpciaccess-0.13.5.tar.gz" + xorg_mirror_path = "lib/libpciaccess-0.13.5.tar.gz" version('0.13.5', sha256='fe26ec788732b4ef60b550f2d3fa51c605d27f646e18ecec878f061807a3526e') version('0.13.4', sha256='74d92bda448e6fdb64fee4e0091255f48d625d07146a121653022ed3a0ca1f2f') From 4f3cc19ec7dca204f3c3b75fb838142b567f27e0 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sun, 26 Apr 2020 17:07:13 -0700 Subject: [PATCH 117/802] qt: fix macOS w/ AppleClang (mesa libs) (#16302) Building the `py-jupyter` stack on macOS with AppleClang breaks on the `py-qtconsole` -> `py-qtconsole` -> `qt +opengl` package build environment setup with: ``` ==> Error: AttributeError: Query of package 'mesa' for 'libs' failed ... ==> Error: Failed to install qt due to ChildError: AttributeError: Query of package 'mesa' for 'libs' failed ``` This tries to add more library targets build by `mesa` to avoid this. --- var/spack/repos/builtin/packages/mesa/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py index 5a2893a645c..b277a03d194 100644 --- a/var/spack/repos/builtin/packages/mesa/package.py +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -13,6 +13,7 @@ class Mesa(AutotoolsPackage): - a system for rendering interactive 3D graphics.""" homepage = "http://www.mesa3d.org" + maintainers = ['v-dobrev'] # Note that we always want to build from the git repo instead of a # tarball since the tarball has pre-generated files for certain versions @@ -180,7 +181,8 @@ def configure_args(self): @property def libs(self): for dir in ['lib64', 'lib']: - libs = find_libraries('libGL', join_path(self.prefix, dir), + libs = find_libraries(['libGL', 'libOSMesa'], + join_path(self.prefix, dir), shared=True, recursive=False) if libs: return libs From ca4de491bafbda92af7b15c442b33a2d84db969a Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Mon, 27 Apr 2020 12:09:06 +0900 Subject: [PATCH 118/802] ppOpen-APPL/AMR-FDM: New package (#16199) * ppOpen-APPL/AMR-FDM: New package * separate build and install. * Fix description. --- .../packages/ppopen-appl-amr-fdm/package.py | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 var/spack/repos/builtin/packages/ppopen-appl-amr-fdm/package.py diff --git a/var/spack/repos/builtin/packages/ppopen-appl-amr-fdm/package.py b/var/spack/repos/builtin/packages/ppopen-appl-amr-fdm/package.py new file mode 100755 index 00000000000..72db2617007 --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-appl-amr-fdm/package.py @@ -0,0 +1,62 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import os + + +class PpopenApplAmrFdm(MakefilePackage): + """ + ppOpen-APPL/AMR-FDM is an adaptive mesh refinement (AMR) framework + for development of 3D parallel finite-difference method (FDM) + applications. + """ + + homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/" + url = "file://{0}/ppohAMRFDM_0.3.0.tar.gz".format(os.getcwd()) + + version('0.3.0', sha256='e82217e4c949dd079a56024d3d1c1761dc8efd5ad0d26a3af83564c3db7327bb') + + depends_on('mpi') + + parallel = False + build_targets = ['default', 'advAMR3D'] + + def edit(self, spec, prefix): + fflags = [ + '-O3', + '-I.', + '-I{0}/include'.format(os.getcwd()) + ] + makefile_in = FileFilter('Makefile.in') + makefile_in.filter('^PREFIX +=.*', 'PREFIX = {0}'.format(prefix)) + makefile_in.filter( + '^INCDIR +=.*', + 'INCDIR = {0}/include'.format(self.build_directory) + ) + makefile_in.filter( + '^LIBDIR +=.*', + 'LIBDIR = {0}/lib'.format(self.build_directory) + ) + makefile_in.filter('^F90 +=.*', 'F90 = {0}'.format(spack_fc)) + makefile_in.filter( + '^MPIF90 +=.*', + 'MPIF90 = {0}'.format(spec['mpi'].mpifc) + ) + makefile_in.filter( + '^sFFLAGS +=.*', + 'sFFLAGS = {0}'.format(' '.join(fflags)) + ) + fflags.append(self.compiler.openmp_flag) + makefile_in.filter( + '^pFFLAGS +=.*', + 'pFFLAGS = {0}'.format(' '.join(fflags)) + ) + + def install(self, spec, prefix): + install_tree('include', prefix.include) + install_tree('lib', prefix.lib) + install_tree('bin', prefix.bin) + install_tree('doc', prefix.doc) From 6b648c6e89a92f8220464a2807f42a45acd6b8e9 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 27 Apr 2020 12:17:32 +0200 Subject: [PATCH 119/802] Improve the coverage of spack.relocate (#15654) This PR introduces trivial refactoring in: - `get_existing_elf_rpaths` - `get_relative_elf_rpaths` - `get_normalized_elf_rpaths` - `set_placeholder` mainly to be more consistent with practices used in other parts of the code and to simplify functions locally. It also adds or reworks unit tests for these functions and extends their docstrings. Co-authored-by: Patrick Gartung Co-authored-by: Peter J. Scheibel --- lib/spack/spack/relocate.py | 154 ++++++++++++++++++------------ lib/spack/spack/test/packaging.py | 18 +--- lib/spack/spack/test/relocate.py | 54 +++++++++++ 3 files changed, 149 insertions(+), 77 deletions(-) diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py index 9f8669f3d45..41770103b05 100644 --- a/lib/spack/spack/relocate.py +++ b/lib/spack/spack/relocate.py @@ -97,70 +97,102 @@ def _patchelf(): return exe_path if os.path.exists(exe_path) else None -def get_existing_elf_rpaths(path_name): - """ - Return the RPATHS returned by patchelf --print-rpath path_name - as a list of strings. +def _elf_rpaths_for(path): + """Return the RPATHs for an executable or a library. + + The RPATHs are obtained by ``patchelf --print-rpath PATH``. + + Args: + path (str): full path to the executable or library + + Return: + RPATHs as a list of strings. """ + # If we're relocating patchelf itself, use it + patchelf_path = path if path.endswith("/bin/patchelf") else _patchelf() + patchelf = executable.Executable(patchelf_path) - # if we're relocating patchelf itself, use it - - if path_name.endswith("/bin/patchelf"): - patchelf = executable.Executable(path_name) - else: - patchelf = executable.Executable(_patchelf()) - - rpaths = list() + output = '' try: - output = patchelf('--print-rpath', '%s' % - path_name, output=str, error=str) - rpaths = output.rstrip('\n').split(':') + output = patchelf('--print-rpath', path, output=str, error=str) + output = output.strip('\n') except executable.ProcessError as e: - msg = 'patchelf --print-rpath %s produced an error %s' % (path_name, e) - tty.warn(msg) - return rpaths + msg = 'patchelf --print-rpath {0} produced an error [{1}]' + tty.warn(msg.format(path, str(e))) + + return output.split(':') if output else [] -def get_relative_elf_rpaths(path_name, orig_layout_root, orig_rpaths): +def _make_relative(reference_file, path_root, paths): + """Return a list where any path in ``paths`` that starts with + ``path_root`` is made relative to the directory in which the + reference file is stored. + + After a path is made relative it is prefixed with the ``$ORIGIN`` + string. + + Args: + reference_file (str): file from which the reference directory + is computed + path_root (str): root of the relative paths + paths: paths to be examined + + Returns: + List of relative paths """ - Replaces orig rpath with relative path from dirname(path_name) if an rpath - in orig_rpaths contains orig_layout_root. Prefixes $ORIGIN - to relative paths and returns replacement rpaths. - """ - rel_rpaths = [] - for rpath in orig_rpaths: - if re.match(orig_layout_root, rpath): - rel = os.path.relpath(rpath, start=os.path.dirname(path_name)) - rel_rpaths.append(os.path.join('$ORIGIN', '%s' % rel)) - else: - rel_rpaths.append(rpath) - return rel_rpaths + # Check prerequisites of the function + msg = "{0} is not a file".format(reference_file) + assert os.path.isfile(reference_file), msg + + start_directory = os.path.dirname(reference_file) + pattern = re.compile(path_root) + relative_paths = [] + + for path in paths: + if pattern.match(path): + rel = os.path.relpath(path, start=start_directory) + path = os.path.join('$ORIGIN', rel) + + relative_paths.append(path) + + return relative_paths -def get_normalized_elf_rpaths(orig_path_name, rel_rpaths): +def _normalize_relative_paths(start_path, relative_paths): + """Normalize the relative paths with respect to the original path name + of the file (``start_path``). + + The paths that are passed to this function existed or were relevant + on another filesystem, so os.path.abspath cannot be used. + + A relative path may contain the signifier $ORIGIN. Assuming that + ``start_path`` is absolute, this implies that the relative path + (relative to start_path) should be replaced with an absolute path. + + Args: + start_path (str): path from which the starting directory + is extracted + relative_paths (str): list of relative paths as obtained by a + call to :ref:`_make_relative` + + Returns: + List of normalized paths """ - Normalize the relative rpaths with respect to the original path name - of the file. If the rpath starts with $ORIGIN replace $ORIGIN with the - dirname of the original path name and then normalize the rpath. - A dictionary mapping relativized rpaths to normalized rpaths is returned. - """ - norm_rpaths = list() - for rpath in rel_rpaths: - if rpath.startswith('$ORIGIN'): - sub = re.sub(re.escape('$ORIGIN'), - os.path.dirname(orig_path_name), - rpath) - norm = os.path.normpath(sub) - norm_rpaths.append(norm) - else: - norm_rpaths.append(rpath) - return norm_rpaths + normalized_paths = [] + pattern = re.compile(re.escape('$ORIGIN')) + start_directory = os.path.dirname(start_path) + + for path in relative_paths: + if path.startswith('$ORIGIN'): + sub = pattern.sub(start_directory, path) + path = os.path.normpath(sub) + normalized_paths.append(path) + + return normalized_paths -def set_placeholder(dirname): - """ - return string of @'s with same length - """ +def _placeholder(dirname): + """String of of @'s with same length of the argument""" return '@' * len(dirname) @@ -592,7 +624,7 @@ def relocate_elf_binaries(path_names, old_layout_root, new_layout_root, rpath was in the old layout root, i.e. system paths are not replaced. """ for path_name in path_names: - orig_rpaths = get_existing_elf_rpaths(path_name) + orig_rpaths = _elf_rpaths_for(path_name) new_rpaths = list() if rel: # get the file path in the old_prefix @@ -600,14 +632,14 @@ def relocate_elf_binaries(path_names, old_layout_root, new_layout_root, path_name) # get the normalized rpaths in the old prefix using the file path # in the orig prefix - orig_norm_rpaths = get_normalized_elf_rpaths(orig_path_name, + orig_norm_rpaths = _normalize_relative_paths(orig_path_name, orig_rpaths) # get the normalize rpaths in the new prefix norm_rpaths = elf_find_paths(orig_norm_rpaths, old_layout_root, prefix_to_prefix) # get the relativized rpaths in the new prefix - new_rpaths = get_relative_elf_rpaths(path_name, new_layout_root, - norm_rpaths) + new_rpaths = _make_relative(path_name, new_layout_root, + norm_rpaths) modify_elf_object(path_name, new_rpaths) else: new_rpaths = elf_find_paths(orig_rpaths, old_layout_root, @@ -652,10 +684,10 @@ def make_elf_binaries_relative(cur_path_names, orig_path_names, Replace old RPATHs with paths relative to old_dir in binary files """ for cur_path, orig_path in zip(cur_path_names, orig_path_names): - orig_rpaths = get_existing_elf_rpaths(cur_path) + orig_rpaths = _elf_rpaths_for(cur_path) if orig_rpaths: - new_rpaths = get_relative_elf_rpaths(orig_path, old_layout_root, - orig_rpaths) + new_rpaths = _make_relative(orig_path, old_layout_root, + orig_rpaths) modify_elf_object(cur_path, new_rpaths) @@ -679,7 +711,7 @@ def relocate_links(linknames, old_layout_root, new_layout_root, link target is create by replacing the old install prefix with the new install prefix. """ - placeholder = set_placeholder(old_layout_root) + placeholder = _placeholder(old_layout_root) link_names = [os.path.join(new_install_prefix, linkname) for linkname in linknames] for link_name in link_names: @@ -810,7 +842,7 @@ def file_is_relocatable(file, paths_to_relocate=None): if platform.system().lower() == 'linux': if m_subtype == 'x-executable' or m_subtype == 'x-sharedlib': - rpaths = ':'.join(get_existing_elf_rpaths(file)) + rpaths = ':'.join(_elf_rpaths_for(file)) set_of_strings.discard(rpaths) if platform.system().lower() == 'darwin': if m_subtype == 'x-mach-binary': diff --git a/lib/spack/spack/test/packaging.py b/lib/spack/spack/test/packaging.py index 39da7c3ae5e..67c9e52875d 100644 --- a/lib/spack/spack/test/packaging.py +++ b/lib/spack/spack/test/packaging.py @@ -25,11 +25,9 @@ from spack.fetch_strategy import URLFetchStrategy, FetchStrategyComposite from spack.relocate import needs_binary_relocation, needs_text_relocation from spack.relocate import relocate_text, relocate_links -from spack.relocate import get_relative_elf_rpaths -from spack.relocate import get_normalized_elf_rpaths from spack.relocate import macho_make_paths_relative from spack.relocate import macho_make_paths_normal -from spack.relocate import set_placeholder, macho_find_paths +from spack.relocate import _placeholder, macho_find_paths from spack.relocate import file_is_relocatable @@ -228,7 +226,7 @@ def test_relocate_links(tmpdir): old_install_prefix = os.path.join( '%s' % old_layout_root, 'debian6', 'test') old_binname = os.path.join(old_install_prefix, 'binfile') - placeholder = set_placeholder(old_layout_root) + placeholder = _placeholder(old_layout_root) re.sub(old_layout_root, placeholder, old_binname) filenames = ['link.ln', 'outsideprefix.ln'] new_layout_root = os.path.join( @@ -561,15 +559,3 @@ def test_macho_make_paths(): '/Users/Shared/spack/pkgB/libB.dylib', '/usr/local/lib/libloco.dylib': '/usr/local/lib/libloco.dylib'} - - -def test_elf_paths(): - out = get_relative_elf_rpaths( - '/usr/bin/test', '/usr', - ('/usr/lib', '/usr/lib64', '/opt/local/lib')) - assert out == ['$ORIGIN/../lib', '$ORIGIN/../lib64', '/opt/local/lib'] - - out = get_normalized_elf_rpaths( - '/usr/bin/test', - ['$ORIGIN/../lib', '$ORIGIN/../lib64', '/opt/local/lib']) - assert out == ['/usr/lib', '/usr/lib64', '/opt/local/lib'] diff --git a/lib/spack/spack/test/relocate.py b/lib/spack/spack/test/relocate.py index 0a9e9f7f0a3..a2bba52f401 100644 --- a/lib/spack/spack/test/relocate.py +++ b/lib/spack/spack/test/relocate.py @@ -89,6 +89,20 @@ def do_install_mock(self, **kwargs): return expected_path +@pytest.fixture() +def mock_patchelf(tmpdir): + import jinja2 + + def _factory(output): + f = tmpdir.mkdir('bin').join('patchelf') + t = jinja2.Template('#!/bin/bash\n{{ output }}\n') + f.write(t.render(output=output)) + f.chmod(0o755) + return str(f) + + return _factory + + @pytest.mark.requires_executables( '/usr/bin/gcc', 'patchelf', 'strings', 'file' ) @@ -140,3 +154,43 @@ def test_file_is_relocatable_errors(tmpdir): def test_search_patchelf(expected_patchelf_path): current = spack.relocate._patchelf() assert current == expected_patchelf_path + + +@pytest.mark.parametrize('patchelf_behavior,expected', [ + ('echo ', []), + ('echo /opt/foo/lib:/opt/foo/lib64', ['/opt/foo/lib', '/opt/foo/lib64']), + ('exit 1', []) +]) +def test_existing_rpaths(patchelf_behavior, expected, mock_patchelf): + # Here we are mocking an executable that is always called "patchelf" + # because that will skip the part where we try to build patchelf + # by ourselves. The executable will output some rpaths like + # `patchelf --print-rpath` would. + path = mock_patchelf(patchelf_behavior) + rpaths = spack.relocate._elf_rpaths_for(path) + assert rpaths == expected + + +@pytest.mark.parametrize('start_path,path_root,paths,expected', [ + ('/usr/bin/test', '/usr', ['/usr/lib', '/usr/lib64', '/opt/local/lib'], + ['$ORIGIN/../lib', '$ORIGIN/../lib64', '/opt/local/lib']) +]) +def test_make_relative_paths(start_path, path_root, paths, expected): + relatives = spack.relocate._make_relative(start_path, path_root, paths) + assert relatives == expected + + +@pytest.mark.parametrize('start_path,relative_paths,expected', [ + # $ORIGIN will be replaced with os.path.dirname('usr/bin/test') + # and then normalized + ('/usr/bin/test', + ['$ORIGIN/../lib', '$ORIGIN/../lib64', '/opt/local/lib'], + ['/usr/lib', '/usr/lib64', '/opt/local/lib']), + # Relative path without $ORIGIN + ('/usr/bin/test', ['../local/lib'], ['../local/lib']), +]) +def test_normalize_relative_paths(start_path, relative_paths, expected): + normalized = spack.relocate._normalize_relative_paths( + start_path, relative_paths + ) + assert normalized == expected From 3ea21fef4b6d291dd3519f0deb85512399e4add9 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 27 Apr 2020 04:57:26 -0600 Subject: [PATCH 120/802] votca-csg: Block gromacs@2020 and newer (#16315) --- var/spack/repos/builtin/packages/votca-csg/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/votca-csg/package.py b/var/spack/repos/builtin/packages/votca-csg/package.py index 0f0432d7020..918791c3375 100644 --- a/var/spack/repos/builtin/packages/votca-csg/package.py +++ b/var/spack/repos/builtin/packages/votca-csg/package.py @@ -30,5 +30,5 @@ class VotcaCsg(CMakePackage): for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master"]: depends_on('votca-tools@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") - depends_on("gromacs~mpi@5.1:") + depends_on("gromacs~mpi@5.1:2019.9999") depends_on("hdf5~mpi") From 35717b556b2a49e67c3480c6c55bd99ac4cc9946 Mon Sep 17 00:00:00 2001 From: asmaahassan90 <31959389+asmaahassan90@users.noreply.github.com> Date: Mon, 27 Apr 2020 13:26:10 +0200 Subject: [PATCH 121/802] spglib: added libs property (#16318) --- var/spack/repos/builtin/packages/spglib/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/spglib/package.py b/var/spack/repos/builtin/packages/spglib/package.py index e832b85eab1..dff137ef036 100644 --- a/var/spack/repos/builtin/packages/spglib/package.py +++ b/var/spack/repos/builtin/packages/spglib/package.py @@ -18,3 +18,8 @@ class Spglib(CMakePackage): version('1.10.3', sha256='43776b5fb220b746d53c1aa39d0230f304687ec05984671392bccaf850d9d696') version('1.10.0', sha256='117fff308731784bea2ddaf3d076f0ecbf3981b31ea1c1bfd5ce4f057a5325b1') + + @property + def libs(self): + return find_libraries(['libsymspg'], root=self.prefix.lib, + recursive=False) From 0477f829a2371c1dec18c10d6af6c0550fa16158 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Mon, 27 Apr 2020 20:33:28 +0900 Subject: [PATCH 122/802] xabclib: added package at v1.03 (#16271) --- .../repos/builtin/packages/xabclib/package.py | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 var/spack/repos/builtin/packages/xabclib/package.py diff --git a/var/spack/repos/builtin/packages/xabclib/package.py b/var/spack/repos/builtin/packages/xabclib/package.py new file mode 100644 index 00000000000..3a851b21afd --- /dev/null +++ b/var/spack/repos/builtin/packages/xabclib/package.py @@ -0,0 +1,60 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Xabclib(MakefilePackage): + """ + Xabclib (eXtended ABCLib) is a numerical library with auto-tuning facility. + """ + + homepage = "http://www.abc-lib.org/Xabclib/index.html" + url = "http://www.abc-lib.org/Xabclib/Release/Xabclib-v1.03.tar.gz" + + version('1.03', sha256='9d200f40f1db87abc26cfe75a22db3a6d972988a28fc0ce8421a0c88cc574d1a') + + def edit(self, spec, prefix): + cc = [spack_cc, '-O3', self.compiler.openmp_flag] + fc = [spack_fc, '-O3', self.compiler.openmp_flag] + if spec.satisfies('%gcc'): + fc.extend(['-ffixed-form', '-cpp']) + filter_file( + '^rm libOpenAT.a$', + 'rm -f libOpenAT.a', + 'make.all' + ) + for makefile in find('.', 'makefile', recursive=True): + m = FileFilter(makefile) + m.filter( + 'F90 += .*$', + 'F90 = {0}'.format(' '.join(fc)) + ) + m.filter( + 'F90O3 += .*$', + 'F90O3 = {0}'.format(' '.join(fc)) + ) + m.filter( + 'CC += .*$', + 'CC = {0}'.format(' '.join(cc)) + ) + m.filter( + 'LD += .*$', + 'LD = {0}'.format(' '.join(fc)) + ) + + def build(self, spec, prefix): + sh = which('sh') + sh('./make.all') + + def install(self, spec, prefix): + mkdir(prefix.lib) + mkdir(prefix.doc) + install('libOpenAT.a', prefix.lib) + install('Readme.pdf', prefix.doc) + + @property + def libs(self): + return find_libraries('libOpenAT', self.prefix.lib, shared=False) From 3f54e73025455c0f3c671e959846757a69002f25 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Mon, 27 Apr 2020 04:41:04 -0700 Subject: [PATCH 123/802] singularity: better info re post-install step (#16311) The singularity info should actually suggest where you might find the info about the post-install steps. Co-authored-by: george.hartzell --- var/spack/repos/builtin/packages/singularity/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/singularity/package.py b/var/spack/repos/builtin/packages/singularity/package.py index 8931e270da5..e7e69fa7327 100644 --- a/var/spack/repos/builtin/packages/singularity/package.py +++ b/var/spack/repos/builtin/packages/singularity/package.py @@ -17,7 +17,10 @@ class Singularity(MakefilePackage): which has a different install base (Autotools). Needs post-install chmod/chown steps to enable full functionality. - See package definition or `spack-build-out.txt` build log for details. + See package definition or `spack-build-out.txt` build log for details, + e.g. + + tail -15 $(spack location -i singularity)/.spack/spack-build-out.txt ''' homepage = "https://www.sylabs.io/singularity/" From fe46919e198fdd598f056861c899a31ba2e8c548 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 27 Apr 2020 16:54:49 +0200 Subject: [PATCH 124/802] tulip: added new package at v5.4.0 (#16319) closes #3479 Co-authored-by: Kate Isaacs Co-authored-by: Kate Isaacs --- .../repos/builtin/packages/tulip/package.py | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 var/spack/repos/builtin/packages/tulip/package.py diff --git a/var/spack/repos/builtin/packages/tulip/package.py b/var/spack/repos/builtin/packages/tulip/package.py new file mode 100644 index 00000000000..77d010222db --- /dev/null +++ b/var/spack/repos/builtin/packages/tulip/package.py @@ -0,0 +1,42 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class Tulip(CMakePackage): + """ Tulip is an information visualization framework dedicated to the + analysis and visualization of relational data. + + Tulip aims to provide the developer with a complete library, supporting + the design of interactive information visualization applications for + relational data that can be tailored to the problems he or she is + addressing. + """ + + homepage = "https://tulip.labri.fr" + url = "https://sourceforge.net/projects/auber/files/tulip/tulip-5.4.0/tulip-5.4.0_src.tar.gz" + + version('5.4.0', sha256='2175e4e1a79028ab7a2479e882242f304fd3e01fedf80e1f29f8f5e9a6eb1325') + + extends('python') + depends_on('py-pyqt5', type=('build', 'run')) + + depends_on('yajl') + depends_on('qt') + depends_on('qhull') + depends_on('freetype') + depends_on('zlib') + depends_on('glew') + depends_on('jpeg') + depends_on('libpng') + depends_on('libxml2') + + def cmake_args(self): + # The use of GL/glu.h seems to be deprecated, see: + # https://github.com/nigels-com/glew/issues/192 + return [ + '-DCMAKE_CXX_FLAGS="-DGLEW_NO_GLU"', + '-DCMAKE_C_FLAGS="-DGLEW_NO_GLU"', + '-DTULIP_BUILD_DOC:BOOL=OFF' + ] From 81b5475f8e6045d22298df191786c54bdbbbde13 Mon Sep 17 00:00:00 2001 From: darmac Date: Mon, 27 Apr 2020 22:55:35 +0800 Subject: [PATCH 125/802] Add new package: smartdenovo (#16310) --- .../packages/smartdenovo/aarch64.patch | 29 ++++++++++++++++++ .../builtin/packages/smartdenovo/package.py | 30 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 var/spack/repos/builtin/packages/smartdenovo/aarch64.patch create mode 100644 var/spack/repos/builtin/packages/smartdenovo/package.py diff --git a/var/spack/repos/builtin/packages/smartdenovo/aarch64.patch b/var/spack/repos/builtin/packages/smartdenovo/aarch64.patch new file mode 100644 index 00000000000..998c9b2cdf3 --- /dev/null +++ b/var/spack/repos/builtin/packages/smartdenovo/aarch64.patch @@ -0,0 +1,29 @@ +diff --git a/Makefile b/Makefile +index 0802f65..3816b6e 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,9 +2,9 @@ VERSION=1.0.0 + MINOR_VER=20140314 + CC=gcc + ifdef DEBUG +-CFLAGS=-g3 -W -Wall -O0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -mpopcnt -mssse3 ++CFLAGS=-g3 -W -Wall -O0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + else +-CFLAGS=-W -Wall -O4 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -mpopcnt -mssse3 ++CFLAGS=-W -Wall -O4 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + endif + INSTALLDIR=/usr/local/bin + GLIBS=-lm -lpthread +diff --git a/ksw.c b/ksw.c +index 15dd0f2..22641ed 100644 +--- a/ksw.c ++++ b/ksw.c +@@ -25,7 +25,7 @@ + + #include + #include +-#include ++#include "SSE2NEON.h" + #include "ksw.h" + + #ifdef USE_MALLOC_WRAPPERS diff --git a/var/spack/repos/builtin/packages/smartdenovo/package.py b/var/spack/repos/builtin/packages/smartdenovo/package.py new file mode 100644 index 00000000000..f18b8583d9d --- /dev/null +++ b/var/spack/repos/builtin/packages/smartdenovo/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Smartdenovo(MakefilePackage): + """SMARTdenovo is a de novo assembler for PacBio and Oxford Nanopore + (ONT) data.""" + + homepage = "https://github.com/ruanjue/smartdenovo" + git = "https://github.com/ruanjue/smartdenovo.git" + + version('master', branch='master') + + depends_on('sse2neon', when='target=aarch64:') + + patch('aarch64.patch', when='target=aarch64:', + sha256='7dd4bca28aafb0680cc1823aa58ac9000819993538e92628554666c4b3acc470') + + def install(self, spec, prefix): + install_files = [ + 'pairaln', 'wtpre', 'wtcyc', 'wtmer', 'wtzmo', 'wtobt', + 'wtclp', 'wtext', 'wtgbo', 'wtlay', 'wtcns', 'wtmsa' + ] + mkdirp(prefix.bin) + for f in install_files: + install(f, prefix.bin) From 5938499be7ffff509a031c6a103c87455ce0318a Mon Sep 17 00:00:00 2001 From: darmac Date: Mon, 27 Apr 2020 23:55:07 +0800 Subject: [PATCH 126/802] Add new package: stinger (#16316) --- .../repos/builtin/packages/stinger/package.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 var/spack/repos/builtin/packages/stinger/package.py diff --git a/var/spack/repos/builtin/packages/stinger/package.py b/var/spack/repos/builtin/packages/stinger/package.py new file mode 100644 index 00000000000..fe78dc015c6 --- /dev/null +++ b/var/spack/repos/builtin/packages/stinger/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Stinger(CMakePackage): + """The STINGER in-memory graph store and dynamic graph analysis + platform. Millions to billions of vertices and edges at thousands + to millions of updates per second.""" + + homepage = "http://www.stingergraph.com/" + git = "https://github.com/stingergraph/stinger.git" + + version('master', branch='master') + + parallel = False + + def install(self, spec, prefix): + with working_dir(self.build_directory): + install_tree('./bin', prefix.bin) + install_tree('./lib', prefix.lib) + install_tree('./include', prefix.include) + install_tree('./share', prefix.share) From d59f7398a3cf89a1e55e4e339cf77834aa0dea91 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Tue, 28 Apr 2020 00:57:14 +0900 Subject: [PATCH 127/802] MODYLAS: New package (#16317) --- .../builtin/packages/modylas/gcc_format.patch | 13 + .../builtin/packages/modylas/makefile.patch | 418 ++++++++++++++++++ .../repos/builtin/packages/modylas/package.py | 46 ++ 3 files changed, 477 insertions(+) create mode 100755 var/spack/repos/builtin/packages/modylas/gcc_format.patch create mode 100755 var/spack/repos/builtin/packages/modylas/makefile.patch create mode 100644 var/spack/repos/builtin/packages/modylas/package.py diff --git a/var/spack/repos/builtin/packages/modylas/gcc_format.patch b/var/spack/repos/builtin/packages/modylas/gcc_format.patch new file mode 100755 index 00000000000..086c4275aac --- /dev/null +++ b/var/spack/repos/builtin/packages/modylas/gcc_format.patch @@ -0,0 +1,13 @@ +diff --git a/source/src/parse_f.f b/source/src/parse_f.f +index c58f90e..37821dd 100644 +--- a/source/src/parse_f.f ++++ b/source/src/parse_f.f +@@ -360,7 +360,7 @@ + stop + endif + +- 9000 format('ERROR: the order of atoms is wrong:',i) ++ 9000 format('ERROR: the order of atoms is wrong:',i8) + + return + end diff --git a/var/spack/repos/builtin/packages/modylas/makefile.patch b/var/spack/repos/builtin/packages/modylas/makefile.patch new file mode 100755 index 00000000000..b308306ff5e --- /dev/null +++ b/var/spack/repos/builtin/packages/modylas/makefile.patch @@ -0,0 +1,418 @@ +diff --git a/source/src/Makefile.am b/source/src/Makefile.am +index 5a41380..1807821 100644 +--- a/source/src/Makefile.am ++++ b/source/src/Makefile.am +@@ -21,6 +21,7 @@ modylas_mdtrj2xyz_SOURCES = version.f fmodules.f MAP_module.f \ + parse_f.f parse_input.f mdff.f + if HAVE_MPI + bin_PROGRAMS += modylas ++FCFLAGS += -DMPIPARA + endif + FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) + FCLD = $(FC) +diff --git a/source/src/Makefile.in b/source/src/Makefile.in +index c0f5dca..7c1988f 100644 +--- a/source/src/Makefile.in ++++ b/source/src/Makefile.in +@@ -1,9 +1,8 @@ +-# Makefile.in generated by automake 1.11.1 from Makefile.am. ++# Makefile.in generated by automake 1.16.1 from Makefile.am. + # @configure_input@ + +-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# Copyright (C) 1994-2018 Free Software Foundation, Inc. ++ + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -16,6 +15,61 @@ + @SET_MAKE@ + + VPATH = @srcdir@ ++am__is_gnu_make = { \ ++ if test -z '$(MAKELEVEL)'; then \ ++ false; \ ++ elif test -n '$(MAKE_HOST)'; then \ ++ true; \ ++ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ ++ true; \ ++ else \ ++ false; \ ++ fi; \ ++} ++am__make_running_with_option = \ ++ case $${target_option-} in \ ++ ?) ;; \ ++ *) echo "am__make_running_with_option: internal error: invalid" \ ++ "target option '$${target_option-}' specified" >&2; \ ++ exit 1;; \ ++ esac; \ ++ has_opt=no; \ ++ sane_makeflags=$$MAKEFLAGS; \ ++ if $(am__is_gnu_make); then \ ++ sane_makeflags=$$MFLAGS; \ ++ else \ ++ case $$MAKEFLAGS in \ ++ *\\[\ \ ]*) \ ++ bs=\\; \ ++ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ ++ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ ++ esac; \ ++ fi; \ ++ skip_next=no; \ ++ strip_trailopt () \ ++ { \ ++ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ ++ }; \ ++ for flg in $$sane_makeflags; do \ ++ test $$skip_next = yes && { skip_next=no; continue; }; \ ++ case $$flg in \ ++ *=*|--*) continue;; \ ++ -*I) strip_trailopt 'I'; skip_next=yes;; \ ++ -*I?*) strip_trailopt 'I';; \ ++ -*O) strip_trailopt 'O'; skip_next=yes;; \ ++ -*O?*) strip_trailopt 'O';; \ ++ -*l) strip_trailopt 'l'; skip_next=yes;; \ ++ -*l?*) strip_trailopt 'l';; \ ++ -[dEDm]) skip_next=yes;; \ ++ -[JT]) skip_next=yes;; \ ++ esac; \ ++ case $$flg in \ ++ *$$target_option*) has_opt=yes; break;; \ ++ esac; \ ++ done; \ ++ test $$has_opt = yes ++am__make_dryrun = (target_option=n; $(am__make_running_with_option)) ++am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) + pkgdatadir = $(datadir)/@PACKAGE@ + pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +@@ -35,13 +89,13 @@ POST_UNINSTALL = : + bin_PROGRAMS = modylas-text2bin$(EXEEXT) modylas-mdtrj2xyz$(EXEEXT) \ + $(am__EXEEXT_1) + @HAVE_MPI_TRUE@am__append_1 = modylas ++@HAVE_MPI_TRUE@am__append_2 = -DMPIPARA + subdir = src +-DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.am \ +- $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/configure.in + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) ++DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) + mkinstalldirs = $(install_sh) -d + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = Doxyfile +@@ -80,18 +134,62 @@ am_modylas_text2bin_OBJECTS = version.$(OBJEXT) fmodules.$(OBJEXT) \ + mdff.$(OBJEXT) + modylas_text2bin_OBJECTS = $(am_modylas_text2bin_OBJECTS) + modylas_text2bin_LDADD = $(LDADD) ++AM_V_P = $(am__v_P_@AM_V@) ++am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) ++am__v_P_0 = false ++am__v_P_1 = : ++AM_V_GEN = $(am__v_GEN_@AM_V@) ++am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) ++am__v_GEN_0 = @echo " GEN " $@; ++am__v_GEN_1 = ++AM_V_at = $(am__v_at_@AM_V@) ++am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) ++am__v_at_0 = @ ++am__v_at_1 = + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) + F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS) ++AM_V_F77 = $(am__v_F77_@AM_V@) ++am__v_F77_ = $(am__v_F77_@AM_DEFAULT_V@) ++am__v_F77_0 = @echo " F77 " $@; ++am__v_F77_1 = + F77LD = $(F77) ++AM_V_F77LD = $(am__v_F77LD_@AM_V@) ++am__v_F77LD_ = $(am__v_F77LD_@AM_DEFAULT_V@) ++am__v_F77LD_0 = @echo " F77LD " $@; ++am__v_F77LD_1 = + SOURCES = $(modylas_SOURCES) $(modylas_mdtrj2xyz_SOURCES) \ + $(modylas_text2bin_SOURCES) + DIST_SOURCES = $(modylas_SOURCES) $(modylas_mdtrj2xyz_SOURCES) \ + $(modylas_text2bin_SOURCES) ++am__can_run_installinfo = \ ++ case $$AM_UPDATE_INFO_DIR in \ ++ n|no|NO) false;; \ ++ *) (install-info --version) >/dev/null 2>&1;; \ ++ esac ++am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) ++# Read a list of newline-separated strings from the standard input, ++# and print each of them once, without duplicates. Input order is ++# *not* preserved. ++am__uniquify_input = $(AWK) '\ ++ BEGIN { nonempty = 0; } \ ++ { items[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in items) print i; }; } \ ++' ++# Make sure the list of sources is unique. This is necessary because, ++# e.g., the same source file might be shared among _SOURCES variables ++# for different programs/libraries. ++am__define_uniq_tagged_files = \ ++ list='$(am__tagged_files)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | $(am__uniquify_input)` + ETAGS = etags + CTAGS = ctags ++am__DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.in + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + ACLOCAL = @ACLOCAL@ + AMTAR = @AMTAR@ ++AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ + AUTOCONF = @AUTOCONF@ + AUTOHEADER = @AUTOHEADER@ + AUTOMAKE = @AUTOMAKE@ +@@ -109,7 +207,7 @@ ECHO_T = @ECHO_T@ + EXEEXT = @EXEEXT@ + F77 = @F77@ + FC = @FC@ +-FCFLAGS = @FCFLAGS@ ++FCFLAGS = @FCFLAGS@ $(am__append_2) + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -127,6 +225,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + SET_MAKE = @SET_MAKE@ +@@ -186,7 +285,7 @@ modylas_SOURCES = version.f fmodules.f main_f90.f parse_f.f app_f90.f \ + diagonal.f matrix_inverse.f \ + comm.f comm_2.f comm_3.f comm_fmm.f \ + opt_integrate.f position_constrain.f \ +- calc_center_of_mass.f shake_rattle_com.f ++ calc_center_of_mass.f shake_rattle_com.f + + modylas_text2bin_SOURCES = version.f fmodules.f MAP_module.f \ + modylas-text2bin.f \ +@@ -218,14 +317,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/Makefile +-.PRECIOUS: Makefile + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ +- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ +- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +@@ -240,14 +338,18 @@ Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) +- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ ++ if test -n "$$list"; then \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ ++ fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ +- while read p p1; do if test -f $$p; \ +- then echo "$$p"; echo "$$p"; else :; fi; \ ++ while read p p1; do if test -f $$p \ ++ ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ +- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ ++ sed -e 'p;s,.*/,,;n;h' \ ++ -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ +@@ -268,22 +370,26 @@ uninstall-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ +- -e 's/$$/$(EXEEXT)/' `; \ ++ -e 's/$$/$(EXEEXT)/' \ ++ `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + + clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +-modylas$(EXEEXT): $(modylas_OBJECTS) $(modylas_DEPENDENCIES) ++ ++modylas$(EXEEXT): $(modylas_OBJECTS) $(modylas_DEPENDENCIES) $(EXTRA_modylas_DEPENDENCIES) + @rm -f modylas$(EXEEXT) +- $(F77LINK) $(modylas_OBJECTS) $(modylas_LDADD) $(LIBS) +-modylas-mdtrj2xyz$(EXEEXT): $(modylas_mdtrj2xyz_OBJECTS) $(modylas_mdtrj2xyz_DEPENDENCIES) ++ $(AM_V_F77LD)$(F77LINK) $(modylas_OBJECTS) $(modylas_LDADD) $(LIBS) ++ ++modylas-mdtrj2xyz$(EXEEXT): $(modylas_mdtrj2xyz_OBJECTS) $(modylas_mdtrj2xyz_DEPENDENCIES) $(EXTRA_modylas_mdtrj2xyz_DEPENDENCIES) + @rm -f modylas-mdtrj2xyz$(EXEEXT) +- $(F77LINK) $(modylas_mdtrj2xyz_OBJECTS) $(modylas_mdtrj2xyz_LDADD) $(LIBS) +-modylas-text2bin$(EXEEXT): $(modylas_text2bin_OBJECTS) $(modylas_text2bin_DEPENDENCIES) ++ $(AM_V_F77LD)$(F77LINK) $(modylas_mdtrj2xyz_OBJECTS) $(modylas_mdtrj2xyz_LDADD) $(LIBS) ++ ++modylas-text2bin$(EXEEXT): $(modylas_text2bin_OBJECTS) $(modylas_text2bin_DEPENDENCIES) $(EXTRA_modylas_text2bin_DEPENDENCIES) + @rm -f modylas-text2bin$(EXEEXT) +- $(F77LINK) $(modylas_text2bin_OBJECTS) $(modylas_text2bin_LDADD) $(LIBS) ++ $(AM_V_F77LD)$(F77LINK) $(modylas_text2bin_OBJECTS) $(modylas_text2bin_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -292,31 +398,20 @@ distclean-compile: + -rm -f *.tab.c + + .f.o: +- $(F77COMPILE) -c -o $@ $< ++ $(AM_V_F77)$(F77COMPILE) -c -o $@ $< + + .f.obj: +- $(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +- +-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) +- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ +- unique=`for i in $$list; do \ +- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ +- done | \ +- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ +- END { if (nonempty) { for (i in files) print i; }; }'`; \ +- mkid -fID $$unique +-tags: TAGS +- +-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +- $(TAGS_FILES) $(LISP) ++ $(AM_V_F77)$(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ++ ++ID: $(am__tagged_files) ++ $(am__define_uniq_tagged_files); mkid -fID $$unique ++tags: tags-am ++TAGS: tags ++ ++tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ +- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ +- unique=`for i in $$list; do \ +- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ +- done | \ +- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ +- END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ +@@ -328,15 +423,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $$unique; \ + fi; \ + fi +-ctags: CTAGS +-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +- $(TAGS_FILES) $(LISP) +- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ +- unique=`for i in $$list; do \ +- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ +- done | \ +- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ +- END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ctags: ctags-am ++ ++CTAGS: ctags ++ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) ++ $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique +@@ -345,11 +436,29 @@ GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" ++cscopelist: cscopelist-am ++ ++cscopelist-am: $(am__tagged_files) ++ list='$(am__tagged_files)'; \ ++ case "$(srcdir)" in \ ++ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ ++ *) sdir=$(subdir)/$(srcdir) ;; \ ++ esac; \ ++ for i in $$list; do \ ++ if test -f "$$i"; then \ ++ echo "$(subdir)/$$i"; \ ++ else \ ++ echo "$$sdir/$$i"; \ ++ fi; \ ++ done >> $(top_builddir)/cscope.files + + distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +-distdir: $(DISTFILES) ++distdir: $(BUILT_SOURCES) ++ $(MAKE) $(AM_MAKEFLAGS) distdir-am ++ ++distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ +@@ -396,10 +505,15 @@ install-am: all-am + + installcheck: installcheck-am + install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++ if test -z '$(STRIP)'; then \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ install; \ ++ else \ ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ ++ fi + mostlyclean-generic: + + clean-generic: +@@ -474,18 +588,21 @@ uninstall-am: uninstall-binPROGRAMS + + .MAKE: install-am install-strip + +-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ +- clean-generic ctags distclean distclean-compile \ +- distclean-generic distclean-tags distdir dvi dvi-am html \ +- html-am info info-am install install-am install-binPROGRAMS \ +- install-data install-data-am install-dvi install-dvi-am \ +- install-exec install-exec-am install-html install-html-am \ +- install-info install-info-am install-man install-pdf \ +- install-pdf-am install-ps install-ps-am install-strip \ +- installcheck installcheck-am installdirs maintainer-clean \ +- maintainer-clean-generic mostlyclean mostlyclean-compile \ +- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ +- uninstall-am uninstall-binPROGRAMS ++.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ ++ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ ++ distclean distclean-compile distclean-generic distclean-tags \ ++ distdir dvi dvi-am html html-am info info-am install \ ++ install-am install-binPROGRAMS install-data install-data-am \ ++ install-dvi install-dvi-am install-exec install-exec-am \ ++ install-html install-html-am install-info install-info-am \ ++ install-man install-pdf install-pdf-am install-ps \ ++ install-ps-am install-strip installcheck installcheck-am \ ++ installdirs maintainer-clean maintainer-clean-generic \ ++ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ++ ps ps-am tags tags-am uninstall uninstall-am \ ++ uninstall-binPROGRAMS ++ ++.PRECIOUS: Makefile + + parse_input.o: parse.o + parse.o: hash.o diff --git a/var/spack/repos/builtin/packages/modylas/package.py b/var/spack/repos/builtin/packages/modylas/package.py new file mode 100644 index 00000000000..1241d3a8ed1 --- /dev/null +++ b/var/spack/repos/builtin/packages/modylas/package.py @@ -0,0 +1,46 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import os + + +class Modylas(AutotoolsPackage): + """ + The 'MOlecular DYnamics Software for LArge Systems' (MODYLAS) is + a general-purpose, molecular dynamics simulation program suited + to the simulation of very large physical, chemical, + and biological systems. + """ + + homepage = "https://www.modylas.org" + url = "file://{0}/MODYLAS_1.0.4.tar.gz".format(os.getcwd()) + + version('1.0.4', 'e0b5cccf8e363c1182eced37aa31b06b1c5b1526da7d449a6142424ac4ea6311') + + variant('mpi', default=True, description='Enable MPI support') + + # to define MPIPARA when +mpi + patch('makefile.patch') + # fix no width I in format + patch('gcc_format.patch', when='%gcc') + + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('mpi', when='+mpi') + + build_directory = 'source' + configure_directory = 'source' + + def setup_build_environment(self, env): + if self.spec.satisfies('+mpi'): + env.set('FC', self.spec['mpi'].mpifc, force=True) + fflags = ['-O3', self.compiler.openmp_flag] + if self.spec.satisfies('%gcc'): + fflags.append('-cpp') + env.set('FCFLAGS', ' '.join(fflags)) + + def configure_args(self): + return self.enable_or_disable('mpi') From eda886f62751d7493e1f0a28e76ef7e290766644 Mon Sep 17 00:00:00 2001 From: vvolkl Date: Mon, 27 Apr 2020 18:00:10 +0200 Subject: [PATCH 128/802] [dd4hep] url and other fixes (#16320) --- .../repos/builtin/packages/dd4hep/package.py | 28 +++++++++++++++++-- .../repos/builtin/packages/dd4hep/tbb2.patch | 15 ++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/dd4hep/tbb2.patch diff --git a/var/spack/repos/builtin/packages/dd4hep/package.py b/var/spack/repos/builtin/packages/dd4hep/package.py index 6fd63f76c68..66242973256 100644 --- a/var/spack/repos/builtin/packages/dd4hep/package.py +++ b/var/spack/repos/builtin/packages/dd4hep/package.py @@ -16,15 +16,23 @@ class Dd4hep(CMakePackage): It distributed under the LGPLv3 License.""" homepage = "https://dd4hep.web.cern.ch/dd4hep/" + url = "https://github.com/AIDASoft/DD4hep/archive/v01-12-01.tar.gz" git = "https://github.com/AIDASoft/DD4hep.git" + maintainers = ['vvolkl', 'drbenmorgan'] + version('master', branch='master') - version('1.11.0', commit='280c7d748d56a704699408ac8e57815d029b169a') - version('1.10.0', commit='9835d1813c07d9d5850d1e68276c0171d1726801') + version('1.12.1', sha256='85e8c775ec03c499ce10911e228342e757c81ce9ef2a9195cb253b85175a2e93') + version('1.12.0', sha256='133a1fb8ce0466d2482f3ebb03e60b3bebb9b2d3e33d14ba15c8fbb91706b398') + version('1.11.2', sha256='96a53dd26cb8df11c6dae54669fbc9cc3c90dd47c67e07b24be9a1341c95abc4') + version('1.11.1', sha256='d7902dd7f6744bbda92f6e303ad5a3410eec4a0d2195cdc86f6c1167e72893f0') + version('1.11.0', sha256='25643296f15f9d11ad4ad550b7c3b92e8974fc56f1ee8e4455501010789ae7b6') + version('1.10.0', sha256='1d6b5d1c368dc8bcedd9c61b7c7e1a44bad427f8bd34932516aff47c88a31d95') # Workarounds for various TBB issues in DD4hep v1.11 # See https://github.com/AIDASoft/DD4hep/pull/613 . patch('tbb-workarounds.patch', when='@1.11.0') + patch('tbb2.patch', when='@1.12.1') variant('xercesc', default=False, description="Enable 'Detector Builders' based on XercesC") variant('geant4', default=False, description="Enable the simulation part based on Geant4") @@ -40,6 +48,9 @@ class Dd4hep(CMakePackage): def cmake_args(self): spec = self.spec cxxstd = spec['root'].variants['cxxstd'].value + # root can be built with cxxstd=11, but dd4hep requires 14 + if cxxstd == "11": + cxxstd = "14" args = [ "-DCMAKE_CXX_STANDARD={0}".format(cxxstd), "-DDD4HEP_USE_XERCESC={0}".format(spec.satisfies('+xercesc')), @@ -50,3 +61,16 @@ def cmake_args(self): "-DPYTHON_EXECUTABLE={0}".format(spec['python'].command.path), ] return args + + def url_for_version(self, version): + # dd4hep releases are dashes and padded with a leading zero + # the patch version is omitted when 0 + # so for example v01-12-01, v01-12 ... + major = (str(version[0]).zfill(2)) + minor = (str(version[1]).zfill(2)) + patch = (str(version[2]).zfill(2)) + if version[2] == 0: + url = "https://github.com/AIDASoft/DD4hep/archive/v%s-%s.tar.gz" % (major, minor) + else: + url = "https://github.com/AIDASoft/DD4hep/archive/v%s-%s-%s.tar.gz" % (major, minor, patch) + return url diff --git a/var/spack/repos/builtin/packages/dd4hep/tbb2.patch b/var/spack/repos/builtin/packages/dd4hep/tbb2.patch new file mode 100644 index 00000000000..7e128f11943 --- /dev/null +++ b/var/spack/repos/builtin/packages/dd4hep/tbb2.patch @@ -0,0 +1,15 @@ +diff --git a/DDDigi/src/DigiKernel.cpp b/DDDigi/src/DigiKernel.cpp +index f2c2e86c..f168ef9b 100644 +--- a/DDDigi/src/DigiKernel.cpp ++++ b/DDDigi/src/DigiKernel.cpp +@@ -273,7 +273,7 @@ void DigiKernel::submit(const DigiAction::Actors& actions, Digi + if ( parallel ) { + tbb::task_group que; + for ( auto* i : actions ) +- que.run(Wrapper(context, *i)); ++ que.run(Wrapper(context, i)); + que.wait(); + goto print_stamp; + } + From 77812845b83311019daa01bb859afe944e4f2162 Mon Sep 17 00:00:00 2001 From: vvolkl Date: Mon, 27 Apr 2020 18:01:09 +0200 Subject: [PATCH 129/802] update podio version formatting (#16321) * update podio version formatting * [podio] formatting fixes --- .../repos/builtin/packages/podio/package.py | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/podio/package.py b/var/spack/repos/builtin/packages/podio/package.py index bc7a6dab90e..14b4722cdbf 100644 --- a/var/spack/repos/builtin/packages/podio/package.py +++ b/var/spack/repos/builtin/packages/podio/package.py @@ -17,10 +17,10 @@ class Podio(CMakePackage): maintainers = ['vvolkl', 'drbenmorgan'] version('master', branch='master') - version('00-10', sha256='b5b42770ec8b96bcd2748abc05669dd3e4d4cc84f81ed57d57d2eda1ade90ef2') - version('00-09-02', sha256='8234d1b9636029124235ef81199a1220968dcc7fdaeab81cdc96a47af332d240') - version('00-09', sha256='3cde67556b6b76fd2d004adfaa3b3b6173a110c0c209792bfdb5f9353e21076f') - version('00-08', sha256='9d035a7f5ebfae5279a17405003206853271af692f762e2bac8e73825f2af327') + version('0.10.0', sha256='b5b42770ec8b96bcd2748abc05669dd3e4d4cc84f81ed57d57d2eda1ade90ef2') + version('0.9.2', sha256='8234d1b9636029124235ef81199a1220968dcc7fdaeab81cdc96a47af332d240') + version('0.9.0', sha256='3cde67556b6b76fd2d004adfaa3b3b6173a110c0c209792bfdb5f9353e21076f') + version('0.8.0', sha256='9d035a7f5ebfae5279a17405003206853271af692f762e2bac8e73825f2af327') variant('build_type', default='Release', description='The build type to build', @@ -56,3 +56,16 @@ def setup_dependent_build_environment(self, env, dependent_spec): def setup_dependent_run_environment(self, env, dependent_spec): env.set('PODIO', self.prefix) + + def url_for_version(self, version): + # podio releases are dashes and padded with a leading zero + # the patch version is omitted when 0 + # so for example v01-12-01, v01-12 ... + major = (str(version[0]).zfill(2)) + minor = (str(version[1]).zfill(2)) + patch = (str(version[2]).zfill(2)) + if version[2] == 0: + url = "https://github.com/AIDASoft/podio/archive/v%s-%s.tar.gz" % (major, minor) + else: + url = "https://github.com/AIDASoft/podio/archive/v%s-%s-%s.tar.gz" % (major, minor, patch) + return url From a277b96b3975cf4440e3296772c8b22e932b7512 Mon Sep 17 00:00:00 2001 From: iarspider Date: Mon, 27 Apr 2020 18:01:48 +0200 Subject: [PATCH 130/802] Make mariadb provide mysql-client... (#16322) ... as well as mariadb. Needed for ROOT. --- var/spack/repos/builtin/packages/mariadb/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/mariadb/package.py b/var/spack/repos/builtin/packages/mariadb/package.py index 9d3f5153174..11df1fc7283 100644 --- a/var/spack/repos/builtin/packages/mariadb/package.py +++ b/var/spack/repos/builtin/packages/mariadb/package.py @@ -33,6 +33,7 @@ class Mariadb(CMakePackage): 'operations in the mariadb client library.') provides('mariadb-client') + provides('mysql-client') depends_on('boost') depends_on('cmake@2.6:', type='build') From 505a511af40509614d662c912264c125abf0d956 Mon Sep 17 00:00:00 2001 From: Benjamin Tovar Date: Mon, 27 Apr 2020 14:18:44 -0400 Subject: [PATCH 131/802] update cctools to version 7.1.3 (#16324) --- var/spack/repos/builtin/packages/cctools/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cctools/package.py b/var/spack/repos/builtin/packages/cctools/package.py index bf74c320ae6..3f7a27081b6 100644 --- a/var/spack/repos/builtin/packages/cctools/package.py +++ b/var/spack/repos/builtin/packages/cctools/package.py @@ -13,8 +13,9 @@ class Cctools(AutotoolsPackage): """ homepage = "https://github.com/cooperative-computing-lab/cctools" - url = "https://github.com/cooperative-computing-lab/cctools/archive/release/7.1.2.tar.gz" + url = "https://github.com/cooperative-computing-lab/cctools/archive/release/7.1.3.tar.gz" + version('7.1.3', sha256='b937878ab429dda31bc692e5d9ffb402b9eb44bb674c07a934bb769cee4165ba') version('7.1.2', sha256='ca871e9fe245d047d4c701271cf2b868e6e3a170e8834c1887157ed855985131') version('7.1.0', sha256='84748245db10ff26c0c0a7b9fd3ec20fbbb849dd4aadc5e8531fd1671abe7a81') version('7.0.18', sha256='5b6f3c87ae68dd247534a5c073eb68cb1a60176a7f04d82699fbc05e649a91c2') From 31eff3578fbd4591bbdfd98aacff4e63704145bc Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Mon, 27 Apr 2020 20:19:10 +0200 Subject: [PATCH 132/802] cmake added version 3.17.1 (#16326) --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index cc69eac5f77..833573bf80e 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -13,6 +13,7 @@ class Cmake(Package): url = 'https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5.tar.gz' maintainers = ['chuckatkins'] + version('3.17.1', sha256='3aa9114485da39cbd9665a0bfe986894a282d5f0882b1dea960a739496620727') version('3.17.0', sha256='b74c05b55115eacc4fa2b77a814981dbda05cdc95a53e279fe16b7b272f00847') version('3.16.5', sha256='5f760b50b8ecc9c0c37135fae5fbf00a2fef617059aa9d61c1bb91653e5a8bfc') version('3.16.2', sha256='8c09786ec60ca2be354c29829072c38113de9184f29928eb9da8446a5f2ce6a9') From 1c45153e00fe6c31a58736e781565fe094b5a433 Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Mon, 27 Apr 2020 20:19:41 +0200 Subject: [PATCH 133/802] ecflow added version 4.12.0 (#16327) --- var/spack/repos/builtin/packages/ecflow/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/ecflow/package.py b/var/spack/repos/builtin/packages/ecflow/package.py index 467076382f2..02bcb25ef11 100644 --- a/var/spack/repos/builtin/packages/ecflow/package.py +++ b/var/spack/repos/builtin/packages/ecflow/package.py @@ -18,6 +18,7 @@ class Ecflow(CMakePackage): homepage = 'https://confluence.ecmwf.int/display/ECFLOW/' url = 'https://confluence.ecmwf.int/download/attachments/8650755/ecFlow-4.11.1-Source.tar.gz' + version('4.12.0', sha256='566b797e8d78e3eb93946b923ef540ac61f50d4a17c9203d263c4fd5c39ab1d1') version('4.11.1', sha256='b3bcc1255939f87b9ba18d802940e08c0cf6379ca6aeec1fef7bd169b0085d6c') variant('static_boost', default=False, From a4b17b95036102cba5e662449217ec33d64c6df7 Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Mon, 27 Apr 2020 13:15:46 -0700 Subject: [PATCH 134/802] cuDNN: Help dependents find libs/includes on Power arch (#16128) On Power architectures cuDNN will install in a target directory. This sets cuDNN_ROOT to point to the subdirectory to help dependents use this install. --- var/spack/repos/builtin/packages/cudnn/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/cudnn/package.py b/var/spack/repos/builtin/packages/cudnn/package.py index 4491af18a88..74f5133d901 100644 --- a/var/spack/repos/builtin/packages/cudnn/package.py +++ b/var/spack/repos/builtin/packages/cudnn/package.py @@ -190,6 +190,11 @@ def url_for_version(self, version): return url.format(directory, cuda, ver) + def setup_run_environment(self, env): + if 'target=ppc64le: platform=linux' in self.spec: + env.set('cuDNN_ROOT', os.path.join( + self.prefix, 'targets', 'ppc64le-linux')) + def install(self, spec, prefix): install_tree('.', prefix) From 08e53b67f85a4a88dcddba272ae56c1d4e557489 Mon Sep 17 00:00:00 2001 From: "Mark W. Krentel" Date: Mon, 27 Apr 2020 16:04:02 -0500 Subject: [PATCH 135/802] hpcviewer: add version 2020.04 (#16332) * hpcviewer: add version 2020.04 * ibm-java: add version 8.0.6.7 --- var/spack/repos/builtin/packages/hpcviewer/package.py | 6 ++++++ var/spack/repos/builtin/packages/ibm-java/package.py | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hpcviewer/package.py b/var/spack/repos/builtin/packages/hpcviewer/package.py index 97688963cfe..5399e42f6c8 100644 --- a/var/spack/repos/builtin/packages/hpcviewer/package.py +++ b/var/spack/repos/builtin/packages/hpcviewer/package.py @@ -37,6 +37,9 @@ class Hpcviewer(Package): maintainers = ['mwkrentel'] viewer_sha = { + ('2020.04', 'x86_64'): '5944c7b1e518b25d143df72b06a69cffb0bfc92186eb5efee2178fc2814a0b8b', + ('2020.04', 'ppc64'): 'ba60615a550aa77a17eb94272b62365a22298cebc6dc2cb7463686741e58d874', + ('2020.04', 'ppc64le'): '128494077979b447875ed730f1e8c5470fafcd52ae6debe61625031248d91f7c', ('2020.02', 'x86_64'): 'af1f514547a9325aee30eb891b31e38c7ea3f33d2d1978b44f83e7daa3d5de6b', ('2020.02', 'ppc64'): '7bb4926202db663aedd5a6830778c5f73f6b08a65d56861824ea95ba83b1f59c', ('2020.02', 'ppc64le'): 'cfcebb7ba301affd6d21d2afd43c540e6dd4c5bc39b0d20e8bd1e4fed6aa3481', @@ -64,6 +67,9 @@ class Hpcviewer(Package): } trace_sha = { + ('2020.04', 'x86_64'): '695f7a06479c2b6958a6ebc3985b7ed777e7e126c04424ce980b224690f769f3', + ('2020.04', 'ppc64'): '78cfadaf7bc6130cc4257241499b36f4f1c47f22d0daa29f5e733ca824a87b3c', + ('2020.04', 'ppc64le'): '28c225023accbc85a19c6d8fdcc14dae64a475ed5de2b94f18e58aab4edd2c09', ('2020.02', 'x86_64'): 'b7b634e91108aa50a2e8647ac6bac87df775ae38aff078545efaa84735e0a666', ('2020.02', 'ppc64'): 'a3e845901689e1b32bc6ab2826c6ac6ed352df4839090fa530b20f747e6e0957', ('2020.02', 'ppc64le'): 'a64a283f61e706d988952a7cede9fac0328b09d2d0b64e4c08acc54e38781c98', diff --git a/var/spack/repos/builtin/packages/ibm-java/package.py b/var/spack/repos/builtin/packages/ibm-java/package.py index df4b9d9c4e5..b2de7b1f159 100644 --- a/var/spack/repos/builtin/packages/ibm-java/package.py +++ b/var/spack/repos/builtin/packages/ibm-java/package.py @@ -10,15 +10,20 @@ class IbmJava(Package): """Binary distribution of the IBM Java Software Development Kit - for big and little-endian powerpc (power7, 8 and 9).""" + for big and little-endian powerpc (power7, 8 and 9). Note: IBM + is fairly aggressive about taking down old versions, so old + (and even current) versions may not be available.""" homepage = "https://developer.ibm.com/javasdk/" + maintainers = ['mwkrentel'] # Note: IBM is fairly aggressive about taking down old versions, # so we may need to update this frequently. Also, old revs may # not be available for download. version_list = [ + ('8.0.6.7', 'ppc64', 'a1accb461a039af4587ea86511e317fea1d423e7f781459a17ed3947afed2982'), + ('8.0.6.7', 'ppc64le', '9ede76a597af28c7f10c6f8a68788cc2dcd39fdab178c9bac56df8b3766ac717'), ('8.0.6.0', 'ppc64', 'e142746a83e47ab91d71839d5776f112ed154ae180d0628e3f10886151dad710'), ('8.0.6.0', 'ppc64le', '18c2eccf99225e6e7643141d8da4110cacc39f2fa00149fc26341d2272cc0102'), ('8.0.5.30', 'ppc64', 'd39ce321bdadd2b2b829637cacf9c1c0d90235a83ff6e7dcfa7078faca2f212f'), From 8060bc6523f5f9fe5f4a0e29f77542dd2323b59b Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 27 Apr 2020 15:18:03 -0600 Subject: [PATCH 136/802] graphviz: add poppler support (#16331) * graphviz: add poppler support * graphviz: actually needs poppler+glib * poopler: fix glib build, new version --- var/spack/repos/builtin/packages/graphviz/package.py | 5 ++++- var/spack/repos/builtin/packages/poppler/package.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 5e9032b3881..0df127b00b1 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -55,6 +55,8 @@ class Graphviz(AutotoolsPackage): description='Build with libgd support (more output formats)') variant('pangocairo', default=False, description='Build with pango+cairo support (more output formats)') + variant('poppler', default=False, + description='Build with poppler support (pdf formats)') variant('qt', default=False, description='Build with Qt support') variant('quartz', default=(MACOS_VERSION is not None), @@ -99,6 +101,7 @@ class Graphviz(AutotoolsPackage): depends_on('glib', when='+pangocairo') depends_on('libpng', when='+pangocairo') depends_on('pango', when='+pangocairo') + depends_on('poppler+glib', when='+poppler') depends_on('zlib') depends_on('qt', when='+qt') depends_on('libx11', when="+x") @@ -147,7 +150,7 @@ def configure_args(self): args.append('--{0}-swig'.format('enable' if use_swig else 'disable')) for var in ["expat", "gts", "ghostscript", "libgd", "pangocairo", - "qt", "quartz", "x"]: + "poppler", "qt", "quartz", "x"]: args += self.with_or_without(var) args.append('--{0}-gtk'.format( diff --git a/var/spack/repos/builtin/packages/poppler/package.py b/var/spack/repos/builtin/packages/poppler/package.py index affb9e5359a..2848c81eb16 100644 --- a/var/spack/repos/builtin/packages/poppler/package.py +++ b/var/spack/repos/builtin/packages/poppler/package.py @@ -15,6 +15,7 @@ class Poppler(CMakePackage): git = "https://gitlab.freedesktop.org/poppler/poppler.git" version('master', branch='master') + version('0.87.0', sha256='6f602b9c24c2d05780be93e7306201012e41459f289b8279a27a79431ad4150e') version('0.79.0', sha256='f985a4608fe592d2546d9d37d4182e502ff6b4c42f8db4be0a021a1c369528c8') version('0.77.0', sha256='7267eb4cbccd64a58244b8211603c1c1b6bf32c7f6a4ced2642865346102f36b') version('0.72.0', sha256='c1747eb8f26e9e753c4001ed951db2896edc1021b6d0f547a0bd2a27c30ada51') @@ -48,7 +49,7 @@ class Poppler(CMakePackage): depends_on('openjpeg', when='+openjpeg') depends_on('qt@4.0:', when='+qt') depends_on('zlib', when='+zlib') - depends_on('cairo@1.10.0:', when='+glib') + depends_on('cairo+ft@1.10.0:', when='+glib') depends_on('iconv', when='+iconv') depends_on('jpeg', when='+jpeg') depends_on('libpng', when='+png') From 204179eed386240ea9f28eda6d10ae3a981f8d39 Mon Sep 17 00:00:00 2001 From: Tim Haines Date: Mon, 27 Apr 2020 19:26:28 -0500 Subject: [PATCH 137/802] elfutils: Add version 0.179 (#16334) --- var/spack/repos/builtin/packages/elfutils/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index e32c68c60d9..651caf3d76d 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -17,10 +17,11 @@ class Elfutils(AutotoolsPackage, SourcewarePackage): version of elfutils.""" homepage = "https://fedorahosted.org/elfutils/" - sourceware_mirror_path = "elfutils/0.178/elfutils-0.178.tar.bz2" + sourceware_mirror_path = "elfutils/0.179/elfutils-0.179.tar.bz2" list_url = "https://sourceware.org/elfutils/ftp" list_depth = 1 + version('0.179', sha256='25a545566cbacaa37ae6222e58f1c48ea4570f53ba991886e2f5ce96e22a23a2') version('0.178', sha256='31e7a00e96d4e9c4bda452e1f2cdac4daf8abd24f5e154dee232131899f3a0f2') version('0.177', sha256='fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e') version('0.176', sha256='eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023') From f314ff6639e895cadb95481d485e7cc71d123f39 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Mon, 27 Apr 2020 17:36:33 -0700 Subject: [PATCH 138/802] python : fix SSL for older Python versions (#16217) * Fixed SSL pathing for older versions of Python (i.e. @:3.6.999). * Fixed an issue where the 'python~ssl' variant wasn't properly being respected. * Improved the '~ssl' patch by making it functional instead of diff-based (enables 3.X.Y patches). * Fixed comment formatting to satisfy 'flake8' style requirements. --- .../repos/builtin/packages/python/package.py | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index fd7438d605e..712216f491f 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -132,6 +132,9 @@ class Python(AutotoolsPackage): depends_on('readline', when='+readline') depends_on('ncurses', when='+readline') depends_on('openssl', when='+ssl') + # https://raw.githubusercontent.com/python/cpython/84471935ed2f62b8c5758fd544c7d37076fe0fa5/Misc/NEWS + # https://docs.python.org/3.5/whatsnew/changelog.html#python-3-5-4rc1 + depends_on('openssl@:1.0.2z', when='@:2.7.13,3.0.0:3.5.2+ssl') depends_on('openssl@1.0.2:', when='@3.7:+ssl') # https://docs.python.org/3/whatsnew/3.7.html#build-changes depends_on('sqlite@3.0.8:', when='+sqlite3') depends_on('gdbm', when='+dbm') # alternatively ndbm or berkeley-db @@ -196,17 +199,46 @@ def url_for_version(self, version): url = "https://www.python.org/ftp/python/{0}/Python-{1}.tgz" return url.format(re.split('[a-z]', str(version))[0], version) - @when('@2.7:2.8,3.4:') + # TODO: Ideally, these patches would be applied as separate '@run_before' + # functions enabled via '@when', but these two decorators don't work + # when used together. See: https://github.com/spack/spack/issues/12736 def patch(self): # NOTE: Python's default installation procedure makes it possible for a # user's local configurations to change the Spack installation. In # order to prevent this behavior for a full installation, we must # modify the installation script so that it ignores user files. - ff = FileFilter('Makefile.pre.in') - ff.filter( - r'^(.*)setup\.py(.*)((build)|(install))(.*)$', - r'\1setup.py\2 --no-user-cfg \3\6' - ) + if self.spec.satisfies('@2.7:2.8,3.4:'): + ff = FileFilter('Makefile.pre.in') + ff.filter( + r'^(.*)setup\.py(.*)((build)|(install))(.*)$', + r'\1setup.py\2 --no-user-cfg \3\6' + ) + + # NOTE: Older versions of Python do not support the '--with-openssl' + # configuration option, so the installation's module setup file needs + # to be modified directly in order to point to the correct SSL path. + # See: https://stackoverflow.com/a/5939170 + if self.spec.satisfies('@:3.6.999+ssl'): + ff = FileFilter(join_path('Modules', 'Setup.dist')) + ff.filter(r'^#(((SSL=)|(_ssl))(.*))$', r'\1') + ff.filter(r'^#((.*)(\$\(SSL\))(.*))$', r'\1') + ff.filter( + r'^SSL=(.*)$', + r'SSL={0}'.format(self.spec['openssl'].prefix) + ) + # Because Python uses compiler system paths during install, it's + # possible to pick up a system OpenSSL when building 'python~ssl'. + # To avoid this scenario, we disable the 'ssl' module with patching. + elif self.spec.satisfies('@:3.6.999~ssl'): + ff = FileFilter('setup.py') + ff.filter( + r'^(\s+(ssl_((incs)|(libs)))\s+=\s+)(.*)$', + r'\1 None and \6' + ) + ff.filter( + r'^(\s+(opensslv_h)\s+=\s+)(.*)$', + r'\1 None and \3' + ) def setup_build_environment(self, env): spec = self.spec @@ -291,8 +323,8 @@ def configure_args(self): if '+pic' in spec: config_args.append('CFLAGS={0}'.format(self.compiler.cc_pic_flag)) - if spec.satisfies('@3.7:'): - if '+ssl' in spec: + if '+ssl' in spec: + if spec.satisfies('@3.7:'): config_args.append('--with-openssl={0}'.format( spec['openssl'].prefix)) From b04b6e14490e4bdb61457741d52bded336751618 Mon Sep 17 00:00:00 2001 From: asmaahassan90 <31959389+asmaahassan90@users.noreply.github.com> Date: Tue, 28 Apr 2020 02:38:15 +0200 Subject: [PATCH 139/802] Add ShengBTE (#16154) * Add ShengBTE Adding a new package; ShengBTE. I tried adding it a MakefilePackage, and use build_directory = 'Src', but it was as if the build_directory gets ignored and make complains about target not found. and using the make funtion here instead of os.system, I get errors that config.f90 is not found which is already available under Src as well. * more enhancmenets fix lint; use mkl spec; use build_directory variable * one more fix * Use Makefile template * Update var/spack/repos/builtin/packages/shengbte/package.py use mkl instead of intel-mkl as a dependency Co-Authored-By: Adam J. Stewart * Update var/spack/repos/builtin/packages/shengbte/package.py update recipe as suggested by reviewer Co-Authored-By: Adam J. Stewart * enhance recipe remove white space; changes as suggested by reviewer Co-authored-by: Adam J. Stewart --- .../builtin/packages/shengbte/package.py | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 var/spack/repos/builtin/packages/shengbte/package.py diff --git a/var/spack/repos/builtin/packages/shengbte/package.py b/var/spack/repos/builtin/packages/shengbte/package.py new file mode 100644 index 00000000000..59697a51cee --- /dev/null +++ b/var/spack/repos/builtin/packages/shengbte/package.py @@ -0,0 +1,39 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack import * + + +class Shengbte(MakefilePackage): + """ShengBTE is a software package for solving the Boltzmann Transport + Equation for phonons.""" + + homepage = "www.shengbte.org" + url = "www.shengbte.org/downloads/ShengBTE-v1.1.1-8a63749.tar.bz2" + + version('1.1.1-8a63749', sha256='43920740d19ae854c8ecae0b648acfdf1d7726ca4c2b44f1a1684457f2f88522') + + depends_on('mpi') + depends_on('spglib') + depends_on('mkl') + + parallel = False + + build_directory = 'Src' + + def edit(self, spec, prefix): + arch_make = join_path(self.build_directory, 'arch.make') + copy('arch.make.example', arch_make) + filter_file('export FFLAGS=.*', 'export FFLAGS=-debug -O2', arch_make) + filter_file('export LDFLAGS=.*', 'export LDFLAGS=' + spec['spglib']. + libs.ld_flags, arch_make) + + filter_file('export MPIFC=.*', 'export MPIFC=%s' % spec['mpi'].mpifc, + arch_make) + filter_file('LAPACK=.*', 'LAPACK=' + spec['mkl'].libs.ld_flags, + arch_make) + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('ShengBTE', prefix.bin) From cd568829981bf62767b986df6fe9ff40d50500e0 Mon Sep 17 00:00:00 2001 From: Diego Magdaleno <38844659+DiegoMagdaleno@users.noreply.github.com> Date: Mon, 27 Apr 2020 19:39:09 -0500 Subject: [PATCH 140/802] Add a new package Exa (#16126) * Add new package exa * Format and fix a silly typo * Fix SHA256 SUM and make URL calculation dynamic * Remove unnecessary URL calculation * Update package.py * Keep the version on 1 line * Pass flake8 checks --- .../repos/builtin/packages/exa/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/exa/package.py diff --git a/var/spack/repos/builtin/packages/exa/package.py b/var/spack/repos/builtin/packages/exa/package.py new file mode 100644 index 00000000000..e6a0fe39a4f --- /dev/null +++ b/var/spack/repos/builtin/packages/exa/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Exa(Package): + """exa is a replacement for ls written in Rust.""" + + homepage = 'https://the.exa.website' + url = 'https://github.com/ogham/exa/archive/v0.9.0.tar.gz' + + version('0.9.0', sha256='96e743ffac0512a278de9ca3277183536ee8b691a46ff200ec27e28108fef783') + + depends_on('rust') + + def install(self, spec, prefix): + cargo = which('cargo') + cargo('install', '--root', prefix, '--path', '.') From f1a7fb2ffc16788aff261cfbd6f7558828dc6210 Mon Sep 17 00:00:00 2001 From: Diego Magdaleno <38844659+DiegoMagdaleno@users.noreply.github.com> Date: Mon, 27 Apr 2020 19:40:35 -0500 Subject: [PATCH 141/802] Update bat and make the url dynamic (#16127) * Update bat and make the url dynamic - Now depending on the version it will calculate the url - This also fixes a weird issue that was reported on Darwin, back when I reported that Rust wasn't linking properly on Darwin #15887 on the comment by hartzell i was also experiencing this issue * Remove unnecessary stuff - Removes the need for LLVM - Removes the need for version calculation. * Keep the versions on 1 line * Pass flake8 tests --- var/spack/repos/builtin/packages/bat/package.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/bat/package.py b/var/spack/repos/builtin/packages/bat/package.py index 50c3b5349a0..0463580f8ff 100644 --- a/var/spack/repos/builtin/packages/bat/package.py +++ b/var/spack/repos/builtin/packages/bat/package.py @@ -9,9 +9,10 @@ class Bat(Package): """A cat(1) clone with wings.""" - homepage = "https://github.com/sharkdp/bat" - url = "https://github.com/sharkdp/bat/archive/v0.10.0.tar.gz" + homepage = 'https://github.com/sharkdp/bat' + url = 'https://github.com/sharkdp/bat/archive/v0.13.0.tar.gz' + version('0.13.0', sha256='f4aee370013e2a3bc84c405738ed0ab6e334d3a9f22c18031a7ea008cd5abd2a') version('0.12.1', sha256='1dd184ddc9e5228ba94d19afc0b8b440bfc1819fef8133fe331e2c0ec9e3f8e2') depends_on('rust') @@ -19,11 +20,3 @@ class Bat(Package): def install(self, spec, prefix): cargo = which('cargo') cargo('install', '--root', prefix, '--path', '.') - - # cargo seems to need these to be set so that when it's building - # onig_sys it can run llvm-config and link against libclang. - def setup_build_environment(self, env): - env.append_flags('LLVM_CONFIG_PATH', - join_path(self.spec['llvm'].prefix.libexec.llvm, - 'llvm-config')) - env.append_flags('LIBCLANG_PATH', self.spec['llvm'].prefix.lib) From f5a5a11c77a76939676a5bc2298fadc947091a9a Mon Sep 17 00:00:00 2001 From: "Dr. Christian Tacke" <58549698+ChristianTackeGSI@users.noreply.github.com> Date: Tue, 28 Apr 2020 02:41:15 +0200 Subject: [PATCH 142/802] abseil-cpp: new Version, Build Shared Library (#16125) * Add new version: "Abseil LTS branch, Feb 2020, Patch 1" * Build shared libraries by default with new version * Older versions do not support building shared libraries --- var/spack/repos/builtin/packages/abseil-cpp/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/abseil-cpp/package.py b/var/spack/repos/builtin/packages/abseil-cpp/package.py index 90fd6cbd879..c40b2353bf8 100644 --- a/var/spack/repos/builtin/packages/abseil-cpp/package.py +++ b/var/spack/repos/builtin/packages/abseil-cpp/package.py @@ -14,10 +14,18 @@ class AbseilCpp(CMakePackage): maintainers = ['jcftang'] + version('20200225.1', sha256='0db0d26f43ba6806a8a3338da3e646bb581f0ca5359b3a201d8fb8e4752fd5f8') version('20190808', sha256='8100085dada279bf3ee00cd064d43b5f55e5d913be0dfe2906f06f8f28d5b37e') version('20181200', sha256='e2b53bfb685f5d4130b84c4f3050c81bf48c497614dc85d91dbd3ed9129bce6d') version('20180600', sha256='794d483dd9a19c43dc1fbbe284ce8956eb7f2600ef350dac4c602f9b4eb26e90') + variant('shared', default=True, + description='Build shared instead of static libraries') + + conflicts('+shared', when='@:20190808') + def cmake_args(self): args = ["-DBUILD_TESTING=OFF", "-DCMAKE_CXX_STANDARD=11"] + args.append('-DBUILD_SHARED_LIBS:Bool={0}'.format( + 'ON' if '+shared' in self.spec else 'OFF')) return args From 3115b5c75886fc657209176cf55f6381f13a9ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiziano=20M=C3=BCller?= Date: Tue, 28 Apr 2020 02:42:33 +0200 Subject: [PATCH 143/802] CP2K: arch file improvements and blas-dependency simplification (#16074) * cp2k: prettify arch-file, call pkg-config directly this allows to re-use the arch-file without having to load the complete Spack environment, for example after a dev-build * cp2k: use consistency check instead of blas lib enum this makes using other BLAS/LAPACK implementations possible without explicitly adding support for them * cp2k: add basic support for Cray and XL Compilers, correct Intel fp mode * cp2k: add myself as maintainer * cp2k: use "master" to denote the git version * cp2k: use spack_cc/fc/cxx when possible, set CXX explicitly * cp2k: set __MKL when using the MKL, not just the Intel compiler * cp2k: drop self. when referencing spec where possible * cp2k: add forgotten elpa+openmp dep * cp2k: set C++14 for recent versions --- .../repos/builtin/packages/cp2k/package.py | 204 +++++++++++------- 1 file changed, 128 insertions(+), 76 deletions(-) diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 734b2c0aa3d..0a172d025fe 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -20,16 +20,16 @@ class Cp2k(MakefilePackage, CudaPackage): git = 'https://github.com/cp2k/cp2k.git' list_url = 'https://github.com/cp2k/cp2k/releases' + maintainers = ['dev-zero'] + version('7.1', sha256='ccd711a09a426145440e666310dd01cc5772ab103493c4ae6a3470898cd0addb') version('6.1', sha256='af803558e0a6b9e9d9ce8a3ab955ba32bacd179922455424e061c82c9fefa34b') version('5.1', sha256='e23613b593354fa82e0b8410e17d94c607a0b8c6d9b5d843528403ab09904412') version('4.1', sha256='4a3e4a101d8a35ebd80a9e9ecb02697fb8256364f1eccdbe4e5a85d31fe21343') version('3.0', sha256='1acfacef643141045b7cbade7006f9b7538476d861eeecd9658c9e468dc61151') - version('develop', branch='master', submodules="True") + version('master', branch='master', submodules="True") variant('mpi', default=True, description='Enable MPI support') - variant('blas', default='openblas', values=('openblas', 'mkl', 'accelerate'), - description='Enable the use of OpenBlas/MKL/Accelerate') variant('openmp', default=False, description='Enable OpenMP support') variant('smm', default='libxsmm', values=('libxsmm', 'libsmm', 'blas'), description='Library for small matrix multiplications') @@ -73,18 +73,9 @@ class Cp2k(MakefilePackage, CudaPackage): depends_on('python', type='build') - depends_on('fftw@3:', when='~openmp') - depends_on('fftw@3:+openmp', when='+openmp') - - # see #1712 for the reason to enumerate BLAS libraries here - depends_on('openblas threads=none', when='blas=openblas ~openmp') - depends_on('openblas threads=openmp', when='blas=openblas +openmp') - depends_on('lapack', when='blas=openblas ~openmp') - - depends_on('intel-mkl', when="blas=mkl ~openmp") - depends_on('intel-mkl threads=openmp', when='blas=mkl +openmp') - - conflicts('blas=accelerate', '+openmp') # there is no Accelerate with OpenMP support + depends_on('blas') + depends_on('lapack') + depends_on('fftw-api@3') # require libxsmm-1.11+ since 1.10 can leak file descriptors in Fortran depends_on('libxsmm@1.11:~header-only', when='smm=libxsmm') @@ -110,6 +101,7 @@ class Cp2k(MakefilePackage, CudaPackage): depends_on('cosma+cuda+scalapack', when='+cosma+cuda') depends_on('elpa@2011.12:2016.13+openmp', when='+openmp+elpa@:5.999') depends_on('elpa@2011.12:2017.11+openmp', when='+openmp+elpa@6.0:') + depends_on('elpa@2018.05:+openmp', when='+openmp+elpa@7.0:') depends_on('elpa@2011.12:2016.13~openmp', when='~openmp+elpa@:5.999') depends_on('elpa@2011.12:2017.11~openmp', when='~openmp+elpa@6.0:') depends_on('elpa@2018.05:~openmp', when='~openmp+elpa@7.0:') @@ -150,9 +142,7 @@ class Cp2k(MakefilePackage, CudaPackage): # CP2K needs compiler specific compilation flags, e.g. optflags conflicts('%clang') - conflicts('%cray') conflicts('%nag') - conflicts('%xl') @property def makefile_architecture(self): @@ -176,9 +166,42 @@ def makefile(self): def archive_files(self): return [os.path.join(self.stage.source_path, self.makefile)] - def edit(self, spec, prefix): + def consistency_check(self, spec): + """ + Consistency checks. + Due to issue #1712 we can not put them into depends_on/conflicts. + """ - fftw = spec['fftw:openmp' if '+openmp' in spec else 'fftw'] + if '+openmp' in spec: + if '^openblas' in spec and '^openblas threads=openmp' not in spec: + raise InstallError( + '^openblas threads=openmp required for cp2k+openmp' + ' with openblas') + + if '^fftw' in spec and '^fftw +openmp' not in spec: + raise InstallError( + '^fftw +openmp required for cp2k+openmp' + ' with fftw') + + # MKL doesn't need to be checked since they are + # OMP thread-safe when using mkl_sequential + # BUT: we should check the version of MKL IF it is used for FFTW + # since there we need at least v14 of MKL to be safe! + + def edit(self, spec, prefix): + self.consistency_check(spec) + + pkgconf = which('pkg-config') + + if '^fftw' in spec: + fftw = spec['fftw:openmp' if '+openmp' in spec else 'fftw'] + fftw_header_dir = fftw.headers.directories[0] + elif '^intel-mkl' in spec: + fftw = spec['intel-mkl'] + fftw_header_dir = fftw.headers.directories[0] + '/fftw' + elif '^intel-parallel-studio+mkl' in spec: + fftw = spec['intel-parallel-studio'] + fftw_header_dir = fftw.headers.directories[0] + '/fftw' optimization_flags = { 'gcc': [ @@ -186,15 +209,17 @@ def edit(self, spec, prefix): '-funroll-loops', '-ftree-vectorize', ], - 'intel': ['-O2', '-pc64', '-unroll'], + 'intel': ['-O2', '-pc64', '-unroll', ], 'pgi': ['-fast'], + 'cray': ['-O2'], + 'xl': ['-O3'], } dflags = ['-DNDEBUG'] cppflags = [ '-D__LIBINT', '-D__FFTW3', - fftw.headers.cpp_flags, + '-I{0}'.format(fftw_header_dir), ] if '@:6.9' in spec: @@ -220,19 +245,24 @@ def edit(self, spec, prefix): cflags.append('-fp-model precise') cxxflags.append('-fp-model precise') fcflags += [ - '-fp-model source', + '-fp-model precise', '-heap-arrays 64', '-g', '-traceback', ] elif '%gcc' in spec: - fcflags.extend([ + fcflags += [ '-ffree-form', '-ffree-line-length-none', '-ggdb', # make sure we get proper Fortran backtraces - ]) + ] elif '%pgi' in spec: - fcflags.extend(['-Mfreeform', '-Mextend']) + fcflags += ['-Mfreeform', '-Mextend'] + elif '%cray' in spec: + fcflags += ['-emf', '-ffree', '-hflex_mp=strict'] + elif '%xl' in spec: + fcflags += ['-qpreprocess', '-qstrict', '-q64'] + ldflags += ['-Wl,--allow-multiple-definition'] if '+openmp' in spec: cflags.append(self.compiler.openmp_flag) @@ -241,6 +271,15 @@ def edit(self, spec, prefix): ldflags.append(self.compiler.openmp_flag) nvflags.append('-Xcompiler="{0}"'.format( self.compiler.openmp_flag)) + elif '%cray' in spec: # Cray enables OpenMP by default + cflags += ['-hnoomp'] + cxxflags += ['-hnoomp'] + fcflags += ['-hnoomp'] + ldflags += ['-hnoomp'] + + if '@7:' in spec: # recent versions of CP2K use C++14 CUDA code + cxxflags.append(self.compiler.cxx14_flag) + nvflags.append(self.compiler.cxx14_flag) ldflags.append(fftw.libs.search_flags) @@ -257,8 +296,8 @@ def edit(self, spec, prefix): os.path.join(spec['libint'].libs.directories[0], 'libint.a'), ]) else: - fcflags += ['$(shell pkg-config --cflags libint2)'] - libs += ['$(shell pkg-config --libs libint2)'] + fcflags += pkgconf('--cflags', 'libint2', output=str).split() + libs += pkgconf('--libs', 'libint2', output=str).split() if '+plumed' in self.spec: dflags.extend(['-D__PLUMED2']) @@ -268,15 +307,16 @@ def edit(self, spec, prefix): 'libplumed.{0}'.format(dso_suffix)) ]) - fc = self.compiler.fc if '~mpi' in spec else self.spec['mpi'].mpifc + cc = spack_cc if '~mpi' in spec else spec['mpi'].mpicc + cxx = spack_cxx if '~mpi' in spec else spec['mpi'].mpicxx + fc = spack_fc if '~mpi' in spec else spec['mpi'].mpifc # Intel - if '%intel' in self.spec: + if '%intel' in spec: cppflags.extend([ '-D__INTEL', '-D__HAS_ISO_C_BINDING', '-D__USE_CP2K_TRACE', - '-D__MKL' ]) fcflags.extend([ '-diag-disable 8290,8291,10010,10212,11060', @@ -290,9 +330,9 @@ def edit(self, spec, prefix): ldflags.append((lapack + blas).search_flags) libs.extend([str(x) for x in (fftw.libs, lapack, blas)]) - if self.spec.variants['blas'].value == 'mkl': + if '^intel-mkl' in spec or '^intel-parallel-studio+mkl' in spec: cppflags += ['-D__MKL'] - elif self.spec.variants['blas'].value == 'accelerate': + elif '^accelerate' in spec: cppflags += ['-D__ACCELERATE'] if '+cosma' in spec: @@ -302,7 +342,7 @@ def edit(self, spec, prefix): libs.extend(cosma) # MPI - if '+mpi' in self.spec: + if '+mpi' in spec: cppflags.extend([ '-D__parallel', '-D__SCALAPACK' @@ -312,7 +352,7 @@ def edit(self, spec, prefix): ldflags.append(scalapack.search_flags) libs.extend(scalapack) - libs.extend(self.spec['mpi:cxx'].libs) + libs.extend(spec['mpi:cxx'].libs) libs.extend(self.compiler.stdcxx_libs) if 'wannier90' in spec: @@ -331,10 +371,10 @@ def edit(self, spec, prefix): ldflags.append(libxc.libs.search_flags) libs.append(str(libxc.libs)) else: - fcflags += ['$(shell pkg-config --cflags libxcf03)'] - libs += ['$(shell pkg-config --libs libxcf03)'] + fcflags += pkgconf('--cflags', 'libxcf03', output=str).split() + libs += pkgconf('--libs', 'libxcf03', output=str).split() - if '+pexsi' in self.spec: + if '+pexsi' in spec: cppflags.append('-D__LIBPEXSI') fcflags.append('-I' + os.path.join( spec['pexsi'].prefix, 'fortran')) @@ -353,7 +393,7 @@ def edit(self, spec, prefix): ), ]) - if '+elpa' in self.spec: + if '+elpa' in spec: elpa = spec['elpa'] elpa_suffix = '_openmp' if '+openmp' in elpa else '' elpa_incdir = elpa.headers.directories[0] @@ -377,27 +417,27 @@ def edit(self, spec, prefix): int(elpa.version[1]))) fcflags += ['-I{0}'.format(os.path.join(elpa_incdir, 'elpa'))] - if self.spec.satisfies('+sirius'): + if spec.satisfies('+sirius'): sirius = spec['sirius'] cppflags.append('-D__SIRIUS') fcflags += ['-I{0}'.format(os.path.join(sirius.prefix, 'fortran'))] libs += list(sirius.libs) - if self.spec.satisfies('+cuda'): + if spec.satisfies('+cuda'): cppflags += ['-D__ACC'] libs += ['-lcudart', '-lnvrtc', '-lcuda'] - if self.spec.satisfies('+cuda_blas'): + if spec.satisfies('+cuda_blas'): cppflags += ['-D__DBCSR_ACC=2'] libs += ['-lcublas'] else: cppflags += ['-D__DBCSR_ACC'] - if self.spec.satisfies('+cuda_fft'): + if spec.satisfies('+cuda_fft'): cppflags += ['-D__PW_CUDA'] libs += ['-lcufft', '-lcublas'] - cuda_arch = self.spec.variants['cuda_arch'].value + cuda_arch = spec.variants['cuda_arch'].value if cuda_arch: gpuver = { '35': 'K40', @@ -407,7 +447,7 @@ def edit(self, spec, prefix): }[cuda_arch] if (cuda_arch == '35' - and self.spec.satisfies('+cuda_arch_35_k20x')): + and spec.satisfies('+cuda_arch_35_k20x')): gpuver = 'K20X' if 'smm=libsmm' in spec: @@ -430,12 +470,12 @@ def edit(self, spec, prefix): libs.append('-lsmm') elif 'smm=libxsmm' in spec: - cppflags.extend([ - '-D__LIBXSMM', - '$(shell pkg-config --cflags-only-other libxsmmf)', - ]) - fcflags.append('$(shell pkg-config --cflags-only-I libxsmmf)') - libs.append('$(shell pkg-config --libs libxsmmf)') + cppflags += ['-D__LIBXSMM'] + cppflags += pkgconf('--cflags-only-other', 'libxsmmf', + output=str).split() + fcflags += pkgconf('--cflags-only-I', 'libxsmmf', + output=str).split() + libs += pkgconf('--libs', 'libxsmmf', output=str).split() dflags.extend(cppflags) cflags.extend(cppflags) @@ -444,14 +484,21 @@ def edit(self, spec, prefix): nvflags.extend(cppflags) with open(self.makefile, 'w') as mkf: - if '+plumed' in self.spec: - # Include Plumed.inc in the Makefile + if '+plumed' in spec: + mkf.write('# include Plumed.inc as recommended by' + 'PLUMED to include libraries and flags') mkf.write('include {0}\n'.format( - self.spec['plumed'].package.plumed_inc + spec['plumed'].package.plumed_inc )) - mkf.write('CC = {0.compiler.cc}\n'.format(self)) - if '%intel' in self.spec: + mkf.write('\n# COMPILER, LINKER, TOOLS\n\n') + mkf.write('FC = {0}\n' + 'CC = {1}\n' + 'CXX = {2}\n' + 'LD = {3}\n' + .format(fc, cc, cxx, fc)) + + if '%intel' in spec: intel_bin_dir = ancestor(self.compiler.cc) # CPP is a commented command in Intel arch of CP2K # This is the hack through which cp2k developers avoid doing : @@ -459,33 +506,38 @@ def edit(self, spec, prefix): # ${CPP} .F > .f90 # # and use `-fpp` instead - mkf.write('CPP = # {0.compiler.cc} -P\n\n'.format(self)) - mkf.write('AR = {0}/xiar -r\n\n'.format(intel_bin_dir)) + mkf.write('CPP = # {0} -P\n'.format(spack_cc)) + mkf.write('AR = {0}/xiar -r\n'.format(intel_bin_dir)) else: - mkf.write('CPP = # {0.compiler.cc} -E\n\n'.format(self)) - mkf.write('AR = ar -r\n\n') - mkf.write('FC = {0}\n'.format(fc)) - mkf.write('LD = {0}\n'.format(fc)) + mkf.write('CPP = # {0} -E\n'.format(spack_cc)) + mkf.write('AR = ar -r\n') - if self.spec.satisfies('+cuda'): + if spec.satisfies('+cuda'): mkf.write('NVCC = {0}\n'.format( - os.path.join(self.spec['cuda'].prefix, 'bin', 'nvcc'))) + os.path.join(spec['cuda'].prefix, 'bin', 'nvcc'))) # Write compiler flags to file - mkf.write('DFLAGS = {0}\n\n'.format(' '.join(dflags))) - mkf.write('CPPFLAGS = {0}\n\n'.format(' '.join(cppflags))) - mkf.write('CFLAGS = {0}\n\n'.format(' '.join(cflags))) - mkf.write('CXXFLAGS = {0}\n\n'.format(' '.join(cxxflags))) - mkf.write('NVFLAGS = {0}\n\n'.format(' '.join(nvflags))) - mkf.write('FCFLAGS = {0}\n\n'.format(' '.join(fcflags))) - mkf.write('LDFLAGS = {0}\n\n'.format(' '.join(ldflags))) + def fflags(var, lst): + return '{0} = {1}\n\n'.format( + var, + ' \\\n\t'.join(lst)) + + mkf.write('\n# FLAGS & LIBRARIES\n') + mkf.write(fflags('DFLAGS', dflags)) + mkf.write(fflags('CPPFLAGS', cppflags)) + mkf.write(fflags('CFLAGS', cflags)) + mkf.write(fflags('CXXFLAGS', cxxflags)) + mkf.write(fflags('NVFLAGS', nvflags)) + mkf.write(fflags('FCFLAGS', fcflags)) + mkf.write(fflags('LDFLAGS', ldflags)) + mkf.write(fflags('LIBS', libs)) + if '%intel' in spec: - mkf.write('LDFLAGS_C = {0}\n\n'.format( - ' '.join(ldflags) + ' -nofor_main') - ) - mkf.write('LIBS = {0}\n\n'.format(' '.join(libs))) - mkf.write('GPUVER = {0}\n\n'.format(gpuver)) - mkf.write('DATA_DIR = {0}\n\n'.format(self.prefix.share.data)) + mkf.write(fflags('LDFLAGS_C', ldflags + ['-nofor_main'])) + + mkf.write('# CP2K-specific flags\n\n') + mkf.write('GPUVER = {0}\n'.format(gpuver)) + mkf.write('DATA_DIR = {0}\n'.format(self.prefix.share.data)) @property def build_directory(self): From fcbf0545c7bb653f346fbec9dab27b829f4cf1a8 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 27 Apr 2020 19:43:34 -0600 Subject: [PATCH 144/802] votca-*: add stable version (#16336) * votca-*: add stable version * votca-*: add myself as maintainer --- .../repos/builtin/packages/votca-csg-tutorials/package.py | 4 +++- var/spack/repos/builtin/packages/votca-csg/package.py | 4 +++- var/spack/repos/builtin/packages/votca-csgapps/package.py | 4 +++- var/spack/repos/builtin/packages/votca-tools/package.py | 2 ++ var/spack/repos/builtin/packages/votca-xtp/package.py | 4 +++- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py b/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py index bba3ad0b485..b20c767fce7 100644 --- a/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py +++ b/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py @@ -18,14 +18,16 @@ class VotcaCsgTutorials(CMakePackage): homepage = "http://www.votca.org" url = "https://github.com/votca/csg-tutorials/tarball/v1.4" git = "https://github.com/votca/csg-tutorials.git" + maintainers = ['junghans'] version('master', branch='master') + version('stable', branch='stable') version('1.6', sha256='54946c647724f1beb95942d47ec7f4cf7a95a59ec7268522693d5ec723585daf') version('1.5.1', sha256='e35cea92df0e7d05ca7b449c1b5d84d887a3a23c7796abe3b84e4d6feec7faca') version('1.5', sha256='03b841fb94129cf59781a7a5e3b71936c414aa9dfa17a50d7bc856d46274580c') version('1.4.1', sha256='623724192c3a7d76b603a74a3326f181045f10f38b9f56dce754a90f1a74556e') version('1.4', sha256='27d50acd68a9d8557fef18ec2b0c62841ae91c22275ab9afbd65c35e4dd5f719') - for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master"]: + for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master", "stable"]: depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") diff --git a/var/spack/repos/builtin/packages/votca-csg/package.py b/var/spack/repos/builtin/packages/votca-csg/package.py index 918791c3375..deffd257397 100644 --- a/var/spack/repos/builtin/packages/votca-csg/package.py +++ b/var/spack/repos/builtin/packages/votca-csg/package.py @@ -18,8 +18,10 @@ class VotcaCsg(CMakePackage): homepage = "http://www.votca.org" url = "https://github.com/votca/csg/tarball/v1.4" git = "https://github.com/votca/csg.git" + maintainers = ['junghans'] version('master', branch='master') + version('stable', branch='stable') version('1.6', sha256='8cf6a4ac3ef7347c720a44d8a676f8cbd1462e162f6113de39f27b89354465ea') version('1.5.1', sha256='7fca1261bd267bf38d2edd26259730fed3126c0c3fd91fb81940dbe17bb568fd') version('1.5', sha256='160387cdc51f87dd20ff2e2eed97086beee415d48f3c92f4199f6109068c8ff4') @@ -27,7 +29,7 @@ class VotcaCsg(CMakePackage): version('1.4', sha256='c13e7febd792de8c3d426203f089bd4d33b8067f9db5e8840e4579c88b61146e') depends_on("cmake@2.8:", type='build') - for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master"]: + for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master", "stable"]: depends_on('votca-tools@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") depends_on("gromacs~mpi@5.1:2019.9999") diff --git a/var/spack/repos/builtin/packages/votca-csgapps/package.py b/var/spack/repos/builtin/packages/votca-csgapps/package.py index 929bd73c790..dcca20339c5 100644 --- a/var/spack/repos/builtin/packages/votca-csgapps/package.py +++ b/var/spack/repos/builtin/packages/votca-csgapps/package.py @@ -18,14 +18,16 @@ class VotcaCsgapps(CMakePackage): homepage = "http://www.votca.org" url = "https://github.com/votca/csgapps/tarball/v1.4" git = "https://github.com/votca/csgapps.git" + maintainers = ['junghans'] version('master', branch='master') + version('stable', branch='stable') version('1.6', sha256='084bbc5b179bb7eb8f6671d2d5fa13e69e68946570c9120a7e4b10aff1866e2e') version('1.5.1', sha256='b4946711e88a1745688b6cce5aad872e6e2ea200fededf38d77a864883e3750e') version('1.5', sha256='18b40ce6222509bc70aa9d56b8c538cd5903edf7294d6f95530668e555206d5b') version('1.4.1', sha256='095d9ee4cd49d2fd79c10e0e84e6890b755e54dec6a5cd580a2b4241ba230a2b') version('1.4', sha256='4ea8348c2f7de3cc488f48fbd8652e69b52515441952766c06ff67ed1aaf69a0') - for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master"]: + for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master", "stable"]: depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") diff --git a/var/spack/repos/builtin/packages/votca-tools/package.py b/var/spack/repos/builtin/packages/votca-tools/package.py index 52c9683f13a..53cf0a26534 100644 --- a/var/spack/repos/builtin/packages/votca-tools/package.py +++ b/var/spack/repos/builtin/packages/votca-tools/package.py @@ -18,8 +18,10 @@ class VotcaTools(CMakePackage): homepage = "http://www.votca.org" url = "https://github.com/votca/tools/tarball/v1.4" git = "https://github.com/votca/tools.git" + maintainers = ['junghans'] version('master', branch='master') + version('stable', branch='stable') version('1.6', sha256='cfd0fedc80fecd009f743b5df47777508d76bf3ef294a508a9f11fbb42efe9a5') version('1.5.1', sha256='4be4fe25a2910e24e1720cd9022d214001d38196033ade8f9d6e618b4f47d5c4') version('1.5', sha256='a82a6596c24ff06e79eab17ca02f4405745ceeeb66369693a59023ad0b62cf22') diff --git a/var/spack/repos/builtin/packages/votca-xtp/package.py b/var/spack/repos/builtin/packages/votca-xtp/package.py index 96c8de3f5b9..bb14f582524 100644 --- a/var/spack/repos/builtin/packages/votca-xtp/package.py +++ b/var/spack/repos/builtin/packages/votca-xtp/package.py @@ -18,15 +18,17 @@ class VotcaXtp(CMakePackage): homepage = "http://www.votca.org" url = "https://github.com/votca/xtp/tarball/v1.4.1" git = "https://github.com/votca/xtp.git" + maintainers = ['junghans'] version('master', branch='master') + version('stable', branch='stable') version('1.6', sha256='695c2d9d3f924103481529f992e3723bdce10b8edfc294421a849cdf51dbbb6e') version('1.5.1', sha256='17a7722e5a32d236e4f1f6f88b680da4ba5f52bcf65bca3687c6a1c731d10881') version('1.5', sha256='b40b6d19e13f0650e84b8beebe86ce5c09071624f18d66df826f9d8584b4d3c8') version('1.4.1', sha256='4b53d371d6cf648c9e9e9bd1f104d349cafeaf10a02866e3f1d05c574b595a21') depends_on("cmake@2.8:", type='build') - for v in ["1.4.1", "1.5", "1.5.1", "1.6", "master"]: + for v in ["1.4.1", "1.5", "1.5.1", "1.6", "master", "stable"]: depends_on('votca-tools@%s' % v, when="@%s:%s.0" % (v, v)) depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("libxc", when='@1.5:') From 76e9171d25fcbdcf9be11d768340dd83f44f6a9b Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 28 Apr 2020 16:59:52 +0800 Subject: [PATCH 145/802] colordiff: modified url to fix 404 error (#16349) --- var/spack/repos/builtin/packages/colordiff/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/colordiff/package.py b/var/spack/repos/builtin/packages/colordiff/package.py index 7c7073cadc4..686f0840150 100644 --- a/var/spack/repos/builtin/packages/colordiff/package.py +++ b/var/spack/repos/builtin/packages/colordiff/package.py @@ -10,7 +10,7 @@ class Colordiff(Package): """Colorful diff utility.""" homepage = "https://www.colordiff.org" - url = "https://www.colordiff.org/colordiff-1.0.18.tar.gz" + url = "https://www.colordiff.org/archive/colordiff-1.0.18.tar.gz" version('1.0.18', sha256='29cfecd8854d6e19c96182ee13706b84622d7b256077df19fbd6a5452c30d6e0') From cf31472e5a34724ee3d20799b1705af4750d1eaa Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 28 Apr 2020 19:04:31 +0800 Subject: [PATCH 146/802] cassandra: added v3.11.6 and dependency on Java (#16341) --- var/spack/repos/builtin/packages/cassandra/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cassandra/package.py b/var/spack/repos/builtin/packages/cassandra/package.py index fab6d9c9c49..d6c4781cb4c 100644 --- a/var/spack/repos/builtin/packages/cassandra/package.py +++ b/var/spack/repos/builtin/packages/cassandra/package.py @@ -17,7 +17,10 @@ class Cassandra(Package): version('4.0-alpha2', sha256='6a8e99d8bc51efd500981c85c6aa547387b2fdbedecd692308f4632dbc1de3ba') version('4.0-alpha1', sha256='2fdf5e3d6c03a29d24a09cd52bb17575e5faccdc4c75a07edd63a9bf4f740105') - version('3.11.5', sha256='0ee3da12a2be86d7e03203fcc56c3589ddb38347b9cd031495a2b7fcf639fea6', preferred=True) + version('3.11.6', sha256='ce34edebd1b6bb35216ae97bd06d3efc338c05b273b78267556a99f85d30e45b', preferred=True) + version('3.11.5', sha256='0ee3da12a2be86d7e03203fcc56c3589ddb38347b9cd031495a2b7fcf639fea6') + + depends_on('java', type=('build', 'run')) def install(self, spec, prefix): install_tree('.', prefix) From 9615ac42cf06349137a2bf68495187f7525084a1 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 28 Apr 2020 05:08:00 -0600 Subject: [PATCH 147/802] votca-*: fix stable deps (#16339) --- var/spack/repos/builtin/packages/votca-tools/package.py | 8 ++++---- var/spack/repos/builtin/packages/votca-xtp/package.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/votca-tools/package.py b/var/spack/repos/builtin/packages/votca-tools/package.py index 53cf0a26534..09f8e5aab69 100644 --- a/var/spack/repos/builtin/packages/votca-tools/package.py +++ b/var/spack/repos/builtin/packages/votca-tools/package.py @@ -32,15 +32,15 @@ class VotcaTools(CMakePackage): patch("https://github.com/votca/tools/pull/229.patch", sha256="250d0b679e5d3104e3c8d6adf99751b71386c7ed4cbdae1c75408717ef3f401f", when="@1.6+mkl") variant('mkl', default=False, description='Build with MKL support') - conflicts('+mkl', when='@:1.5.9999') + conflicts('+mkl', when='@1.4:1.5.9999') depends_on("cmake@2.8:", type='build') depends_on("expat") depends_on("fftw") - depends_on("gsl", when="@:1.4.9999") - depends_on("eigen@3.3:", when="@1.5:") + depends_on("gsl", when="@1.4:1.4.9999") + depends_on("eigen@3.3:", when="@stable,1.5:") depends_on("boost") - depends_on("sqlite", when="@:1.5.9999") + depends_on("sqlite", when="@1.4:1.5.9999") depends_on('mkl', when='+mkl') def cmake_args(self): diff --git a/var/spack/repos/builtin/packages/votca-xtp/package.py b/var/spack/repos/builtin/packages/votca-xtp/package.py index bb14f582524..21cfdf4edb1 100644 --- a/var/spack/repos/builtin/packages/votca-xtp/package.py +++ b/var/spack/repos/builtin/packages/votca-xtp/package.py @@ -31,6 +31,6 @@ class VotcaXtp(CMakePackage): for v in ["1.4.1", "1.5", "1.5.1", "1.6", "master", "stable"]: depends_on('votca-tools@%s' % v, when="@%s:%s.0" % (v, v)) depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) - depends_on("libxc", when='@1.5:') + depends_on("libxc", when='@stable,1.5:') depends_on("ceres-solver", when='@1.5:1.5.9999') depends_on("hdf5+cxx~mpi") From a540e36922daa82b3383bda0c7901b22be9bd730 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 28 Apr 2020 14:53:22 +0200 Subject: [PATCH 148/802] relocate: remove an assertion in _make_relative (#16351) This was an oversight in #15654 since `os.path.isfile` checks that the something is a file in the current filesystem. --- lib/spack/spack/relocate.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py index 41770103b05..41faf273cd5 100644 --- a/lib/spack/spack/relocate.py +++ b/lib/spack/spack/relocate.py @@ -140,10 +140,6 @@ def _make_relative(reference_file, path_root, paths): Returns: List of relative paths """ - # Check prerequisites of the function - msg = "{0} is not a file".format(reference_file) - assert os.path.isfile(reference_file), msg - start_directory = os.path.dirname(reference_file) pattern = re.compile(path_root) relative_paths = [] From 50318e4ee31acb274b6ea8fdcf9918fc4af59ec9 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 28 Apr 2020 14:55:44 +0200 Subject: [PATCH 149/802] travis: extend the list of e-mails being notified of failures (#16352) --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 86b9f4d3dbb..227f6fc955f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -163,6 +163,8 @@ after_success: #============================================================================= notifications: email: - recipients: tgamblin@llnl.gov + recipients: + - tgamblin@llnl.gov + - massimiliano.culpo@gmail.com on_success: change on_failure: always From aec3589679022c658c2f554d3da156a31f7dec02 Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Tue, 28 Apr 2020 10:43:53 -0400 Subject: [PATCH 150/802] netcdf-c: Patch to support hdf linked against libtirpc (#15994) If hdf was built with +libtirpc, we need to add -ltirpc to our link flags. --- var/spack/repos/builtin/packages/netcdf-c/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/netcdf-c/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py index 42c28e53215..62a3a43cbe7 100644 --- a/var/spack/repos/builtin/packages/netcdf-c/package.py +++ b/var/spack/repos/builtin/packages/netcdf-c/package.py @@ -215,6 +215,9 @@ def configure_args(self): if '+szip' in hdf4: # This should also come from hdf4.libs libs.append('-lsz') + if '+libtirpc' in hdf4: + # This should also come from hdf4.libs + libs.append('-ltirpc') # Fortran support # In version 4.2+, NetCDF-C and NetCDF-Fortran have split. From 27b7d4bd210e9c97f85cb81e4167a365129177af Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Tue, 28 Apr 2020 11:51:30 -0400 Subject: [PATCH 151/802] openmpi: add additional variants (#16044) * Add variants to OpenMPI * Add variant for toggling runpath * Fix typo * Remove blank line whitespace --- .../repos/builtin/packages/openmpi/package.py | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 00cae9023bb..bb798e7b5fd 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -230,13 +230,16 @@ class Openmpi(AutotoolsPackage): ) # Additional support options + variant('atomics', default=False, description='Enable built-in atomics') variant('java', default=False, description='Build Java support') + variant('static', default=True, description='Build static libraries') variant('sqlite3', default=False, description='Build SQLite3 support') variant('vt', default=True, description='Build VampirTrace support') variant('thread_multiple', default=False, description='Enable MPI_THREAD_MULTIPLE support') variant('cuda', default=False, description='Enable CUDA support') variant('pmi', default=False, description='Enable PMI support') + variant('runpath', default=True, description='Enable wrapper runpath') variant('cxx', default=False, description='Enable C++ MPI bindings') variant('cxx_exceptions', default=False, description='Enable C++ Exception support') # Adding support to build a debug version of OpenMPI that activates @@ -421,6 +424,11 @@ def configure_args(self): '--with-wrapper-ldflags={0}'.format(' '.join(rpaths)) ]) + if '+atomics' in spec: + config_args.append('--enable-builtin-atomics') + else: + config_args.append('--disable-builtin-atomics') + # According to this comment on github: # # https://github.com/open-mpi/ompi/issues/4338#issuecomment-383982008 @@ -431,9 +439,14 @@ def configure_args(self): if spec.satisfies('schedulers=slurm'): config_args.append('--with-pmi={0}'.format(spec['slurm'].prefix)) if spec.satisfies('@3.1.3:') or spec.satisfies('@3.0.3'): - config_args.append('--enable-static') + if '+static' in spec: + config_args.append('--enable-static') else: - config_args.append('--enable-static') + if '+static' in spec: + config_args.append('--enable-static') + else: + config_args.append('--disable-static') + config_args.extend(self.with_or_without('pmi')) if spec.satisfies('@3.0.0:', strict=True): @@ -533,6 +546,13 @@ def configure_args(self): else: config_args.append('--without-cuda') + if '+runpath' in spec: + config_args.append('--enable-wrapper-rpath') + config_args.append('--enable-wrapper-runpath') + else: + config_args.append('--disable-wrapper-rpath') + config_args.append('--disable-wrapper-runpath') + if spec.satisfies('@:4'): if '+cxx' in spec: config_args.append('--enable-mpi-cxx') From 4aed5daeba171ebc84ade61522808cc45e45a8b8 Mon Sep 17 00:00:00 2001 From: Jeffrey Salmond Date: Tue, 28 Apr 2020 16:52:39 +0100 Subject: [PATCH 152/802] adjust petsc to build cuda only when requested explicitly (#16275) * adjust petsc+cuda to build cuda only when requested explicitly * activate petsc library support only when explicitly requested * flake8 fixes --- var/spack/repos/builtin/packages/petsc/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index cccced63a06..df1b6e1780e 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -300,13 +300,15 @@ def install(self, spec, prefix): 'mumps', 'trilinos', 'fftw', 'valgrind'): options.append( '--with-{library}={value}'.format( - library=library, value=('1' if library in spec else '0')) + library=library, + value=('1' if '+' + library in spec else '0')) ) - if library in spec: + if '+' + library in spec: options.append( '--with-{library}-dir={path}'.format( library=library, path=spec[library].prefix) ) + # PETSc does not pick up SuperluDist from the dir as they look for # superlu_dist_4.1.a if 'superlu-dist' in spec: From 2f88af4d2c4e1feffb2f697c064ea8ba8c1fe96e Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 29 Apr 2020 00:06:24 +0800 Subject: [PATCH 153/802] Add new package: kubernetes (#16347) --- .../builtin/packages/kubernetes/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/kubernetes/package.py diff --git a/var/spack/repos/builtin/packages/kubernetes/package.py b/var/spack/repos/builtin/packages/kubernetes/package.py new file mode 100644 index 00000000000..5af5f6e67db --- /dev/null +++ b/var/spack/repos/builtin/packages/kubernetes/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Kubernetes(Package): + """Kubernetes is an open source system for managing containerized + applications across multiple hosts. It provides basic mechanisms + for deployment, maintenance, and scaling of applications.""" + + homepage = "https://kubernetes.io" + url = "https://github.com/kubernetes/kubernetes/archive/v1.19.0-alpha.0.tar.gz" + + version('1.18.1', sha256='33ca738f1f4e6ad453b80f231f71e62470b822f21d44dc5b8121b2964ae8e6f8') + version('1.18.0', sha256='6bd252b8b5401ad6f1fb34116cd5df59153beced3881b98464862a81c083f7ab') + version('1.17.4', sha256='b61a6eb3bd5251884f34853cc51aa31c6680e7e476268fe06eb33f3d95294f62') + + depends_on('go', type='build') + + def install(self, spec, prefix): + make() + install_tree('_output/bin', prefix.bin) From a1e03151b2fa76b41c395c2a08d81463039530f9 Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 29 Apr 2020 00:07:02 +0800 Subject: [PATCH 154/802] Add new package: etcd (#16348) --- .../repos/builtin/packages/etcd/package.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 var/spack/repos/builtin/packages/etcd/package.py diff --git a/var/spack/repos/builtin/packages/etcd/package.py b/var/spack/repos/builtin/packages/etcd/package.py new file mode 100644 index 00000000000..fa21e6965b5 --- /dev/null +++ b/var/spack/repos/builtin/packages/etcd/package.py @@ -0,0 +1,35 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import platform + + +class Etcd(Package): + """etcd is a distributed reliable key-value store for the most + critical data of a distributed system""" + + homepage = "https://etcd.io/" + url = "https://github.com/etcd-io/etcd/archive/v3.4.7.tar.gz" + + version('3.4.7', sha256='858f5ad8c830a66f6bd0cd19386deea64d374185b32f40650ba979e0a70b8b97') + version('3.4.6', sha256='e9ebd003f5545a05017a8dbdde236d6c9d25f98ee35f8ba237e57b75330664f9') + version('3.4.5', sha256='2888f73dc52ba89da470d9bd40b1348ffe8b3da51cd8fe8bff5a1a8db2e50d46') + version('3.4.4', sha256='46bcd0d034fe9cc6ae86a9f2a72bdc78761ca99bfd5ae4b96b24e4ad93fc627e') + version('3.3.20', sha256='a9fcd2a3343f7f5b99acae956dd7c4fe12f16772b660f16fa9c24368df002477') + + depends_on('go@:1.13.9') + + def setup_run_environment(self, env): + if platform.machine() == 'aarch64': + env.set('ETCD_UNSUPPORTED_ARCH', 'arm64') + + def setup_build_environment(self, env): + if platform.machine() == 'aarch64': + env.set('ETCD_UNSUPPORTED_ARCH', 'arm64') + + def install(self, spec, prefix): + make() + install_tree('bin', prefix.bin) From 48de131b08dadbf40fde09a95f211b72c806fcea Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 29 Apr 2020 00:07:46 +0800 Subject: [PATCH 155/802] bazel: support for aarch64 platform (#16350) --- var/spack/repos/builtin/packages/bazel/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/bazel/package.py b/var/spack/repos/builtin/packages/bazel/package.py index 1ea1a6ce9cf..e9509e990b9 100644 --- a/var/spack/repos/builtin/packages/bazel/package.py +++ b/var/spack/repos/builtin/packages/bazel/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * +import platform class Bazel(Package): @@ -90,7 +91,10 @@ class Bazel(Package): # Until https://github.com/spack/spack/issues/14058 is fixed, use jdk to build bazel # Strict dependency on java@8 as per # https://docs.bazel.build/versions/master/install-compile-source.html#bootstrap-unix-prereq - depends_on('jdk@1.8.0:1.8.999', type=('build', 'run')) + if platform.machine() == 'aarch64': + depends_on('java@8:8.999', type=('build', 'run')) + else: + depends_on('jdk@1.8.0:1.8.999', type=('build', 'run')) depends_on('python', type=('build', 'run')) depends_on('zip', type=('build', 'run')) From d3ffb122748c0309f57b10a5cd69314d96129b91 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 28 Apr 2020 12:11:50 -0400 Subject: [PATCH 156/802] kokkos: add versions 3.0.00 and 3.1.00 (#16354) --- var/spack/repos/builtin/packages/kokkos/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index 82b93893e60..47dae741ba9 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -15,6 +15,8 @@ class Kokkos(Package): git = "https://github.com/kokkos/kokkos.git" version('develop', branch='develop') + version('3.1.00', sha256='b935c9b780e7330bcb80809992caa2b66fd387e3a1c261c955d622dae857d878') + version('3.0.00', sha256='c00613d0194a4fbd0726719bbed8b0404ed06275f310189b3493f5739042a92b') version('2.9.00', sha256='e0621197791ed3a381b4f02c78fa529f3cff3abb74d52157b4add17e8aa04bc4') version('2.8.00', sha256='1c72661f2d770517bff98837001b42b9c677d1df29f7493a1d7c008549aff630') version('2.7.24', sha256='a308a80ea1488f4c18884b828ce7ae9f5210b9a6b2f61b208d875084d8da8cb0') From af9c3b31de930ceb3a54b352829b6f731b35a8f5 Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 29 Apr 2020 00:12:50 +0800 Subject: [PATCH 157/802] Add new package: figlet (#16355) --- .../repos/builtin/packages/figlet/package.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 var/spack/repos/builtin/packages/figlet/package.py diff --git a/var/spack/repos/builtin/packages/figlet/package.py b/var/spack/repos/builtin/packages/figlet/package.py new file mode 100644 index 00000000000..8c6028d2463 --- /dev/null +++ b/var/spack/repos/builtin/packages/figlet/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Figlet(MakefilePackage): + """FIGlet is a program that creates large characters out of ordinary + screen characters.""" + + homepage = "http://www.figlet.org/" + url = "https://github.com/cmatsuoka/figlet/archive/2.2.5.tar.gz" + + version('2.2.5', sha256='4d366c4a618ecdd6fdb81cde90edc54dbff9764efb635b3be47a929473f13930') + version('2.2.4', sha256='970a18a2a32cca736ff11a5b77e26a54f31a0e08606b85d21d3d5c666937e03d') + version('2.2.3', sha256='168fa3c7a5888d6f796708780d3006f0e1871d83f32c4a10a84596b90ac35999') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + bins = ['figlet', 'chkfont', 'figlist', 'showfigfonts'] + for f in bins: + install(f, prefix.bin) + + mkdirp(prefix.man6) + manuals = ['figlet.6', 'chkfont.6', 'figlist.6', 'showfigfonts.6'] + for f in manuals: + install(f, prefix.man6) + + install_tree('./fonts', prefix.share.figlet) From 4ed5cee9408cbeedd5764c6d165743981e40bb9e Mon Sep 17 00:00:00 2001 From: Stephen McDowell Date: Tue, 28 Apr 2020 12:14:36 -0400 Subject: [PATCH 158/802] jsoncpp add 1.9.2, patch %clang@10 for implicit conversion (#16153) * add 1.9.2, patch %clang@10 for implicit conversion * flake8: "fix" hanging indent (squash: because is that really more readable?) --- var/spack/repos/builtin/packages/jsoncpp/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/jsoncpp/package.py b/var/spack/repos/builtin/packages/jsoncpp/package.py index 546ea104f22..2593c9ae0fe 100644 --- a/var/spack/repos/builtin/packages/jsoncpp/package.py +++ b/var/spack/repos/builtin/packages/jsoncpp/package.py @@ -15,6 +15,7 @@ class Jsoncpp(CMakePackage): homepage = "https://github.com/open-source-parsers/jsoncpp" url = "https://github.com/open-source-parsers/jsoncpp/archive/1.7.3.tar.gz" + version('1.9.2', sha256='77a402fb577b2e0e5d0bdc1cf9c65278915cdb25171e3452c68b6da8a561f8f0') version('1.9.1', sha256='c7b40f5605dd972108f503f031b20186f5e5bca2b65cd4b8bd6c3e4ba8126697') version('1.9.0', sha256='bdd3ba9ed1f110b3eb57474d9094e90ab239b93b4803b4f9b1722c281e85a4ac') version('1.8.4', sha256='c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6') @@ -42,6 +43,17 @@ class Jsoncpp(CMakePackage): depends_on('cmake@3.1:', type='build') depends_on('python', type='test') + # Ref: https://github.com/open-source-parsers/jsoncpp/pull/1023 + # Released in 1.9.2, patch does not apply cleanly across releases. + # May apply to more compilers in the future. + @when('@:1.9.1 %clang@10.0.0:') + def patch(self): + filter_file( + 'return d >= min && d <= max;', + 'return d >= static_cast(min) && ' + 'd <= static_cast(max);', + 'src/lib_json/json_value.cpp') + def cmake_args(self): args = ['-DBUILD_SHARED_LIBS=ON'] cxxstd = self.spec.variants['cxxstd'].value From 6e63ff1688e79878554a79b8d2132d4141cd1913 Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Tue, 28 Apr 2020 12:15:19 -0400 Subject: [PATCH 159/802] netcdf-fortran: add new variants (#16046) * Add additional variants to netcdf-fortran * Fix duplicate variant * Clean up variants based on review feedback * Addtional variant changes * Convert jna variant to single line * Fix proper version constraints for jna variant --- var/spack/repos/builtin/packages/netcdf-c/package.py | 4 ++++ var/spack/repos/builtin/packages/netcdf-fortran/package.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/netcdf-c/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py index 62a3a43cbe7..153a1057b17 100644 --- a/var/spack/repos/builtin/packages/netcdf-c/package.py +++ b/var/spack/repos/builtin/packages/netcdf-c/package.py @@ -61,6 +61,7 @@ def url_for_version(self, version): description='Produce position-independent code (for shared libs)') variant('shared', default=True, description='Enable shared library') variant('dap', default=False, description='Enable DAP support') + variant('jna', default=False, description='Enable JNA support') # It's unclear if cdmremote can be enabled if '--enable-netcdf-4' is passed # to the configure script. Since netcdf-4 support is mandatory we comment @@ -181,6 +182,9 @@ def configure_args(self): else: config_args.append('--disable-parallel4') + if self.spec.satisfies('@4.3.2:'): + config_args += self.enable_or_disable('jna') + # Starting version 4.1.3, --with-hdf5= and other such configure options # are removed. Variables CPPFLAGS, LDFLAGS, and LD_LIBRARY_PATH must be # used instead. diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py index 1b55df15078..e4dd1ea8840 100644 --- a/var/spack/repos/builtin/packages/netcdf-fortran/package.py +++ b/var/spack/repos/builtin/packages/netcdf-fortran/package.py @@ -27,6 +27,7 @@ class NetcdfFortran(AutotoolsPackage): variant('pic', default=True, description='Produce position-independent code (for shared libs)') variant('shared', default=True, description='Enable shared library') + variant('doc', default=False, description='Enable building docs') # We need to build with MPI wrappers if parallel I/O features is enabled: # https://www.unidata.ucar.edu/software/netcdf/docs/building_netcdf_fortran.html @@ -34,6 +35,7 @@ class NetcdfFortran(AutotoolsPackage): depends_on('netcdf-c~mpi', when='~mpi') depends_on('netcdf-c+mpi', when='+mpi') + depends_on('doxygen', when='+doc', type='build') # The default libtool.m4 is too old to handle NAG compiler properly: # https://github.com/Unidata/netcdf-fortran/issues/94 @@ -120,6 +122,11 @@ def configure_args(self): config_args.append('FC=%s' % self.spec['mpi'].mpifc) config_args.append('F77=%s' % self.spec['mpi'].mpif77) + if '+doc' in self.spec: + config_args.append('--enable-doxygen') + else: + config_args.append('--disable-doxygen') + return config_args @when('@:4.4.5') From 7670ae468f0f3deea60efd52eb096d35f96896f9 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 28 Apr 2020 09:54:02 -0700 Subject: [PATCH 160/802] Docs: Limit Microarch on Travis CI (#16200) Update the travis CI docs: limiting the microarch is essential for caching. --- lib/spack/docs/workflows.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/spack/docs/workflows.rst b/lib/spack/docs/workflows.rst index 239ee55a6ac..690d02d0203 100644 --- a/lib/spack/docs/workflows.rst +++ b/lib/spack/docs/workflows.rst @@ -1358,6 +1358,14 @@ The main points that are implemented below: the spack builds in the config. (The Travis yaml parser is a bit buggy on the echo command.) +#. Without control for the user, Travis jobs will run on various + ``x86_64`` microarchitectures. If you plan to cache build results, + e.g. to accelerate dependency builds, consider building for the + generic ``x86_64`` target only. + Limiting the microarchitecture will also find more packages when + working with the + `E4S Spack build cache `_. + #. Builds over 10 minutes need to be prefixed with ``travis_wait``. Alternatively, generate output once with ``spack install -v``. @@ -1400,7 +1408,9 @@ The main points that are implemented below: - if ! which spack >/dev/null; then mkdir -p $SPACK_ROOT && git clone --depth 50 https://github.com/spack/spack.git $SPACK_ROOT && - echo -e "config:""\n build_jobs:"" 2" > $SPACK_ROOT/etc/spack/config.yaml; + echo -e "config:""\n build_jobs:"" 2" > $SPACK_ROOT/etc/spack/config.yaml ** + echo -e "packages:""\n all:""\n target:"" ['x86_64']" + > $SPACK_ROOT/etc/spack/packages.yaml; fi - travis_wait spack install cmake@3.7.2~openssl~ncurses - travis_wait spack install boost@1.62.0~graph~iostream~locale~log~wave From 00d83cd79d7aa766d841853298de37e85c0fb458 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 28 Apr 2020 09:55:57 -0700 Subject: [PATCH 161/802] dev-build: stop before phase (#14699) Add `-b,--before` option to dev-build command to stop before the phase in question. --- lib/spack/spack/cmd/dev_build.py | 10 +++++-- lib/spack/spack/installer.py | 16 +++++++++-- lib/spack/spack/package.py | 6 ++++- lib/spack/spack/test/cmd/dev_build.py | 39 ++++++++++++++++++++++++++- share/spack/spack-completion.bash | 4 +-- 5 files changed, 67 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/cmd/dev_build.py b/lib/spack/spack/cmd/dev_build.py index c1004f24b38..7f424928085 100644 --- a/lib/spack/spack/cmd/dev_build.py +++ b/lib/spack/spack/cmd/dev_build.py @@ -37,10 +37,15 @@ def setup_parser(subparser): subparser.add_argument( '-q', '--quiet', action='store_true', dest='quiet', help="do not display verbose build output while installing") - subparser.add_argument( + arguments.add_common_arguments(subparser, ['spec']) + + stop_group = subparser.add_mutually_exclusive_group() + stop_group.add_argument( + '-b', '--before', type=str, dest='before', default=None, + help="phase to stop before when installing (default None)") + stop_group.add_argument( '-u', '--until', type=str, dest='until', default=None, help="phase to stop after when installing (default None)") - arguments.add_common_arguments(subparser, ['spec']) cd_group = subparser.add_mutually_exclusive_group() arguments.add_common_arguments(cd_group, ['clean', 'dirty']) @@ -91,4 +96,5 @@ def dev_build(self, args): verbose=not args.quiet, keep_stage=True, # don't remove source dir for dev build. dirty=args.dirty, + stop_before=args.before, stop_at=args.until) diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index 2bad1e88183..8886f3ed069 100644 --- a/lib/spack/spack/installer.py +++ b/lib/spack/spack/installer.py @@ -562,6 +562,8 @@ def package_id(pkg): even with exceptions. restage (bool): Force spack to restage the package source. skip_patch (bool): Skip patch stage of build if True. + stop_before (InstallPhase): stop execution before this + installation phase (or None) stop_at (InstallPhase): last installation phase to be executed (or None) tests (bool or list or set): False to run no tests, True to test @@ -779,12 +781,20 @@ def _check_last_phase(self, **kwargs): Ensures the package being installed has a valid last phase before proceeding with the installation. - The ``stop_at`` argument is removed from the installation arguments. + The ``stop_before`` or ``stop_at`` arguments are removed from the + installation arguments. Args: kwargs: + ``stop_before``': stop before execution of this phase (or None) ``stop_at``': last installation phase to be executed (or None) """ + self.pkg.stop_before_phase = kwargs.pop('stop_before', None) + if self.pkg.stop_before_phase is not None and \ + self.pkg.stop_before_phase not in self.pkg.phases: + tty.die('\'{0}\' is not an allowed phase for package {1}' + .format(self.pkg.stop_before_phase, self.pkg.name)) + self.pkg.last_phase = kwargs.pop('stop_at', None) if self.pkg.last_phase is not None and \ self.pkg.last_phase not in self.pkg.phases: @@ -1504,8 +1514,10 @@ def install(self, **kwargs): self._update_installed(task) # If we installed then we should keep the prefix + stop_before_phase = getattr(pkg, 'stop_before_phase', None) last_phase = getattr(pkg, 'last_phase', None) - keep_prefix = last_phase is None or keep_prefix + keep_prefix = keep_prefix or \ + (stop_before_phase is None and last_phase is None) except spack.directory_layout.InstallDirectoryAlreadyExistsError: tty.debug("Keeping existing install prefix in place.") diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index b8ded0364b3..40384077eae 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -115,7 +115,11 @@ def phase_wrapper(spec, prefix): return phase_wrapper def _on_phase_start(self, instance): - pass + # If a phase has a matching stop_before_phase attribute, + # stop the installation process raising a StopIteration + if getattr(instance, 'stop_before_phase', None) == self.name: + raise StopIteration('Stopping before \'{0}\' phase' + .format(self.name)) def _on_phase_exit(self, instance): # If a phase has a matching last_phase attribute, diff --git a/lib/spack/spack/test/cmd/dev_build.py b/lib/spack/spack/test/cmd/dev_build.py index a0075130676..6afd07d8159 100644 --- a/lib/spack/spack/test/cmd/dev_build.py +++ b/lib/spack/spack/test/cmd/dev_build.py @@ -3,8 +3,9 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os +import pytest import spack.spec -from spack.main import SpackCommand +from spack.main import SpackCommand, SpackCommandError dev_build = SpackCommand('dev-build') @@ -23,6 +24,22 @@ def test_dev_build_basics(tmpdir, mock_packages, install_mockery): assert f.read() == spec.package.replacement_string +def test_dev_build_before(tmpdir, mock_packages, install_mockery): + spec = spack.spec.Spec('dev-build-test-install@0.0.0').concretized() + + with tmpdir.as_cwd(): + with open(spec.package.filename, 'w') as f: + f.write(spec.package.original_string) + + dev_build('-b', 'edit', 'dev-build-test-install@0.0.0') + + assert spec.package.filename in os.listdir(os.getcwd()) + with open(spec.package.filename, 'r') as f: + assert f.read() == spec.package.original_string + + assert not os.path.exists(spec.prefix) + + def test_dev_build_until(tmpdir, mock_packages, install_mockery): spec = spack.spec.Spec('dev-build-test-install@0.0.0').concretized() @@ -39,6 +56,26 @@ def test_dev_build_until(tmpdir, mock_packages, install_mockery): assert not os.path.exists(spec.prefix) +def test_dev_build_before_until(tmpdir, mock_packages, install_mockery): + spec = spack.spec.Spec('dev-build-test-install@0.0.0').concretized() + + with tmpdir.as_cwd(): + with open(spec.package.filename, 'w') as f: + f.write(spec.package.original_string) + + with pytest.raises(SystemExit): + dev_build('-u', 'edit', '-b', 'edit', + 'dev-build-test-install@0.0.0') + + with pytest.raises(SpackCommandError): + dev_build('-u', 'phase_that_does_not_exist', + 'dev-build-test-install@0.0.0') + + with pytest.raises(SpackCommandError): + dev_build('-b', 'phase_that_does_not_exist', + 'dev-build-test-install@0.0.0') + + def test_dev_build_fails_already_installed(tmpdir, mock_packages, install_mockery): spec = spack.spec.Spec('dev-build-test-install@0.0.0').concretized() diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index a4d59220fa3..5a4fb027c9e 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -697,7 +697,7 @@ _spack_deprecate() { _spack_dev_build() { if $list_options then - SPACK_COMPREPLY="-h --help -j --jobs -d --source-path -i --ignore-dependencies -n --no-checksum --keep-prefix --skip-patch -q --quiet -u --until --clean --dirty" + SPACK_COMPREPLY="-h --help -j --jobs -d --source-path -i --ignore-dependencies -n --no-checksum --keep-prefix --skip-patch -q --quiet -b --before -u --until --clean --dirty" else _all_packages fi @@ -706,7 +706,7 @@ _spack_dev_build() { _spack_diy() { if $list_options then - SPACK_COMPREPLY="-h --help -j --jobs -d --source-path -i --ignore-dependencies -n --no-checksum --keep-prefix --skip-patch -q --quiet -u --until --clean --dirty" + SPACK_COMPREPLY="-h --help -j --jobs -d --source-path -i --ignore-dependencies -n --no-checksum --keep-prefix --skip-patch -q --quiet -b --before -u --until --clean --dirty" else _all_packages fi From 703111c01bd0c1693894dca4e56965d656682008 Mon Sep 17 00:00:00 2001 From: Jeffrey Salmond Date: Tue, 28 Apr 2020 20:36:55 +0100 Subject: [PATCH 162/802] Add amgx (#16357) * add amgx package * add amgx variants for mkl and magma support * fix typo in cmake option * flake8 fix formatting * Apply suggestions from code review - use mkl virtual provider Co-Authored-By: Adam J. Stewart * Apply suggestions from code review - fix copypasta Co-Authored-By: Adam J. Stewart Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/amgx/package.py | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 var/spack/repos/builtin/packages/amgx/package.py diff --git a/var/spack/repos/builtin/packages/amgx/package.py b/var/spack/repos/builtin/packages/amgx/package.py new file mode 100644 index 00000000000..ece1d67ee20 --- /dev/null +++ b/var/spack/repos/builtin/packages/amgx/package.py @@ -0,0 +1,58 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * + + +class Amgx(CMakePackage, CudaPackage): + """AmgX provides a simple path to accelerated core solver technology on + NVIDIA GPUs. AmgX provides up to 10x acceleration to the computationally + intense linear solver portion of simulations, and is especially well + suited for implicit unstructured methods. It is a high performance, + state-of-the-art library and includes a flexible solver composition + system that allows a user to easily construct complex nested solvers and + preconditioners.""" + + homepage = "https://developer.nvidia.com/amgx" + url = "https://github.com/nvidia/amgx/archive/v2.1.0.tar.gz" + + maintainers = ['js947'] + + version('2.1.0', sha256='6245112b768a1dc3486b2b3c049342e232eb6281a6021fffa8b20c11631f63cc') + version('2.0.1', sha256='6f9991f1836fbf4ba2114ce9f49febd0edc069a24f533bd94fd9aa9be72435a7') + version('2.0.0', sha256='8ec7ea8412be3de216fcf7243c4e2a8bcf76878e6865468e4238630a082a431b') + + variant('cuda', default=True, description='Build with CUDA') + variant('mpi', default=True, description='Enable MPI support') + variant('mkl', default=False, description='Enable MKL support') + variant('magma', default=False, description='Enable Magma support') + + depends_on('mpi', when='+mpi') + depends_on('mkl', when='+mkl') + depends_on('magma', when='+magma') + + def cmake_args(self): + args = [] + args.append("-DCMAKE_NO_MPI={0}".format( + '1' if '+mpi' not in self.spec else '0')) + + if '+cuda' in self.spec: + args.append('-DWITH_CUDA=ON') + cuda_arch = self.spec.variants['cuda_arch'].value + if cuda_arch is not None: + args.append('-DCUDA_ARCH={0}'.format(cuda_arch[0])) + else: + args.append('-DWITH_CUDA=OFF') + + if '+mkl' in self.spec: + args.append('-DMKL_ROOT_DIR={0}'.format( + self.spec['mkl'].prefix)) + + if '+magma' in self.spec: + args.append('-DMAGMA_ROOT_DIR={0}'.format( + self.spec['magma'].prefix)) + + return args From 2d02769bea639eff5f9bf110fb9fddb90bfc6708 Mon Sep 17 00:00:00 2001 From: Hadrien G Date: Wed, 29 Apr 2020 02:17:13 +0200 Subject: [PATCH 163/802] [dd4hep] Fix inappropriate patch line break (#16361) Sometimes, text editors automate things a little too much... --- var/spack/repos/builtin/packages/dd4hep/tbb2.patch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dd4hep/tbb2.patch b/var/spack/repos/builtin/packages/dd4hep/tbb2.patch index 7e128f11943..932458001c2 100644 --- a/var/spack/repos/builtin/packages/dd4hep/tbb2.patch +++ b/var/spack/repos/builtin/packages/dd4hep/tbb2.patch @@ -2,8 +2,7 @@ diff --git a/DDDigi/src/DigiKernel.cpp b/DDDigi/src/DigiKernel.cpp index f2c2e86c..f168ef9b 100644 --- a/DDDigi/src/DigiKernel.cpp +++ b/DDDigi/src/DigiKernel.cpp -@@ -273,7 +273,7 @@ void DigiKernel::submit(const DigiAction::Actors& actions, Digi +@@ -273,7 +273,7 @@ void DigiKernel::submit(const DigiAction::Actors& actions, Digi if ( parallel ) { tbb::task_group que; for ( auto* i : actions ) From 25c17e0ca6ed064ac229b0a2a8aa2d96f338d711 Mon Sep 17 00:00:00 2001 From: Ryan Mast Date: Tue, 28 Apr 2020 17:21:22 -0700 Subject: [PATCH 164/802] helics: Add version 2.5.0 (#16364) Add HELICS package version 2.5.0 --- var/spack/repos/builtin/packages/helics/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/helics/package.py b/var/spack/repos/builtin/packages/helics/package.py index 7aa4a06c466..c37dc5cc38a 100644 --- a/var/spack/repos/builtin/packages/helics/package.py +++ b/var/spack/repos/builtin/packages/helics/package.py @@ -19,6 +19,7 @@ class Helics(CMakePackage): version('develop', branch='develop', submodules=True) version('master', branch='master', submodules=True) + version('2.5.0', sha256='6f4f9308ebb59d82d71cf068e0d9d66b6edfa7792d61d54f0a61bf20dd2a7428') version('2.4.2', sha256='957856f06ed6d622f05dfe53df7768bba8fe2336d841252f5fac8345070fa5cb') version('2.4.1', sha256='ac077e9efe466881ea366721cb31fb37ea0e72a881a717323ba4f3cdda338be4') From 8b4b7aacbb4de97fe068a9ca4746629186042727 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 28 Apr 2020 23:14:17 -0500 Subject: [PATCH 165/802] py-pandas: add 1.0.X release (#16366) --- .../builtin/packages/py-pandas/package.py | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index 2403197c9e5..68e32c042d2 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -7,17 +7,12 @@ class PyPandas(PythonPackage): - """pandas is a Python package providing fast, flexible, and expressive - data structures designed to make working with relational or - labeled data both easy and intuitive. It aims to be the - fundamental high-level building block for doing practical, real - world data analysis in Python. Additionally, it has the broader - goal of becoming the most powerful and flexible open source data - analysis / manipulation tool available in any language. + """pandas is a fast, powerful, flexible and easy to use open source + data analysis and manipulation tool, built on top of the Python + programming language.""" - """ - homepage = "http://pandas.pydata.org/" - url = "https://pypi.io/packages/source/p/pandas/pandas-0.25.1.tar.gz" + homepage = "https://pandas.pydata.org/" + url = "https://pypi.io/packages/source/p/pandas/pandas-1.0.3.tar.gz" maintainers = ['adamjstewart'] import_modules = [ @@ -34,6 +29,12 @@ class PyPandas(PythonPackage): 'pandas.api.extensions' ] + version('1.0.3', sha256='32f42e322fb903d0e189a4c10b75ba70d90958cc4f66a1781ed027f1a1d14586') + version('1.0.2', sha256='76334ba36aa42f93b6b47b79cbc32187d3a178a4ab1c3a478c8f4198bcd93a73') + version('1.0.1', sha256='3c07765308f091d81b6735d4f2242bb43c332cc3461cae60543df6b10967fe27') + version('1.0.0', sha256='3ea6cc86931f57f18b1240572216f09922d91b19ab8a01cf24734394a3db3bec') + version('0.25.3', sha256='52da74df8a9c9a103af0a72c9d5fdc8e0183a90884278db7f386b5692a2220a4') + version('0.25.2', sha256='ca91a19d1f0a280874a24dca44aadce42da7f3a7edb7e9ab7c7baad8febee2be') version('0.25.1', sha256='cb2e197b7b0687becb026b84d3c242482f20cbb29a9981e43604eb67576da9f6') version('0.25.0', sha256='914341ad2d5b1ea522798efa4016430b66107d05781dbfe7cf05eba8f37df995') version('0.24.2', sha256='4f919f409c433577a501e023943e582c57355d50a724c589e78bc1d551a535a2') @@ -47,9 +48,12 @@ class PyPandas(PythonPackage): version('0.16.1', sha256='570d243f8cb068bf780461b9225d2e7bef7c90aa10d43cf908fe541fc92df8b6') version('0.16.0', sha256='4013de6f8796ca9d2871218861823bd9878a8dfacd26e08ccf9afdd01bbad9f1') - # https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies # Required dependencies + # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#dependencies + depends_on('python@3.6.1:', type=('build', 'run'), when='@1:') depends_on('python@3.5.3:', type=('build', 'run'), when='@0.25:') + # https://pandas.pydata.org/docs/whatsnew/v1.0.0.html#build-changes + depends_on('py-cython@0.29.13:', type='build', when='@1:') depends_on('py-setuptools@24.2.0:', type='build') depends_on('py-numpy', type=('build', 'run')) depends_on('py-numpy@1.13.3:', type=('build', 'run'), when='@0.25:') @@ -58,16 +62,18 @@ class PyPandas(PythonPackage): depends_on('py-pytz@2017.2:', type=('build', 'run')) # Recommended dependencies + # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#recommended-dependencies depends_on('py-numexpr', type=('build', 'run')) depends_on('py-numexpr@2.6.2:', type=('build', 'run'), when='@0.25:') depends_on('py-bottleneck', type=('build', 'run')) depends_on('py-bottleneck@1.2.1:', type=('build', 'run'), when='@0.25:') # Optional dependencies - # https://pandas.pydata.org/pandas-docs/stable/install.html#optional-dependencies + # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#optional-dependencies # Test dependencies # https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#running-the-test-suite depends_on('py-pytest@4.0.2:', type='test') + depends_on('py-pytest-xdist', type='test') depends_on('py-hypothesis@3.58:', type='test') depends_on('py-pyarrow@0.10.0:', type='test') From 67ad8ed546a8f8a524c3f8fed0d619e4cbd442dd Mon Sep 17 00:00:00 2001 From: "Dr. Christian Tacke" <58549698+ChristianTackeGSI@users.noreply.github.com> Date: Wed, 29 Apr 2020 09:05:17 +0200 Subject: [PATCH 166/802] root: added v6.20.04, better variant handling (#16362) * Add version 6.20.04 * This version still requires numpy for +python * ROOT 6.20 renamed the define from python to pyroot: Add appropiate handling --- var/spack/repos/builtin/packages/root/package.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index 9db1a702540..b1591f455e3 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -26,6 +26,7 @@ class Root(CMakePackage): # Development version (when more recent than production). # Production version + version('6.20.04', sha256='1f8c76ccdb550e64e6ddb092b4a7e9d0a10655ef80044828cba12d5e7c874472') version('6.20.02', sha256='0997586bf097c0afbc6f08edbffcebf5eb6a4237262216114ba3f5c8087dcba6') version('6.20.00', sha256='68421eb0434b38b66346fa8ea6053a0fdc9a6d254e4a72019f4e3633ae118bf0') version('6.18.04', sha256='315a85fc8363f8eb1bffa0decbf126121258f79bd273513ed64795675485cfa4', @@ -213,10 +214,10 @@ class Root(CMakePackage): depends_on('python@2.7:', when='+python', type=('build', 'run')) depends_on('py-numpy', type=('build', 'run'), when='+tmva') # This numpy dependency was not intended and will hopefully - # be fixed in 6.20.04. + # be fixed in 6.20.06. # See: https://sft.its.cern.ch/jira/browse/ROOT-10626 depends_on('py-numpy', type=('build', 'run'), - when='@6.20.00:6.20.03 +python') + when='@6.20.00:6.20.05 +python') # Optional dependencies depends_on('davix @0.7.1:', when='+davix') @@ -378,7 +379,6 @@ def cmake_args(self): ['pgsql', 'postgres'], ['pythia6'], ['pythia8'], - ['python'], ['qt', 'qt4'], # See conflicts ['qtgsi', 'qt4'], # See conflicts ['r', 'R'], @@ -409,6 +409,12 @@ def cmake_args(self): options = self._process_opts(control_opts, builtin_opts, feature_opts) + # Some special features + if self.spec.satisfies('@6.20:'): + options.append(self.define_from_variant('pyroot', 'python')) + else: + options.append(self.define_from_variant('python')) + # #################### Compiler options #################### if sys.platform == 'darwin': From 6c0d4fb5e5a533bbe5b86711b7e09c3b9f1ca758 Mon Sep 17 00:00:00 2001 From: Ryan Mast Date: Wed, 29 Apr 2020 00:10:33 -0700 Subject: [PATCH 167/802] helics: fixed dependency on boost (#16363) --- var/spack/repos/builtin/packages/helics/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/helics/package.py b/var/spack/repos/builtin/packages/helics/package.py index c37dc5cc38a..ba804784369 100644 --- a/var/spack/repos/builtin/packages/helics/package.py +++ b/var/spack/repos/builtin/packages/helics/package.py @@ -43,7 +43,7 @@ class Helics(CMakePackage): # Build dependency depends_on('git', type='build', when='@master:') depends_on('cmake@3.4:', type='build') - depends_on('boost@1.70: ~atomic ~chrono ~date_time ~exception ~filesystem ~graph ~iostreams ~locale ~log ~math ~program_options ~random ~regex ~serialization ~signals ~system ~test ~thread ~timer ~wave', type='build', when='+boost') + depends_on('boost@1.70:', type='build', when='+boost') depends_on('swig@3.0:', type='build', when='+swig') depends_on('libzmq@4.3:', when='+zmq') From c37857f9956a4f07a395e3b7d6e4ed62564e6f0b Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Wed, 29 Apr 2020 00:27:27 -0700 Subject: [PATCH 168/802] openscenegraph: add v3.4.0, v3.4.1; add '+ffmpeg' (#16360) * openscenegraph: add v3.4.0/3.4.1, update versioning to use git, improve dependency handling (esp. for ffmpeg, opengl) * openscenegraph: add '+ffmpeg' variant, add 'jasper' dependency, clean up cmake config variables * openscenegraph: reverted fetches to use checksums to improve reliability * openscenegraph: add a few more explicit dependencies (e.g. png, tiff, glib). --- .../openscenegraph/glibc-jasper.patch | 15 ++++++++ .../packages/openscenegraph/package.py | 37 +++++++++++++++---- 2 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 var/spack/repos/builtin/packages/openscenegraph/glibc-jasper.patch diff --git a/var/spack/repos/builtin/packages/openscenegraph/glibc-jasper.patch b/var/spack/repos/builtin/packages/openscenegraph/glibc-jasper.patch new file mode 100644 index 00000000000..d826b8885ad --- /dev/null +++ b/var/spack/repos/builtin/packages/openscenegraph/glibc-jasper.patch @@ -0,0 +1,15 @@ +diff --git a/src/osgPlugins/jp2/ReaderWriterJP2.cpp b/src/osgPlugins/jp2/ReaderWriterJP2.cpp +index 7b3c6cc..d949c2c 100644 +--- a/src/osgPlugins/jp2/ReaderWriterJP2.cpp ++++ b/src/osgPlugins/jp2/ReaderWriterJP2.cpp +@@ -15,6 +15,10 @@ + #include + #include + ++#ifndef SIZE_MAX ++#define SIZE_MAX ((size_t)(-1)) ++#endif ++ + extern "C" + { + #include diff --git a/var/spack/repos/builtin/packages/openscenegraph/package.py b/var/spack/repos/builtin/packages/openscenegraph/package.py index 5f2646729e1..2a6da5dbff2 100644 --- a/var/spack/repos/builtin/packages/openscenegraph/package.py +++ b/var/spack/repos/builtin/packages/openscenegraph/package.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - from spack import * @@ -12,41 +11,63 @@ class Openscenegraph(CMakePackage): that's used in a variety of visual simulation applications.""" homepage = "http://www.openscenegraph.org" + git = "https://github.com/openscenegraph/OpenSceneGraph.git" url = "https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.6.4.tar.gz" version('3.6.5', sha256='aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12') version('3.6.4', sha256='81394d1b484c631028b85d21c5535280c21bbd911cb058e8746c87e93e7b9d33') + version('3.4.1', sha256='930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5') + version('3.4.0', sha256='0d5efe12b923130d14a6fce5866675d7625fcfb1c004c9f9b10034b9feb61ac2') version('3.2.3', sha256='a1ecc6524197024834e1277916922b32f30246cb583e27ed19bf3bf889534362') version('3.1.5', sha256='dddecf2b33302076712100af59b880e7647bc595a9a7cc99186e98d6e0eaeb5c') variant('shared', default=True, description='Builds a shared version of the library') + variant('ffmpeg', default=False, description='Builds ffmpeg plugin for audio encoding/decoding') depends_on('cmake@2.8.7:', type='build') + depends_on('qt+opengl') depends_on('qt@4:', when='@3.2:') depends_on('qt@:4', when='@:3.1') - depends_on('zlib') depends_on('libxinerama') depends_on('libxrandr') + depends_on('libpng') + depends_on('jasper') + depends_on('libtiff') + depends_on('glib') + depends_on('zlib') + + depends_on('ffmpeg+avresample', when='+ffmpeg') + # https://github.com/openscenegraph/OpenSceneGraph/issues/167 + depends_on('ffmpeg@:2', when='@:3.4.0+ffmpeg') + + patch('glibc-jasper.patch', when='@3.4%gcc') def cmake_args(self): spec = self.spec shared_status = 'ON' if '+shared' in spec else 'OFF' + opengl_profile = 'GL{0}'.format(spec['gl'].version.up_to(1)) args = [ + # Variant Options # '-DDYNAMIC_OPENSCENEGRAPH={0}'.format(shared_status), '-DDYNAMIC_OPENTHREADS={0}'.format(shared_status), + '-DOPENGL_PROFILE={0}'.format(opengl_profile), + + # General Options # '-DBUILD_OSG_APPLICATIONS=OFF', '-DOSG_NOTIFY_DISABLED=ON', '-DLIB_POSTFIX=', '-DCMAKE_RELWITHDEBINFO_POSTFIX=', + '-DCMAKE_MINSIZEREL_POSTFIX=' ] - if spec.satisfies('@:3.2'): - args.extend([ - '-DZLIB_INCLUDE_DIR={0}'.format(spec['zlib'].prefix.include), - '-DZLIB_LIBRARY={0}/libz.{1}'.format(spec['zlib'].prefix.lib, - dso_suffix), - ]) + + if spec.satisfies('~ffmpeg'): + for ffmpeg_lib in ['libavcodec', 'libavformat', 'libavutil']: + args.extend([ + '-DFFMPEG_{0}_INCLUDE_DIRS='.format(ffmpeg_lib.upper()), + '-DFFMPEG_{0}_LIBRARIES='.format(ffmpeg_lib.upper()), + ]) # NOTE: This is necessary in order to allow OpenSceneGraph to compile # despite containing a number of implicit bool to int conversions. From 97e67b385c03378868d84a0e2d90c337ebf3ba0d Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Wed, 29 Apr 2020 00:33:22 -0700 Subject: [PATCH 169/802] ffmpeg: add v1.0.10, v2.8.15; add '+avresample'; improve variant handling (#16359) * ffmpeg: add older versions (i.e. 2.8.15, 1.0.10), add 'avresample' variant * ffmpeg: update variant handling to support older versions (i.e. 2.8.15, 1.0.10) --- .../repos/builtin/packages/ffmpeg/package.py | 123 +++++++++++------- 1 file changed, 78 insertions(+), 45 deletions(-) diff --git a/var/spack/repos/builtin/packages/ffmpeg/package.py b/var/spack/repos/builtin/packages/ffmpeg/package.py index eda88445ee6..3eb365848cc 100644 --- a/var/spack/repos/builtin/packages/ffmpeg/package.py +++ b/var/spack/repos/builtin/packages/ffmpeg/package.py @@ -13,10 +13,12 @@ class Ffmpeg(AutotoolsPackage): homepage = "https://ffmpeg.org" url = "http://ffmpeg.org/releases/ffmpeg-4.1.1.tar.bz2" - version('4.2.2', sha256='b620d187c26f76ca19e74210a0336c3b8380b97730df5cdf45f3e69e89000e5c') - version('4.1.1', sha256='0cb40e3b8acaccd0ecb38aa863f66f0c6e02406246556c2992f67bf650fab058') - version('4.1', sha256='b684fb43244a5c4caae652af9022ed5d85ce15210835bce054a33fb26033a1a5') - version('3.2.4', sha256='c0fa3593a2e9e96ace3c1757900094437ad96d1d6ca19f057c378b5f394496a4') + version('4.2.2', sha256='b620d187c26f76ca19e74210a0336c3b8380b97730df5cdf45f3e69e89000e5c') + version('4.1.1', sha256='0cb40e3b8acaccd0ecb38aa863f66f0c6e02406246556c2992f67bf650fab058') + version('4.1', sha256='b684fb43244a5c4caae652af9022ed5d85ce15210835bce054a33fb26033a1a5') + version('3.2.4', sha256='c0fa3593a2e9e96ace3c1757900094437ad96d1d6ca19f057c378b5f394496a4') + version('2.8.15', sha256='35647f6c1f6d4a1719bc20b76bf4c26e4ccd665f46b5676c0e91c5a04622ee21') + version('1.0.10', sha256='1dbde434c3b5c573d3b2ffc1babe3814f781c10c4bc66193a4132a44c9715176') # Licensing variant('gpl', default=True, @@ -53,9 +55,10 @@ class Ffmpeg(AutotoolsPackage): # variant('libxml2', default=False, # description='XML parsing, needed for dash demuxing support') variant('libzmq', default=False, description='message passing via libzmq') - variant('lzma', default=True, description='lzma support') + variant('lzma', default=False, description='lzma support') + variant('avresample', default=False, description='AV reasmpling component') variant('openssl', default=False, description='needed for https support') - variant('sdl2', default=True, description='sdl2 support') + variant('sdl2', default=False, description='sdl2 support') variant('shared', default=True, description='build shared libraries') depends_on('alsa-lib') @@ -84,58 +87,88 @@ class Ffmpeg(AutotoolsPackage): depends_on('speex', when='+libspeex') depends_on('xz', when='+lzma') + # TODO: enable when libxml2 header issue is resolved + # conflicts('+libxml2', when='@:3.999') + # See: https://www.ffmpeg.org/index.html#news (search AV1) + conflicts('+libaom', when='@:3.999') + # All of the following constraints were sourced from the official 'ffmpeg' + # change log, which can be found here: + # https://raw.githubusercontent.com/FFmpeg/FFmpeg/release/4.0/Changelog + conflicts('+sdl2', when='@:3.1.999') + conflicts('+libsnappy', when='@:2.7.999') + conflicts('+X', when='@:2.4.999') + conflicts('+lzma', when='@2.3.999:') + conflicts('+libwebp', when='@2.1.999:') + conflicts('+libssh', when='@2.0.999:') + conflicts('+libzmq', when='@:1.999.999') + + def enable_or_disable_meta(self, variant, options): + switch = 'enable' if '+{0}'.format(variant) in self.spec else 'disable' + return ['--{0}-{1}'.format(switch, option) for option in options] + def configure_args(self): spec = self.spec config_args = ['--enable-pic'] - if '+X' in spec: - config_args.extend([ - '--enable-libxcb', - '--enable-libxcb-shape', - '--enable-libxcb-shm', - '--enable-libxcb-xfixes', - '--enable-xlib', - ]) - else: - config_args.extend([ - '--disable-libxcb', - '--disable-libxcb-shape', - '--disable-libxcb-shm', - '--disable-libxcb-xfixes', - '--disable-xlib', + # '+X' meta variant # + + xlib_opts = [] + + if spec.satisfies('@2.5:'): + xlib_opts.extend([ + 'libxcb', + 'libxcb-shape', + 'libxcb-shm', + 'libxcb-xfixes', + 'xlib', ]) - if '+drawtext' in spec: - config_args.extend([ - '--enable-libfontconfig', - '--enable-libfreetype', - '--enable-libfribidi', - ]) - else: - config_args.extend([ - '--disable-libfontconfig', - '--disable-libfreetype', - '--disable-libfribidi', - ]) - for variant in [ + config_args += self.enable_or_disable_meta('X', xlib_opts) + + # '+drawtext' meta variant # + + drawtext_opts = [ + '{0}fontconfig'.format('lib' if spec.satisfies('@3:') else ''), + 'libfreetype', + ] + + if spec.satisfies('@2.3:'): + drawtext_opts.append('libfribidi') + + config_args += self.enable_or_disable_meta('drawtext', drawtext_opts) + + # other variants # + + variant_opts = [ 'bzlib', - 'libaom', 'libmp3lame', 'libopenjpeg', 'libopus', - 'libsnappy', 'libspeex', - 'libssh', 'libvorbis', - 'libwebp', - # TODO: enable when libxml2 header issue is resolved - # 'libxml2', - 'libzmq', - 'lzma', + 'avresample', 'openssl', - 'sdl2', 'shared', - ]: - config_args += self.enable_or_disable(variant) + ] + + if spec.satisfies('@2.0:'): + variant_opts.append('libzmq') + if spec.satisfies('@2.1:'): + variant_opts.append('libssh') + if spec.satisfies('@2.2:'): + variant_opts.append('libwebp') + if spec.satisfies('@2.4:'): + variant_opts.append('lzma') + if spec.satisfies('@2.8:'): + variant_opts.append('libsnappy') + if spec.satisfies('@3.2:'): + variant_opts.append('sdl2') + if spec.satisfies('@4:'): + variant_opts.append('libaom') + # TODO: enable when libxml2 header issue is resolved + # variant_opts.append('libxml2') + + for variant_opt in variant_opts: + config_args += self.enable_or_disable(variant_opt) return config_args From 39bbe8f9d489e2e53a857b725b5d88236e54fee6 Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Wed, 29 Apr 2020 06:19:17 -0700 Subject: [PATCH 170/802] Update timemory to support new dependencies and expose more build options (#16241) * Update timemory/package.py to support new dependencies and expose more build options * Added missing 'use_arch' option handling * Fixes for python 2.6 * Fix pyflake error F632 * F632 flake fixes * Update package.py * Update package.py * 80 char width + added extra conflicts + fixed kokkos_modules reference * 79 char width * Removed submodule builds - added allinea_map variant - disabled caliper by default - added ompt_{standalone,llvm} variants * flake8 updates * 79 char width --- .../builtin/packages/timemory/package.py | 198 +++++++++++++----- 1 file changed, 142 insertions(+), 56 deletions(-) diff --git a/var/spack/repos/builtin/packages/timemory/package.py b/var/spack/repos/builtin/packages/timemory/package.py index 53dada7f342..8561ca07f31 100644 --- a/var/spack/repos/builtin/packages/timemory/package.py +++ b/var/spack/repos/builtin/packages/timemory/package.py @@ -6,6 +6,7 @@ # ---------------------------------------------------------------------------- from spack import * +from sys import platform class Timemory(CMakePackage): @@ -22,18 +23,70 @@ class Timemory(CMakePackage): version('3.0.0', commit='b36b1673b2c6b7ff3126d8261bef0f8f176c7beb', submodules=True) + linux = False if platform == 'darwin' else True + + variant('shared', default=True, description='Build shared libraries') + variant('static', default=False, description='Build static libraries') variant('python', default=True, description='Enable Python support') - variant('mpi', default=False, description='Enable MPI support') - variant('tau', default=True, description='Enable TAU support') - variant('papi', default=True, description='Enable PAPI support') - variant('cuda', default=True, description='Enable CUDA support') - variant('cupti', default=True, description='Enable CUPTI support') + variant('mpi', default=True, description='Enable MPI support') + variant('tau', default=False, description='Enable TAU support') + variant('papi', default=linux, description='Enable PAPI support') + variant('cuda', default=linux, description='Enable CUDA support') + variant('cupti', default=linux, description='Enable CUPTI support') + variant('tools', default=True, description='Build/install extra tools') + variant('vtune', default=False, description='Enable VTune support') variant('upcxx', default=False, description='Enable UPC++ support') - variant('gotcha', default=True, description='Enable GOTCHA support') - variant('likwid', default=True, description='Enable LIKWID support') - variant('caliper', default=True, description='Enable Caliper support') + variant('gotcha', default=linux, description='Enable GOTCHA support') + variant('likwid', default=linux, description='Enable LIKWID support') + variant('caliper', default=False, description='Enable Caliper support') + variant('dyninst', default=linux, + description='Build dynamic instrumentation tools') + variant('examples', default=False, description='Build/install examples') variant('gperftools', default=True, description='Enable gperftools support') + variant('kokkos_tools', default=True, + description=('Build generic kokkos-tools libraries, e.g. ' + 'kp_timemory, kp_timemory_filter')) + variant('kokkos_build_config', default=False, + description=('Build pre-configured (i.e. dedicated) kokkos-tools ' + 'libraries, e.g. kp_timemory_cpu_flops')) + variant('cuda_arch', default='auto', description='CUDA architecture name', + values=('auto', 'kepler', 'tesla', 'maxwell', 'pascal', + 'volta', 'turing'), multi=False) + variant('cpu_target', default='auto', + description=('Build for specific cpu architecture (specify ' + 'cpu-model)')) + variant('use_arch', default=False, + description=('Build all of timemory w/ cpu_target architecture ' + 'flags (default: roofline toolkit only)')) + variant('tls_model', default='global-dynamic', + description='Thread-local static model', multi=False, + values=('global-dynamic', 'local-dynamic', 'initial-exec', + 'local-exec')) + variant('lto', default=False, + description='Build w/ link-time optimization') + variant('statistics', default=True, + description=('Build components w/ support for statistics ' + '(min/max/stddev)')) + variant('extra_optimizations', default=True, + description='Build timemory with extra optimization flags') + variant('cxxstd', default='14', description='C++ language standard', + values=('14', '17', '20'), multi=False) + variant('mpip_library', default=linux, + description='Build stand-alone timemory-mpip GOTCHA library') + variant('ompt', default=True, description=('Enable OpenMP tools support')) + variant('ompt_standalone', default=True, + description=('Enable OpenMP tools support via drop-in ' + 'replacement of libomp/libgomp/libiomp5')) + variant('ompt_llvm', default=False, + description='Enable OpenMP tools support as part of llvm build') + variant('ompt_library', default=True, + description='Build stand-alone timemory-ompt library') + variant('allinea_map', default=False, + description='Enable Allinea ARM-MAP support') + variant('require_packages', default=False, + description=('find_package(...) resulting in NOTFOUND ' + 'generates error')) depends_on('cmake@3.11:', type='build') @@ -48,77 +101,110 @@ class Timemory(CMakePackage): depends_on('cuda', when='+cuda') depends_on('cuda', when='+cupti') depends_on('upcxx', when='+upcxx') - depends_on('gotcha', when='+gotcha') depends_on('likwid', when='+likwid') + depends_on('gotcha', when='+gotcha') depends_on('caliper', when='+caliper') + depends_on('dyninst', when='+dyninst') depends_on('gperftools', when='+gperftools') + depends_on('intel-parallel-studio', when='+vtune') + depends_on('llvm-openmp-ompt+standalone', when='+ompt_standalone') + depends_on('llvm-openmp-ompt~standalone', when='+ompt_llvm') + depends_on('arm-forge', when='+allinea_map') + conflicts('+python', when='~shared', + msg='+python requires building shared libraries') conflicts('+cupti', when='~cuda', msg='CUPTI requires CUDA') + conflicts('+kokkos_tools', when='~tools', + msg='+kokkos_tools requires +tools') + conflicts('+kokkos_build_config', when='~tools', + msg='+kokkos_build_config requires +tools') + conflicts('+kokkos_build_config', when='~kokkos_tools', + msg='+kokkos_build_config requires +kokkos_tools') + conflicts('tls_model=local-dynamic', when='+python', + msg='+python require tls_model=global-dynamic') + conflicts('tls_model=initial-exec', when='+python', + msg='+python require tls_model=global-dynamic') + conflicts('tls_model=local-exec', when='+python', + msg='+python require tls_model=global-dynamic') + conflicts('+mpip_library', when='~mpi', msg='+mpip_library requires +mpi') + conflicts('+mpip_library', when='~gotcha', + msg='+mpip_library requires +gotcha') + conflicts('+mpip_library', when='~shared', + msg='+mpip_library requires building shared libraries') + conflicts('+ompt_standalone', when='~ompt', + msg='+ompt_standalone requires +ompt') + conflicts('+ompt_llvm', when='~ompt', + msg='+ompt_llvm requires +ompt') + conflicts('+ompt_library', when='~ompt', + msg='+ompt_library requires +ompt') + conflicts('+ompt_library', when='~shared~static', + msg='+ompt_library requires building shared or static libraries') + conflicts('+ompt_standalone+ompt_llvm', + msg=('+ompt_standalone and +ompt_llvm are not compatible. Use ' + '+ompt_llvm~ompt_standalone if building LLVM, use ' + '~ompt_llvm+ompt_standalone if ompt.h is not provided by ' + 'the compiler')) def cmake_args(self): spec = self.spec - # Use spack install of Caliper and/or GOTCHA - # instead of internal submodule build args = [ - '-DTIMEMORY_BUILD_GOTCHA=OFF', - '-DTIMEMORY_BUILD_CALIPER=OFF', - '-DTIMEMORY_BUILD_TOOLS=ON', + '-DTIMEMORY_BUILD_PYTHON=ON', '-DTIMEMORY_BUILD_TESTING=OFF', - '-DTIMEMORY_BUILD_EXTRA_OPTIMIZATIONS=ON', '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON', ] + cxxstd = spec.variants['cxxstd'].value + args.append('-DCMAKE_CXX_STANDARD={0}'.format(cxxstd)) + + tls = spec.variants['tls_model'].value + args.append('-DTIMEMORY_TLS_MODEL={0}'.format(tls)) + if '+python' in spec: args.append('-DPYTHON_EXECUTABLE={0}'.format( spec['python'].command.path)) - args.append('-DTIMEMORY_USE_PYTHON=ON') - args.append('-DTIMEMORY_BUILD_PYTHON=ON') - args.append('-DTIMEMORY_TLS_MODEL=global-dynamic') - else: - args.append('-DTIMEMORY_USE_PYTHON=OFF') - args.append('-DTIMEMORY_BUILD_PYTHON=OFF') - - if '+caliper' in spec: - args.append('-DTIMEMORY_USE_CALIPER=ON') - else: - args.append('-DTIMEMORY_USE_CALIPER=OFF') - - if '+tau' in spec: - args.append('-DTIMEMORY_USE_TAU=ON') - else: - args.append('-DTIMEMORY_USE_TAU=OFF') - - if '+likwid' in spec: - args.append('-DTIMEMORY_USE_LIKWID=ON') - else: - args.append('-DTIMEMORY_USE_LIKWID=OFF') - - if '+papi' in spec: - args.append('-DTIMEMORY_USE_PAPI=ON') - args.append('-DPAPI_ROOT_DIR={0}'.format(spec['papi'].prefix)) - else: - args.append('-DTIMEMORY_USE_PAPI=OFF') if '+mpi' in spec: + args.append('-DTIMEMORY_USE_MPI_LINK_FLAGS=OFF') args.append('-DMPI_C_COMPILER={0}'.format(spec['mpi'].mpicc)) args.append('-DMPI_CXX_COMPILER={0}'.format(spec['mpi'].mpicxx)) - else: - args.append('-DTIMEMORY_USE_MPI=OFF') - - if '+gotcha' in spec: - args.append('-DTIMEMORY_USE_GOTCHA=ON') - else: - args.append('-DTIMEMORY_USE_GOTCHA=OFF') if '+cuda' in spec: - args.append('-DTIMEMORY_USE_CUDA=ON') - else: - args.append('-DTIMEMORY_USE_CUDA=OFF') + targ = spec.variants['cuda_arch'].value + key = '' if spec.satisfies('@:3.0.1') else 'TIMEMORY_' + # newer versions use 'TIMEMORY_CUDA_ARCH' + args.append('-D{0}CUDA_ARCH={1}'.format(key, targ)) - if '+cupti' in spec: - args.append('-DTIMEMORY_USE_CUPTI=ON') - else: - args.append('-DTIMEMORY_USE_CUPTI=OFF') + cpu_target = spec.variants['cpu_target'].value + if cpu_target == 'auto': + args.append('-DCpuArch_TARGET={0}'.format(cpu_target)) + + # forced disabling of submodule builds + for dep in ('caliper', 'gotcha', 'ompt'): + args.append('-DTIMEMORY_BUILD_{0}=OFF'.format(dep.upper())) + + # spack options which translate to TIMEMORY_ + +"""""""""""""""""""" +activation overrides +"""""""""""""""""""" + +Finally, the behavior of either ``with_or_without`` or +``enable_or_disable`` can be overridden for specific variant +values. This is most useful for multi-values variants where some of +the variant values require atypical behavior. + +.. code-block:: python + + def with_or_without_verbs(self, activated): + # Up through version 1.6, this option was named --with-openib. + # In version 1.7, it was renamed to be --with-verbs. + opt = 'verbs' if self.spec.satisfies('@1.7:') else 'openib' + if not activated: + return '--without-{0}'.format(opt) + return '--with-{0}={1}'.format(opt, self.spec['rdma-core'].prefix) + +Defining ``with_or_without_verbs`` overrides the behavior of a +``fabrics=verbs`` variant, changing the configure-time option to +``--with-openib`` for older versions of the package and specifying an +alternative dependency name: + +.. code-block:: + + --with-openib= ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Configure script in a sub-directory diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 183447236fc..abe7b1d3ee2 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -247,6 +247,7 @@ class Openmpi(AutotoolsPackage): depends_on('ucx +thread_multiple', when='fabrics=ucx +thread_multiple') depends_on('ucx +thread_multiple', when='@3.0.0: fabrics=ucx') depends_on('libfabric', when='fabrics=libfabric') + depends_on('opa-psm2', when='fabrics=psm2') depends_on('mxm', when='fabrics=mxm') depends_on('binutils+libiberty', when='fabrics=mxm') depends_on('rdma-core', when='fabrics=verbs') @@ -330,6 +331,11 @@ def with_or_without_tm(self, activated): return '--without-tm' return '--with-tm={0}'.format(self.spec['openpbs'].prefix) + def with_or_without_psm2(self, activated): + if not activated: + return '--without-psm2' + return '--with-psm2={0}'.format(self.spec['opa-psm2'].prefix) + @run_before('autoreconf') def die_without_fortran(self): # Until we can pass variants such as +fortran through virtual From 6035b32748261c373ee622a2a0e330cae5a8aa61 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 2 Jun 2020 10:48:35 +0200 Subject: [PATCH 577/802] go: added v1.14.4 and v1.13.12 (#16903) --- var/spack/repos/builtin/packages/go/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 114c9212ab6..d0f515e94c7 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -36,10 +36,12 @@ class Go(Package): extendable = True + version('1.14.4', sha256='7011af3bbc2ac108d1b82ea8abb87b2e63f78844f0259be20cde4d42c5c40584') version('1.14.3', sha256='93023778d4d1797b7bc6a53e86c3a9b150c923953225f8a48a2d5fabc971af56') version('1.14.2', sha256='98de84e69726a66da7b4e58eac41b99cbe274d7e8906eeb8a5b7eb0aadee7f7c') version('1.14.1', sha256='2ad2572115b0d1b4cb4c138e6b3a31cee6294cb48af75ee86bec3dca04507676') version('1.14', sha256='6d643e46ad565058c7a39dac01144172ef9bd476521f42148be59249e4b74389') + version('1.13.12', sha256='17ba2c4de4d78793a21cc659d9907f4356cd9c8de8b7d0899cdedcef712eba34') version('1.13.11', sha256='89ed1abce25ad003521c125d6583c93c1280de200ad221f961085200a6c00679') version('1.13.10', sha256='eb9ccc8bf59ed068e7eff73e154e4f5ee7eec0a47a610fb864e3332a2fdc8b8c') version('1.13.9', sha256='34bb19d806e0bc4ad8f508ae24bade5e9fedfa53d09be63b488a9314d2d4f31d') From 7f2db5c5b0d284845c80a01c0cbb833ff0509329 Mon Sep 17 00:00:00 2001 From: Sinan Date: Tue, 2 Jun 2020 01:51:35 -0700 Subject: [PATCH 578/802] qt: add conflict for old gcc (#16904) Co-authored-by: Sinan81 --- var/spack/repos/builtin/packages/qt/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 08721e85c24..ba28042fa3d 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -151,6 +151,10 @@ class Qt(Package): depends_on("double-conversion", when='@5.7:') depends_on("pcre2+multibyte", when='@5.9:') + # gcc@4 is not supported as of Qt@5.14 + # https://doc.qt.io/qt-5.14/supported-platforms.html + conflicts('%gcc@:4.99', when='@5.14:') + # Non-macOS dependencies and special macOS constraints if MACOS_VERSION is None: depends_on("fontconfig", when='freetype=spack') From 6aa0e9944e5fedb518ff23904d5019027800aace Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 2 Jun 2020 01:53:12 -0700 Subject: [PATCH 579/802] ccache: added v3.7.9 (#16902) Add the latest CCache release. Fixes issues with `-x cu` that are not present in the last checksummed release. This fixes workflows with CMake. --- var/spack/repos/builtin/packages/ccache/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/ccache/package.py b/var/spack/repos/builtin/packages/ccache/package.py index 97ebf17441b..6bc53831a99 100644 --- a/var/spack/repos/builtin/packages/ccache/package.py +++ b/var/spack/repos/builtin/packages/ccache/package.py @@ -12,8 +12,9 @@ class Ccache(AutotoolsPackage): again.""" homepage = "https://ccache.samba.org/" - url = "https://github.com/ccache/ccache/releases/download/v3.7.1/ccache-3.7.1.tar.gz" + url = "https://github.com/ccache/ccache/releases/download/v3.7.9/ccache-3.7.9.tar.gz" + version('3.7.9', sha256='92838e2133c9e704fdab9ee2608dad86c99021278b9ac47d065aa8ff2ea8ce36') version('3.7.1', sha256='e562fcdbe766406b6fe4bf97ce5c001d2be8a17465f33bcddefc9499bbb057d8') version('3.3.4', sha256='1348b54e7c35dd2f8d17923389e03c546e599cfbde6459d2f31cf6f1521ec538') version('3.3.3', sha256='87a399a2267cfac3f36411fbc12ff8959f408cffd050ad15fe423df88e977e8f') From 0875c6a5d0ba8a951f86805814d4eb0ba3f3997e Mon Sep 17 00:00:00 2001 From: takanori-ihara <62980219+takanori-ihara@users.noreply.github.com> Date: Tue, 2 Jun 2020 17:55:55 +0900 Subject: [PATCH 580/802] py-grpcio: fixed build with Fujitsu compilers (#16900) --- var/spack/repos/builtin/packages/py-grpcio/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-grpcio/package.py b/var/spack/repos/builtin/packages/py-grpcio/package.py index 18981f20e45..e40d3c0532c 100644 --- a/var/spack/repos/builtin/packages/py-grpcio/package.py +++ b/var/spack/repos/builtin/packages/py-grpcio/package.py @@ -29,3 +29,7 @@ def setup_build_environment(self, env): env.set('GRPC_PYTHON_BUILD_SYSTEM_OPENSSL', True) env.set('GRPC_PYTHON_BUILD_SYSTEM_ZLIB', True) env.set('GRPC_PYTHON_BUILD_SYSTEM_CARES', True) + + def patch(self): + if self.spec.satisfies('%fj'): + filter_file("-std=gnu99", "", "setup.py") From 2795414a80839208c3463e49f197fee25f2be0f8 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Tue, 2 Jun 2020 02:02:28 -0700 Subject: [PATCH 581/802] Fix satisfaction checks for excluding variants from matrices (#16893) Because of the way abstract variants are implemented, the following spec matrix does not work as intended: ``` matrix: - [foo] - [bar=a, bar=b] exclude: - bar=a ``` because abstract variants always satisfy any variant of the same name, regardless of values. This PR converts abstract variants to whatever their appropriate type is before running satisfaction checks for the excludes clause in a matrix. fixes #16841 --- lib/spack/spack/spec_list.py | 12 +++ lib/spack/spack/test/cmd/dependents.py | 10 +-- lib/spack/spack/test/spec_list.py | 7 ++ lib/spack/spack/test/spec_semantics.py | 84 +++++++++---------- lib/spack/spack/test/spec_yaml.py | 2 +- lib/spack/spack/variant.py | 13 ++- .../package.py | 0 .../singlevalue-variant-dependent/package.py | 2 +- 8 files changed, 80 insertions(+), 50 deletions(-) rename var/spack/repos/builtin.mock/packages/{multivalue_variant => multivalue-variant}/package.py (100%) diff --git a/lib/spack/spack/spec_list.py b/lib/spack/spack/spec_list.py index de75458f322..4468df7c35d 100644 --- a/lib/spack/spack/spec_list.py +++ b/lib/spack/spack/spec_list.py @@ -5,6 +5,7 @@ import itertools from six import string_types +import spack.variant from spack.spec import Spec from spack.error import SpackError @@ -189,7 +190,18 @@ def _expand_matrix_constraints(object, specify=True): # Construct a combined spec to test against excludes flat_combo = [constraint for list in combo for constraint in list] ordered_combo = sorted(flat_combo, key=spec_ordering_key) + test_spec = Spec(' '.join(ordered_combo)) + # Abstract variants don't have normal satisfaction semantics + # Convert all variants to concrete types. + # This method is best effort, so all existing variants will be + # converted before any error is raised. + # Catch exceptions because we want to be able to operate on + # abstract specs without needing package information + try: + spack.variant.substitute_abstract_variants(test_spec) + except spack.variant.UnknownVariantError: + pass if any(test_spec.satisfies(x) for x in excludes): continue diff --git a/lib/spack/spack/test/cmd/dependents.py b/lib/spack/spack/test/cmd/dependents.py index 1001e8764f4..22a3acd0c32 100644 --- a/lib/spack/spack/test/cmd/dependents.py +++ b/lib/spack/spack/test/cmd/dependents.py @@ -26,7 +26,7 @@ def test_transitive_dependents(mock_packages): out = dependents('--transitive', 'libelf') actual = set(re.split(r'\s+', out.strip())) assert actual == set( - ['callpath', 'dyninst', 'libdwarf', 'mpileaks', 'multivalue_variant', + ['callpath', 'dyninst', 'libdwarf', 'mpileaks', 'multivalue-variant', 'singlevalue-variant-dependent', 'patch-a-dependency', 'patch-several-dependencies']) @@ -36,8 +36,8 @@ def test_immediate_installed_dependents(mock_packages, database): with color_when(False): out = dependents('--installed', 'libelf') - lines = [l for l in out.strip().split('\n') if not l.startswith('--')] - hashes = set([re.split(r'\s+', l)[0] for l in lines]) + lines = [li for li in out.strip().split('\n') if not li.startswith('--')] + hashes = set([re.split(r'\s+', li)[0] for li in lines]) expected = set([spack.store.db.query_one(s).dag_hash(7) for s in ['dyninst', 'libdwarf']]) @@ -53,8 +53,8 @@ def test_transitive_installed_dependents(mock_packages, database): with color_when(False): out = dependents('--installed', '--transitive', 'fake') - lines = [l for l in out.strip().split('\n') if not l.startswith('--')] - hashes = set([re.split(r'\s+', l)[0] for l in lines]) + lines = [li for li in out.strip().split('\n') if not li.startswith('--')] + hashes = set([re.split(r'\s+', li)[0] for li in lines]) expected = set([spack.store.db.query_one(s).dag_hash(7) for s in ['zmpi', 'callpath^zmpi', 'mpileaks^zmpi']]) diff --git a/lib/spack/spack/test/spec_list.py b/lib/spack/spack/test/spec_list.py index 9bbbc435e24..ff45096c3ed 100644 --- a/lib/spack/spack/test/spec_list.py +++ b/lib/spack/spack/test/spec_list.py @@ -156,3 +156,10 @@ def test_spec_list_nested_matrices(self): ['+shared', '~shared']) expected = [Spec(' '.join(combo)) for combo in expected_components] assert set(speclist.specs) == set(expected) + + def test_spec_list_matrix_exclude(self, mock_packages): + # Test on non-boolean variants for regression for #16841 + matrix = [{'matrix': [['multivalue-variant'], ['foo=bar', 'foo=baz']], + 'exclude': ['foo=bar']}] + speclist = SpecList('specs', matrix) + assert len(speclist.specs) == 1 diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index b55fa27ae1f..d908ce7d89a 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -275,27 +275,27 @@ def test_satisfies_matching_variant(self): def test_satisfies_multi_value_variant(self): # Check quoting - check_satisfies('multivalue_variant foo="bar,baz"', - 'multivalue_variant foo="bar,baz"') - check_satisfies('multivalue_variant foo=bar,baz', - 'multivalue_variant foo=bar,baz') - check_satisfies('multivalue_variant foo="bar,baz"', - 'multivalue_variant foo=bar,baz') + check_satisfies('multivalue-variant foo="bar,baz"', + 'multivalue-variant foo="bar,baz"') + check_satisfies('multivalue-variant foo=bar,baz', + 'multivalue-variant foo=bar,baz') + check_satisfies('multivalue-variant foo="bar,baz"', + 'multivalue-variant foo=bar,baz') # A more constrained spec satisfies a less constrained one - check_satisfies('multivalue_variant foo="bar,baz"', - 'multivalue_variant foo="bar"') + check_satisfies('multivalue-variant foo="bar,baz"', + 'multivalue-variant foo="bar"') - check_satisfies('multivalue_variant foo="bar,baz"', - 'multivalue_variant foo="baz"') + check_satisfies('multivalue-variant foo="bar,baz"', + 'multivalue-variant foo="baz"') - check_satisfies('multivalue_variant foo="bar,baz,barbaz"', - 'multivalue_variant foo="bar,baz"') + check_satisfies('multivalue-variant foo="bar,baz,barbaz"', + 'multivalue-variant foo="bar,baz"') - check_satisfies('multivalue_variant foo="bar,baz"', + check_satisfies('multivalue-variant foo="bar,baz"', 'foo="bar,baz"') - check_satisfies('multivalue_variant foo="bar,baz"', + check_satisfies('multivalue-variant foo="bar,baz"', 'foo="bar"') def test_satisfies_single_valued_variant(self): @@ -325,7 +325,7 @@ def test_unsatisfied_single_valued_variant(self): a.concretize() assert '^b' not in a - mv = Spec('multivalue_variant') + mv = Spec('multivalue-variant') mv.concretize() assert 'a@1.0' not in mv @@ -340,9 +340,9 @@ def test_unsatisfiable_multi_value_variant(self): # Depending on whether the spec is concrete or not a = make_spec( - 'multivalue_variant foo="bar"', concrete=True + 'multivalue-variant foo="bar"', concrete=True ) - spec_str = 'multivalue_variant foo="bar,baz"' + spec_str = 'multivalue-variant foo="bar,baz"' b = Spec(spec_str) assert not a.satisfies(b) assert not a.satisfies(spec_str) @@ -350,8 +350,8 @@ def test_unsatisfiable_multi_value_variant(self): with pytest.raises(UnsatisfiableSpecError): a.constrain(b) - a = Spec('multivalue_variant foo="bar"') - spec_str = 'multivalue_variant foo="bar,baz"' + a = Spec('multivalue-variant foo="bar"') + spec_str = 'multivalue-variant foo="bar,baz"' b = Spec(spec_str) # The specs are abstract and they **could** be constrained assert a.satisfies(b) @@ -360,9 +360,9 @@ def test_unsatisfiable_multi_value_variant(self): assert a.constrain(b) a = make_spec( - 'multivalue_variant foo="bar,baz"', concrete=True + 'multivalue-variant foo="bar,baz"', concrete=True ) - spec_str = 'multivalue_variant foo="bar,baz,quux"' + spec_str = 'multivalue-variant foo="bar,baz,quux"' b = Spec(spec_str) assert not a.satisfies(b) assert not a.satisfies(spec_str) @@ -370,8 +370,8 @@ def test_unsatisfiable_multi_value_variant(self): with pytest.raises(UnsatisfiableSpecError): a.constrain(b) - a = Spec('multivalue_variant foo="bar,baz"') - spec_str = 'multivalue_variant foo="bar,baz,quux"' + a = Spec('multivalue-variant foo="bar,baz"') + spec_str = 'multivalue-variant foo="bar,baz,quux"' b = Spec(spec_str) # The specs are abstract and they **could** be constrained assert a.satisfies(b) @@ -384,8 +384,8 @@ def test_unsatisfiable_multi_value_variant(self): a.concretize() # This time we'll try to set a single-valued variant - a = Spec('multivalue_variant fee="bar"') - spec_str = 'multivalue_variant fee="baz"' + a = Spec('multivalue-variant fee="bar"') + spec_str = 'multivalue-variant fee="baz"' b = Spec(spec_str) # The specs are abstract and they **could** be constrained, # as before concretization I don't know which type of variant @@ -405,20 +405,20 @@ def test_unsatisfiable_variant_types(self): # FIXME: these needs to be checked as the new relaxed # FIXME: semantic makes them fail (constrain does not raise) - # check_unsatisfiable('multivalue_variant +foo', - # 'multivalue_variant foo="bar"') - # check_unsatisfiable('multivalue_variant ~foo', - # 'multivalue_variant foo="bar"') + # check_unsatisfiable('multivalue-variant +foo', + # 'multivalue-variant foo="bar"') + # check_unsatisfiable('multivalue-variant ~foo', + # 'multivalue-variant foo="bar"') check_unsatisfiable( - target_spec='multivalue_variant foo="bar"', - constraint_spec='multivalue_variant +foo', + target_spec='multivalue-variant foo="bar"', + constraint_spec='multivalue-variant +foo', target_concrete=True ) check_unsatisfiable( - target_spec='multivalue_variant foo="bar"', - constraint_spec='multivalue_variant ~foo', + target_spec='multivalue-variant foo="bar"', + constraint_spec='multivalue-variant ~foo', target_concrete=True ) @@ -597,15 +597,15 @@ def test_constrain_variants(self): def test_constrain_multi_value_variant(self): check_constrain( - 'multivalue_variant foo="bar,baz"', - 'multivalue_variant foo="bar"', - 'multivalue_variant foo="baz"' + 'multivalue-variant foo="bar,baz"', + 'multivalue-variant foo="bar"', + 'multivalue-variant foo="baz"' ) check_constrain( - 'multivalue_variant foo="bar,baz,barbaz"', - 'multivalue_variant foo="bar,barbaz"', - 'multivalue_variant foo="baz"' + 'multivalue-variant foo="bar,baz,barbaz"', + 'multivalue-variant foo="bar,barbaz"', + 'multivalue-variant foo="baz"' ) def test_constrain_compiler_flags(self): @@ -734,7 +734,7 @@ def test_exceptional_paths_for_constructor(self): Spec('libelf foo') def test_spec_formatting(self): - spec = Spec("multivalue_variant cflags=-O2") + spec = Spec("multivalue-variant cflags=-O2") spec.concretize() # Since the default is the full spec see if the string rep of @@ -806,7 +806,7 @@ def test_spec_formatting(self): assert expected == actual def test_spec_formatting_escapes(self): - spec = Spec('multivalue_variant cflags=-O2') + spec = Spec('multivalue-variant cflags=-O2') spec.concretize() sigil_mismatches = [ @@ -895,7 +895,7 @@ def test_spec_flags_maintain_order(self): def test_any_combination_of(self): # Test that using 'none' and another value raise during concretization - spec = Spec('multivalue_variant foo=none,bar') + spec = Spec('multivalue-variant foo=none,bar') with pytest.raises(spack.error.SpecError) as exc_info: spec.concretize() diff --git a/lib/spack/spack/test/spec_yaml.py b/lib/spack/spack/test/spec_yaml.py index 03129a7eb9b..98fb1e68fe4 100644 --- a/lib/spack/spack/test/spec_yaml.py +++ b/lib/spack/spack/test/spec_yaml.py @@ -69,7 +69,7 @@ def test_concrete_spec(config, mock_packages): def test_yaml_multivalue(config, mock_packages): - spec = Spec('multivalue_variant foo="bar,baz"') + spec = Spec('multivalue-variant foo="bar,baz"') spec.concretize() check_yaml_round_trip(spec) diff --git a/lib/spack/spack/variant.py b/lib/spack/spack/variant.py index 0443b68ec30..e43a002182a 100644 --- a/lib/spack/spack/variant.py +++ b/lib/spack/spack/variant.py @@ -593,19 +593,30 @@ def substitute_abstract_variants(spec): """Uses the information in `spec.package` to turn any variant that needs it into a SingleValuedVariant. + This method is best effort. All variants that can be substituted will be + substituted before any error is raised. + Args: spec: spec on which to operate the substitution """ + # This method needs to be best effort so that it works in matrix exlusion + # in $spack/lib/spack/spack/spec_list.py + failed = [] for name, v in spec.variants.items(): if name in spack.directives.reserved_names: continue pkg_variant = spec.package_class.variants.get(name, None) if not pkg_variant: - raise UnknownVariantError(spec, [name]) + failed.append(name) + continue new_variant = pkg_variant.make_variant(v._original_value) pkg_variant.validate_or_raise(new_variant, spec.package_class) spec.variants.substitute(new_variant) + # Raise all errors at once + if failed: + raise UnknownVariantError(spec, failed) + # The class below inherit from Sequence to disguise as a tuple and comply # with the semantic expected by the 'values' argument of the variant directive diff --git a/var/spack/repos/builtin.mock/packages/multivalue_variant/package.py b/var/spack/repos/builtin.mock/packages/multivalue-variant/package.py similarity index 100% rename from var/spack/repos/builtin.mock/packages/multivalue_variant/package.py rename to var/spack/repos/builtin.mock/packages/multivalue-variant/package.py diff --git a/var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent/package.py b/var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent/package.py index 5507fbdc21f..de14faa51f5 100644 --- a/var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent/package.py +++ b/var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent/package.py @@ -14,4 +14,4 @@ class SinglevalueVariantDependent(Package): version('1.0', '0123456789abcdef0123456789abcdef') - depends_on('multivalue_variant fee=baz') + depends_on('multivalue-variant fee=baz') From c7851f896cb6827cf119e82d4f4c37ab65c17a28 Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Tue, 2 Jun 2020 11:06:02 +0200 Subject: [PATCH 582/802] environment-modules: added v4.5.1 (#16896) --- .../repos/builtin/packages/environment-modules/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py index cb6699cf3ad..3a756a0d8c9 100644 --- a/var/spack/repos/builtin/packages/environment-modules/package.py +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -12,10 +12,11 @@ class EnvironmentModules(Package): """ homepage = 'https://cea-hpc.github.io/modules/' - url = 'https://github.com/cea-hpc/modules/releases/download/v4.5.0/modules-4.5.0.tar.gz' + url = 'https://github.com/cea-hpc/modules/releases/download/v4.5.1/modules-4.5.1.tar.gz' maintainers = ['xdelaruelle'] + version('4.5.1', sha256='7d4bcc8559e7fbbc52e526fc86a15b161ff4422aa49eee37897ee7a48eb64ac2') version('4.5.0', sha256='5f46336f612553af5553d99347f387f733de0aaa0d80d4572e67615289382ec8') version('4.4.1', sha256='3c20cfb2ff8a4d74ac6d566e7b5fa9dd220d96d17e6d8a4ae29b1ec0107ee407') version('4.4.0', sha256='4dd55ad6cc684905e891ad1ba9e3c542e79eea0a9cd9a0e99cd77abe6ed63fab') From b60ab6eefdfe584105ae97caf15a0e72c4ab2457 Mon Sep 17 00:00:00 2001 From: takanori-ihara <62980219+takanori-ihara@users.noreply.github.com> Date: Tue, 2 Jun 2020 18:07:48 +0900 Subject: [PATCH 583/802] ruby: fixed build with Fujitsu compilers (#16889) --- var/spack/repos/builtin/packages/ruby/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py index b2e2c6f6fa3..820e32e20bc 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -61,6 +61,8 @@ def configure_args(self): args.append("--with-readline-dir=%s" % self.spec['readline'].prefix) args.append('--with-tk=%s' % self.spec['tk'].prefix) + if self.spec.satisfies("%fj"): + args.append('--disable-dtrace') return args def setup_dependent_build_environment(self, env, dependent_spec): From 9a17d48455bbb38ae8ad51979eeba006c89d4104 Mon Sep 17 00:00:00 2001 From: iarspider Date: Tue, 2 Jun 2020 22:09:35 +0200 Subject: [PATCH 584/802] Add ipython 7.5.0 (#16801) * Add ipython 7.5.0 * Update dependencies * Update package.py --- .../repos/builtin/packages/py-ipython/package.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py index 5bfad819e7b..8faa8ab3305 100644 --- a/var/spack/repos/builtin/packages/py-ipython/package.py +++ b/var/spack/repos/builtin/packages/py-ipython/package.py @@ -12,6 +12,7 @@ class PyIpython(PythonPackage): homepage = "https://pypi.python.org/pypi/ipython" url = "https://pypi.io/packages/source/i/ipython/ipython-2.3.1.tar.gz" + version('7.5.0', sha256='e840810029224b56cd0d9e7719dc3b39cf84d577f8ac686547c8ba7a06eeab26') version('7.3.0', sha256='06de667a9e406924f97781bda22d5d76bfb39762b678762d86a466e63f65dc39') version('5.8.0', sha256='4bac649857611baaaf76bc82c173aa542f7486446c335fe1a6c05d0d491c8906') version('5.1.0', sha256='7ef4694e1345913182126b219aaa4a0047e191af414256da6772cf249571b961') @@ -25,11 +26,15 @@ class PyIpython(PythonPackage): depends_on('py-pathlib2', type=('build', 'run'), when="^python@:3.3") depends_on('py-pygments', type=('build', 'run')) depends_on('py-pickleshare', type=('build', 'run')) - depends_on('py-simplegeneric@0.8:', type=('build', 'run')) - depends_on('py-prompt-toolkit@1.0.4:1.999', when='@:7.0.0', type=('build', 'run')) - depends_on('py-prompt-toolkit@2.0.0:2.999', when='@7.0.0:', type=('build', 'run')) + depends_on('py-simplegeneric@0.8:', type=('build', 'run'), when='@:7.0.0') + depends_on('py-prompt-toolkit@1.0.4:1.999', when='@:7.0.0', type=('build', 'run')) + depends_on('py-prompt-toolkit@2.0.0:2.999', when='@7.0.0:', type=('build', 'run')) + depends_on('py-prompt-toolkit@2.0.0:2.0.999', when='@7.5.0:', type=('build', 'run')) depends_on('py-traitlets@4.2:', type=('build', 'run')) depends_on('py-decorator', type=('build', 'run')) depends_on('py-pexpect', type=('build', 'run')) depends_on('py-backcall', type=('build', 'run'), when="^python@3.3:") depends_on('py-appnope', type=('build', 'run'), when='platform=darwin') + depends_on('py-jedi@0.10:', type=('build', 'run'), when='@7.5.0:') + depends_on('py-backcall', type=('build', 'run'), when='@7.5.0:') + depends_on('py-setuptools@18.5:', type=('build', 'run'), when='@7.5.0:') From 5ace804dc2d33217fb9926be3962e35dc7d007c4 Mon Sep 17 00:00:00 2001 From: Chuck Atkins Date: Tue, 2 Jun 2020 17:15:23 -0400 Subject: [PATCH 585/802] Bump ADIOS to 2.6.0 (#16908) --- var/spack/repos/builtin/packages/adios2/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 4b2f5a74ebb..59e442a27d3 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -11,12 +11,13 @@ class Adios2(CMakePackage): developed in the Exascale Computing Program""" homepage = "https://csmd.ornl.gov/software/adios2" - url = "https://github.com/ornladios/ADIOS2/archive/v2.5.0.tar.gz" + url = "https://github.com/ornladios/ADIOS2/archive/v2.6.0.tar.gz" git = "https://github.com/ornladios/ADIOS2.git" maintainers = ['ax3l', 'chuckatkins', 'williamfgc'] version('master', branch='master') + version('2.6.0', sha256='45b41889065f8b840725928db092848b8a8b8d1bfae1b92e72f8868d1c76216c') version('2.5.0', sha256='7c8ff3bf5441dd662806df9650c56a669359cb0185ea232ecb3578de7b065329') version('2.4.0', sha256='50ecea04b1e41c88835b4b3fd4e7bf0a0a2a3129855c9cc4ba6cf6a1575106e2') version('2.3.1', sha256='3bf81ccc20a7f2715935349336a76ba4c8402355e1dc3848fcd6f4c3c5931893') From 5d37439a7b0396772f6102f18568a8863da7ff83 Mon Sep 17 00:00:00 2001 From: Justin S <3630356+codeandkey@users.noreply.github.com> Date: Tue, 2 Jun 2020 16:21:00 -0500 Subject: [PATCH 586/802] gmap-gsnap: add 2020-06-01 (#16906) --- var/spack/repos/builtin/packages/gmap-gsnap/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gmap-gsnap/package.py b/var/spack/repos/builtin/packages/gmap-gsnap/package.py index f87f4121c76..03d1edcd237 100644 --- a/var/spack/repos/builtin/packages/gmap-gsnap/package.py +++ b/var/spack/repos/builtin/packages/gmap-gsnap/package.py @@ -14,6 +14,7 @@ class GmapGsnap(AutotoolsPackage): homepage = "http://research-pub.gene.com/gmap/" url = "http://research-pub.gene.com/gmap/src/gmap-gsnap-2017-06-16.tar.gz" + version('2020-06-01', sha256='7917f9f78570943f419445e371f2cc948c6741e73c3cbb063391756f4479d365') version('2019-05-12', sha256='3dc1b6ee4f6c049c07bcf4a5aba30eb2d732997241cdcad818dab571719f8008') version('2019-02-15', sha256='7e82b9867a1e561b4816fb2f2fb916294077c384c6a88bb94cce39bfe71ab3ac') version('2018-07-04', sha256='a9f8c1f0810df65b2a089dc10be79611026f4c95e4681dba98fea3d55d598d24') From 76142124d2ac58f0499f6e3c0314e2b5c4ecc5fe Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Wed, 3 Jun 2020 06:23:14 +0900 Subject: [PATCH 587/802] alsa-lib: Add new version and python dependency. (#16905) Add version 1.2.2. Add conditional python dependency. Add patch for 1.1.4.1 and python. --- .../builtin/packages/alsa-lib/package.py | 25 ++++++++++++++++++- .../builtin/packages/alsa-lib/python.patch | 20 +++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/alsa-lib/python.patch diff --git a/var/spack/repos/builtin/packages/alsa-lib/package.py b/var/spack/repos/builtin/packages/alsa-lib/package.py index e766a8cc16e..9b53de24e9b 100644 --- a/var/spack/repos/builtin/packages/alsa-lib/package.py +++ b/var/spack/repos/builtin/packages/alsa-lib/package.py @@ -12,6 +12,29 @@ class AlsaLib(AutotoolsPackage): space library that developers compile ALSA applications against.""" homepage = "https://www.alsa-project.org" - url = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.4.1.tar.bz2" + url = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.2.2.tar.bz2" + version('1.2.2', sha256='d8e853d8805574777bbe40937812ad1419c9ea7210e176f0def3e6ed255ab3ec') version('1.1.4.1', sha256='91bb870c14d1c7c269213285eeed874fa3d28112077db061a3af8010d0885b76') + + variant('python', default=False, description='enable python') + + patch('python.patch', when='@1.1.4:1.1.5 +python') + + depends_on('python', type=('link', 'run'), when='+python') + + def configure_args(self): + spec = self.spec + args = [] + if spec.satisfies('+python'): + args.append( + '--with-pythonlibs={0}'.format(spec['python'].libs.ld_flags) + ) + args.append( + '--with-pythonincludes={0}'.format( + spec['python'].headers.include_flags + ) + ) + else: + args.append('--disable-python') + return args diff --git a/var/spack/repos/builtin/packages/alsa-lib/python.patch b/var/spack/repos/builtin/packages/alsa-lib/python.patch new file mode 100644 index 00000000000..6cc6cdb40e6 --- /dev/null +++ b/var/spack/repos/builtin/packages/alsa-lib/python.patch @@ -0,0 +1,20 @@ +diff --git a/modules/mixer/simple/python.c b/modules/mixer/simple/python.c +index c822c52a..917a5d0a 100644 +--- a/modules/mixer/simple/python.c ++++ b/modules/mixer/simple/python.c +@@ -588,7 +588,6 @@ + pymelem_dealloc(struct pymelem *self) + { + selem_free(self->melem); +- self->ob_type->tp_free(self); + } + + static PyGetSetDef pymelem_getseters[] = { +@@ -800,7 +799,6 @@ + pymixer_dealloc(struct pymixer *self) + { + pymixer_free(self); +- self->ob_type->tp_free(self); + } + + static PyGetSetDef pymixer_getseters[] = { From d5ffec1b2f3afff448880769ea37a530e3f3a5de Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 2 Jun 2020 23:59:42 +0200 Subject: [PATCH 588/802] Unify tests for compiler command in the same file (#16891) * Unify tests for compiler command in the same file Tests for the "spack compiler" command were previously scattered among different files. * Tests should use mutable_config, since they modify the compiler list --- lib/spack/spack/test/cmd/compiler.py | 105 ++++++++++++++++++ lib/spack/spack/test/cmd/compiler_command.py | 40 ------- lib/spack/spack/test/cmd/test_compiler_cmd.py | 73 ------------ 3 files changed, 105 insertions(+), 113 deletions(-) create mode 100644 lib/spack/spack/test/cmd/compiler.py delete mode 100644 lib/spack/spack/test/cmd/compiler_command.py delete mode 100644 lib/spack/spack/test/cmd/test_compiler_cmd.py diff --git a/lib/spack/spack/test/cmd/compiler.py b/lib/spack/spack/test/cmd/compiler.py new file mode 100644 index 00000000000..0476275a5f1 --- /dev/null +++ b/lib/spack/spack/test/cmd/compiler.py @@ -0,0 +1,105 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + +import pytest + +import llnl.util.filesystem +import spack.main +import spack.version + +compiler = spack.main.SpackCommand('compiler') + + +@pytest.fixture +def no_compilers_yaml(mutable_config, monkeypatch): + """Creates a temporary configuration without compilers.yaml""" + + for scope, local_config in mutable_config.scopes.items(): + compilers_yaml = os.path.join( + local_config.path, scope, 'compilers.yaml' + ) + if os.path.exists(compilers_yaml): + os.remove(compilers_yaml) + + +@pytest.fixture +def mock_compiler_version(): + return '4.5.3' + + +@pytest.fixture() +def mock_compiler_dir(tmpdir, mock_compiler_version): + """Return a directory containing a fake, but detectable compiler.""" + + tmpdir.ensure('bin', dir=True) + bin_dir = tmpdir.join('bin') + + gcc_path = bin_dir.join('gcc') + gxx_path = bin_dir.join('g++') + gfortran_path = bin_dir.join('gfortran') + + gcc_path.write("""\ +#!/bin/sh + +for arg in "$@"; do + if [ "$arg" = -dumpversion ]; then + echo '%s' + fi +done +""" % mock_compiler_version) + + # Create some mock compilers in the temporary directory + llnl.util.filesystem.set_executable(str(gcc_path)) + gcc_path.copy(gxx_path, mode=True) + gcc_path.copy(gfortran_path, mode=True) + + return str(tmpdir) + + +@pytest.mark.regression('11678,13138') +def test_compiler_find_without_paths(no_compilers_yaml, working_env, tmpdir): + with tmpdir.as_cwd(): + with open('gcc', 'w') as f: + f.write("""\ +#!/bin/bash +echo "0.0.0" +""") + os.chmod('gcc', 0o700) + + os.environ['PATH'] = str(tmpdir) + output = compiler('find', '--scope=site') + + assert 'gcc' in output + + +def test_compiler_remove(mutable_config, mock_packages): + args = spack.util.pattern.Bunch( + all=True, compiler_spec='gcc@4.5.0', add_paths=[], scope=None + ) + spack.cmd.compiler.compiler_remove(args) + compilers = spack.compilers.all_compiler_specs() + assert spack.spec.CompilerSpec("gcc@4.5.0") not in compilers + + +def test_compiler_add( + mutable_config, mock_packages, mock_compiler_dir, mock_compiler_version +): + # Compilers available by default. + old_compilers = set(spack.compilers.all_compiler_specs()) + + args = spack.util.pattern.Bunch( + all=None, + compiler_spec=None, + add_paths=[mock_compiler_dir], + scope=None + ) + spack.cmd.compiler.compiler_find(args) + + # Ensure new compiler is in there + new_compilers = set(spack.compilers.all_compiler_specs()) + new_compiler = new_compilers - old_compilers + assert any(c.version == spack.version.Version(mock_compiler_version) + for c in new_compiler) diff --git a/lib/spack/spack/test/cmd/compiler_command.py b/lib/spack/spack/test/cmd/compiler_command.py deleted file mode 100644 index 15949d08d48..00000000000 --- a/lib/spack/spack/test/cmd/compiler_command.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import pytest - -import os - -import spack.main - -compiler = spack.main.SpackCommand('compiler') - - -@pytest.fixture -def no_compilers_yaml(mutable_config, monkeypatch): - """Creates a temporary configuration without compilers.yaml""" - - for scope, local_config in mutable_config.scopes.items(): - compilers_yaml = os.path.join( - local_config.path, scope, 'compilers.yaml' - ) - if os.path.exists(compilers_yaml): - os.remove(compilers_yaml) - - -@pytest.mark.regression('11678,13138') -def test_compiler_find_without_paths(no_compilers_yaml, working_env, tmpdir): - with tmpdir.as_cwd(): - with open('gcc', 'w') as f: - f.write("""\ -#!/bin/bash -echo "0.0.0" -""") - os.chmod('gcc', 0o700) - - os.environ['PATH'] = str(tmpdir) - output = compiler('find', '--scope=site') - - assert 'gcc' in output diff --git a/lib/spack/spack/test/cmd/test_compiler_cmd.py b/lib/spack/spack/test/cmd/test_compiler_cmd.py deleted file mode 100644 index 3c34f720ec9..00000000000 --- a/lib/spack/spack/test/cmd/test_compiler_cmd.py +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import pytest -import llnl.util.filesystem - -import spack.cmd.compiler -import spack.compilers -import spack.spec -import spack.util.pattern -from spack.version import Version - -test_version = '4.5.3' - - -@pytest.fixture() -def mock_compiler_dir(tmpdir): - """Return a directory containing a fake, but detectable compiler.""" - - tmpdir.ensure('bin', dir=True) - bin_dir = tmpdir.join('bin') - - gcc_path = bin_dir.join('gcc') - gxx_path = bin_dir.join('g++') - gfortran_path = bin_dir.join('gfortran') - - gcc_path.write("""\ -#!/bin/sh - -for arg in "$@"; do - if [ "$arg" = -dumpversion ]; then - echo '%s' - fi -done -""" % test_version) - - # Create some mock compilers in the temporary directory - llnl.util.filesystem.set_executable(str(gcc_path)) - gcc_path.copy(gxx_path, mode=True) - gcc_path.copy(gfortran_path, mode=True) - - return str(tmpdir) - - -@pytest.mark.usefixtures('config', 'mock_packages') -class TestCompilerCommand(object): - - def test_compiler_remove(self): - args = spack.util.pattern.Bunch( - all=True, compiler_spec='gcc@4.5.0', add_paths=[], scope=None - ) - spack.cmd.compiler.compiler_remove(args) - compilers = spack.compilers.all_compiler_specs() - assert spack.spec.CompilerSpec("gcc@4.5.0") not in compilers - - def test_compiler_add(self, mock_compiler_dir): - # Compilers available by default. - old_compilers = set(spack.compilers.all_compiler_specs()) - - args = spack.util.pattern.Bunch( - all=None, - compiler_spec=None, - add_paths=[mock_compiler_dir], - scope=None - ) - spack.cmd.compiler.compiler_find(args) - - # Ensure new compiler is in there - new_compilers = set(spack.compilers.all_compiler_specs()) - new_compiler = new_compilers - old_compilers - assert any(c.version == Version(test_version) for c in new_compiler) From 7f086af05e02eacdb24450215571897d7632e6f5 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 2 Jun 2020 17:05:50 -0500 Subject: [PATCH 589/802] Ruby: add warning about Avira antivirus (#16882) --- var/spack/repos/builtin/packages/ruby/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py index 820e32e20bc..c4f2a7dcc9b 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -34,6 +34,10 @@ class Ruby(AutotoolsPackage): depends_on('openssl', when='+openssl') depends_on('readline', when='+readline') + # Known build issues when Avira antivirus software is running: + # https://github.com/rvm/rvm/issues/4313#issuecomment-374020379 + # TODO: add check for this and warn user + # gcc-7-based build requires patches (cf. https://bugs.ruby-lang.org/issues/13150) patch('ruby_23_gcc7.patch', level=0, when='@2.2.0:2.2.999 %gcc@7:') patch('ruby_23_gcc7.patch', level=0, when='@2.3.0:2.3.4 %gcc@7:') From 0e71e8716a1e62a417cb4407e26ff60e233dae87 Mon Sep 17 00:00:00 2001 From: Robert Blake Date: Tue, 2 Jun 2020 17:54:50 -0700 Subject: [PATCH 590/802] Add new package: sbml (#16898) * Adding a module for sbml. * Adding support for all the languages. * Update var/spack/repos/builtin/packages/sbml/package.py Co-authored-by: Greg Becker * Update var/spack/repos/builtin/packages/sbml/package.py Co-authored-by: Greg Becker Co-authored-by: Robert Blake Co-authored-by: Greg Becker --- .../repos/builtin/packages/sbml/package.py | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 var/spack/repos/builtin/packages/sbml/package.py diff --git a/var/spack/repos/builtin/packages/sbml/package.py b/var/spack/repos/builtin/packages/sbml/package.py new file mode 100644 index 00000000000..4c90d76bc2d --- /dev/null +++ b/var/spack/repos/builtin/packages/sbml/package.py @@ -0,0 +1,122 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Sbml(CMakePackage): + """Library for the Systems Biology Markup Language""" + + homepage = "https://sbml.org" + maintainers = ['rblake-llnl'] + + version('5.18.0', sha256='6c01be2306ec0c9656b59cb082eb7b90176c39506dd0f912b02e08298a553360') + version('5.17.0', sha256='189216e1472777e4464b791c506b79267d07a5454cb23ac991452711f8e0ed3a') + version('5.16.0', sha256='c6855481434dd2a667fef73e1ff2feade509aa2f3a76d4d06e29022975ce1496') + version('5.15.0', sha256='c779c2a8a97c5480fe044028099d928a327261fb68cf08657ec8d4f3b3fc0a21') + version('5.13.0', sha256='e58430edb1b454d7414bcf1be0549bf6860a6d19d73232eb58211559485c2c05') + version('5.12.0', sha256='c637494b19269947fc90ebe479b624d36f80d1cb5569e45cd76ddde81dd28ae4') + version('5.11.4', sha256='6429188b689b331b0b8f2c8b55b3f2339196ccd4c93191648fa767e1d02152a3') + version('5.11.0', sha256='b21931ca7461494915c617b30d4a9f2cafe831d6ce74989b3e5874e6e3c3f72b') + version('5.10.2', sha256='83f32a143cf657672b1050f5f79d3591c418fc59570d180fb1f39b103f4e5286') + version('5.10.0', sha256='2cd8b37018ce8b1df869c8c182803addbce6d451512ae25a7f527b49981f0966') + + def url_for_version(self, version): + url = "https://downloads.sourceforge.net/project/sbml/libsbml/{0}/stable/libSBML-{1}-core-plus-packages-src.tar.gz".format(version, version) + return url + + variant('python', default=False, + description='Build with python support') + depends_on('python', when="+python") + + variant('perl', default=False, + description='Build with perl support') + depends_on('perl', when="+perl") + + variant('ruby', default=False, + description='Build with ruby support') + depends_on('ruby', when="+ruby") + + variant('r', default=False, + description='Build with R support') + depends_on('r', when="+r") + + variant('octave', default=False, + description='Build with octave support') + depends_on('octave', when="+octave") + + variant('matlab', default=False, + description='Build with matlab support') + depends_on('matlab', when="+matlab") + + variant('java', default=False, + description='Build with java support') + depends_on('java', when="+java") + + variant('mono', default=False, + description='Build with mono support') + depends_on('mono', when="+mono") + + depends_on('swig@2:', type='build') + depends_on('cmake', type='build') + depends_on('zlib') + depends_on('bzip2') + depends_on('libxml2') + + def cmake_args(self): + spec = self.spec + args = [ + "-DENABLE_COMP:BOOL=ON", + "-DENABLE_FBC:BOOL=ON", + "-DENABLE_GROUPS:BOOL=ON", + "-DENABLE_LAYOUT:BOOL=ON", + "-DENABLE_QUAL:BOOL=ON", + "-DENABLE_RENDER:BOOL=ON", + "-DWITH_BZIP2:BOOL=ON", + "-DWITH_CHECK:BOOL=OFF", + "-DWITH_CPP_NAMESPACE:BOOL=OFF", + "-DWITH_DOXYGEN:BOOL=OFF", + "-DWITH_EXAMPLES:BOOL=OFF", + "-DWITH_EXPAT:BOOL=OFF", + "-DWITH_LIBXML:BOOL=ON", + "-DWITH_SWIG:BOOL=ON", + "-DWITH_WALL:BOOL=ON", + "-DWITH_XERCES:BOOL=OFF", + "-DWITH_ZLIB:BOOL=ON", + ] + if '+python' in spec: + args.extend([ + "-DWITH_PYTHON:BOOL=ON", + "-DWITH_PYTHON_INCLUDE:PATH=%s" % spec['python'].prefix, + ]) + else: + args.append('-DWITH_PYTHON:BOOL=ON') + + args.append(self.define_from_variant('WITH_CSHARP', 'mono')) + + if '+java' in spec: + args.extend([ + "-DWITH_JAVA:BOOL=ON", + "-DJDK_PATH:STRING=%s" % spec['java'].prefix, + "-DJAVA_INCLUDE_PATH:STRING=%s" % spec['java'].prefix, + ]) + else: + args.append('-DWITH_JAVA:BOOL=OFF') + + if '+matlab' in spec: + args.extend([ + "-DWITH_MATLAB:BOOL=ON", + "-DMATLAB_ROOT_PATH:PATH=%s" % spec['matlab'].prefix, + "-DWITH_MATLAB_MEX:BOOL=ON", + ]) + else: + args.append('-DWITH_MATLAB:BOOL=OFF') + + args.append(self.define_from_variant('WITH_OCTAVE', 'octave')) + args.append(self.define_from_variant('WITH_PERL', 'perl')) + args.append(self.define_from_variant('WITH_R', 'r')) + args.append(self.define_from_variant('WITH_RUBY', 'ruby')) + + return args From 5604c8d91aab3ce3191dd766e1bd79d661dac238 Mon Sep 17 00:00:00 2001 From: Justin S <3630356+codeandkey@users.noreply.github.com> Date: Tue, 2 Jun 2020 22:09:39 -0500 Subject: [PATCH 591/802] mummer4: new package at 4.0.0-beta2 (#16907) --- .../repos/builtin/packages/mummer4/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mummer4/package.py diff --git a/var/spack/repos/builtin/packages/mummer4/package.py b/var/spack/repos/builtin/packages/mummer4/package.py new file mode 100644 index 00000000000..2ba974dca91 --- /dev/null +++ b/var/spack/repos/builtin/packages/mummer4/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Mummer4(AutotoolsPackage): + """MUMmer is a versatil alignment tool for DNA and protein sequences.""" + + homepage = "https://github.com/mummer4/mummer" + url = "https://github.com/mummer4/mummer/releases/download/v4.0.0beta2/mummer-4.0.0beta2.tar.gz" + + version('4.0.0beta2', sha256='cece76e418bf9c294f348972e5b23a0230beeba7fd7d042d5584ce075ccd1b93') + + conflicts('%gcc@:4.7') + + depends_on('perl@5.6.0:', type=('build', 'run')) + depends_on('awk', type='run') + depends_on('sed', type='run') From 417eb3c5b1705d7fa89bf17cbef11bec8efa852c Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Wed, 3 Jun 2020 11:24:08 +0200 Subject: [PATCH 592/802] git: added v2.27.0 (#16918) --- var/spack/repos/builtin/packages/git/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 7b92fb65454..1094e3373d6 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -22,8 +22,12 @@ class Git(AutotoolsPackage): # * sha256_manpages: the sha256sum of the corresponding manpage from # https://www.kernel.org/pub/software/scm/git/git-manpages-{version}.tar.gz # You can find the source here: https://mirrors.edge.kernel.org/pub/software/scm/git/sha256sums.asc - releases = [ + { + 'version': '2.27.0', + 'sha256': '77ded85cbe42b1ffdc2578b460a1ef5d23bcbc6683eabcafbb0d394dffe2e787', + 'sha256_manpages': '414e4b17133e54d846f6bfa2479f9757c50e16c013eb76167a492ae5409b8947' + }, { 'version': '2.26.0', 'sha256': 'aa168c2318e7187cd295a645f7370cc6d71a324aafc932f80f00c780b6a26bed', From eed82a19bed6944fefbbee251a8f9dbad4441fcb Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Wed, 3 Jun 2020 11:28:42 +0200 Subject: [PATCH 593/802] openssh: added v8.3p1 and v8.1p1 (#16917) --- var/spack/repos/builtin/packages/openssh/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/openssh/package.py b/var/spack/repos/builtin/packages/openssh/package.py index 71f15f731e2..37f12663b01 100644 --- a/var/spack/repos/builtin/packages/openssh/package.py +++ b/var/spack/repos/builtin/packages/openssh/package.py @@ -18,6 +18,8 @@ class Openssh(AutotoolsPackage): homepage = "https://www.openssh.com/" url = "https://mirrors.sonic.net/pub/OpenBSD/OpenSSH/portable/openssh-7.6p1.tar.gz" + version('8.3p1', sha256='f2befbe0472fe7eb75d23340eb17531cb6b3aac24075e2066b41f814e12387b2') + version('8.1p1', sha256='02f5dbef3835d0753556f973cd57b4c19b6b1f6cd24c03445e23ac77ca1b93ff') version('7.9p1', sha256='6b4b3ba2253d84ed3771c8050728d597c91cfce898713beb7b64a305b6f11aad') version('7.6p1', sha256='a323caeeddfe145baaa0db16e98d784b1fbc7dd436a6bf1f479dfd5cd1d21723') version('7.5p1', sha256='9846e3c5fab9f0547400b4d2c017992f914222b3fd1f8eee6c7dc6bc5e59f9f0') From 600e2cfc4f0ffa2000376064c11651e12432f973 Mon Sep 17 00:00:00 2001 From: dmorone Date: Wed, 3 Jun 2020 11:17:36 +0000 Subject: [PATCH 594/802] amber: updated dependency constraint on cuda (#16919) Fix message 'amber requires cuda version :10.1.243, but spec asked for 10.2.89' --- var/spack/repos/builtin/packages/amber/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/amber/package.py b/var/spack/repos/builtin/packages/amber/package.py index eae98b53bda..d2ec13fb3e9 100644 --- a/var/spack/repos/builtin/packages/amber/package.py +++ b/var/spack/repos/builtin/packages/amber/package.py @@ -96,7 +96,7 @@ class Amber(Package, CudaPackage): depends_on('mpi', when='+mpi') # Cuda dependencies - depends_on('cuda@:10.1.243', when='@18:+cuda') + depends_on('cuda@:10.2.89', when='@18:+cuda') depends_on('cuda@7.5.18', when='@:16+cuda') # conflicts From 70c3b0ba09414501eee14bdce64ca70f4157985b Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 3 Jun 2020 16:30:12 +0200 Subject: [PATCH 595/802] spack uninstall: improve help message (#16886) fixes #12527 Mention that specs can be uninstalled by hash also in the help message. Reference `spack gc` in case people are looking for ways to clean the store from build time dependencies. Use "spec" instead of "package" to avoid ambiguity in the error message. --- lib/spack/spack/cmd/uninstall.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index f03270d06d5..cec71c67492 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -26,7 +26,7 @@ error_message = """You can either: a) use a more specific spec, or - b) specify the package by its hash (e.g. `spack uninstall /hash`), or + b) specify the spec by its hash (e.g. `spack uninstall /hash`), or c) use `spack uninstall --all` to uninstall ALL matching specs. """ @@ -40,6 +40,18 @@ def setup_parser(subparser): + epilog_msg = ("Specs to be uninstalled are specified using the spec syntax" + " (`spack help --spec`) and can be identified by their " + "hashes. To remove packages that are needed only at build " + "time and were not explicitly installed see `spack gc -h`." + "\n\nWhen using the --all option ALL packages matching the " + "supplied specs will be uninstalled. For instance, " + "`spack uninstall --all libelf` uninstalls all the versions " + "of `libelf` currently present in Spack's store. If no spec " + "is supplied, all installed packages will be uninstalled. " + "If used in an environment, all packages in the environment " + "will be uninstalled.") + subparser.epilog = epilog_msg subparser.add_argument( '-f', '--force', action='store_true', dest='force', help="remove regardless of whether other packages or environments " @@ -48,12 +60,8 @@ def setup_parser(subparser): subparser, ['recurse_dependents', 'yes_to_all', 'installed_specs']) subparser.add_argument( '-a', '--all', action='store_true', dest='all', - help="USE CAREFULLY. Remove ALL installed packages that match each " - "supplied spec. i.e., if you `uninstall --all libelf`," - " ALL versions of `libelf` are uninstalled. If no spec is " - "supplied, all installed packages will be uninstalled. " - "If used in an environment, all packages in the environment " - "will be uninstalled.") + help="remove ALL installed packages that match each supplied spec" + ) def find_matching_specs(env, specs, allow_multiple_matches=False, force=False): From 7aa9cb0f7a40639852dedb00cc2ecff847a3413b Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Wed, 3 Jun 2020 18:42:13 +0200 Subject: [PATCH 596/802] Implicit rpaths for NAG/GCC mixed toolchain (#14782) * Implicit rpaths for NAG. * set up environment when checking for implicit rpaths --- lib/spack/spack/compiler.py | 64 ++++++++++--------- lib/spack/spack/compilers/nag.py | 30 +++++++++ lib/spack/spack/test/compilers.py | 41 ++++++++++-- .../collect2-6.3.0-gnu-ld.txt | 3 + .../nag-6.2-gcc-6.5.0.txt | 13 ++++ lib/spack/spack/test/link_paths.py | 26 +++++++- 6 files changed, 139 insertions(+), 38 deletions(-) create mode 100644 lib/spack/spack/test/data/compiler_verbose_output/collect2-6.3.0-gnu-ld.txt create mode 100644 lib/spack/spack/test/data/compiler_verbose_output/nag-6.2-gcc-6.5.0.txt diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 410188fff49..784fd5544ea 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import contextlib import os import platform import re @@ -354,10 +355,11 @@ def _get_compiler_link_paths(self, paths): for flag_type in flags: for flag in self.flags.get(flag_type, []): compiler_exe.add_default_arg(flag) - output = str(compiler_exe(self.verbose_flag, fin, '-o', fout, - output=str, error=str)) # str for py2 - - return _parse_non_system_link_dirs(output) + with self._compiler_environment(): + output = str(compiler_exe( + self.verbose_flag, fin, '-o', fout, + output=str, error=str)) # str for py2 + return _parse_non_system_link_dirs(output) except spack.util.executable.ProcessError as pe: tty.debug('ProcessError: Command exited with non-zero status: ' + pe.long_message) @@ -468,32 +470,12 @@ def get_real_version(self): Use the runtime environment of the compiler (modules and environment modifications) to enable the compiler to run properly on any platform. """ - # store environment to replace later - backup_env = os.environ.copy() - - # load modules and set env variables - for module in self.modules: - # On cray, mic-knl module cannot be loaded without cce module - # See: https://github.com/spack/spack/issues/3153 - if os.environ.get("CRAY_CPU_TARGET") == 'mic-knl': - spack.util.module_cmd.load_module('cce') - spack.util.module_cmd.load_module(module) - - # apply other compiler environment changes - env = spack.util.environment.EnvironmentModifications() - env.extend(spack.schema.environment.parse(self.environment)) - env.apply_modifications() - cc = spack.util.executable.Executable(self.cc) - output = cc(self.version_argument, - output=str, error=str, - ignore_errors=tuple(self.ignore_version_errors)) - - # Restore environment - os.environ.clear() - os.environ.update(backup_env) - - return self.extract_version_from_output(output) + with self._compiler_environment(): + output = cc(self.version_argument, + output=str, error=str, + ignore_errors=tuple(self.ignore_version_errors)) + return self.extract_version_from_output(output) # # Compiler classes have methods for querying the version of @@ -562,6 +544,30 @@ def __str__(self): self.cc, self.cxx, self.f77, self.fc, self.modules, str(self.operating_system))))) + @contextlib.contextmanager + def _compiler_environment(self): + # store environment to replace later + backup_env = os.environ.copy() + + # load modules and set env variables + for module in self.modules: + # On cray, mic-knl module cannot be loaded without cce module + # See: https://github.com/spack/spack/issues/3153 + if os.environ.get("CRAY_CPU_TARGET") == 'mic-knl': + spack.util.module_cmd.load_module('cce') + spack.util.module_cmd.load_module(module) + + # apply other compiler environment changes + env = spack.util.environment.EnvironmentModifications() + env.extend(spack.schema.environment.parse(self.environment)) + env.apply_modifications() + + yield + + # Restore environment + os.environ.clear() + os.environ.update(backup_env) + class CompilerAccessError(spack.error.SpackError): diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py index 4b2de06c079..503a31e404b 100644 --- a/lib/spack/spack/compilers/nag.py +++ b/lib/spack/spack/compilers/nag.py @@ -30,6 +30,36 @@ class Nag(spack.compiler.Compiler): version_argument = '-V' version_regex = r'NAG Fortran Compiler Release ([0-9.]+)' + @property + def verbose_flag(self): + # NAG does not support a flag that would enable verbose output and + # compilation/linking at the same time (with either '-#' or '-dryrun' + # the compiler only prints the commands but does not run them). + # Therefore, the only thing we can do is to pass the '-v' argument to + # the underlying GCC. In order to get verbose output from the latter + # at both compile and linking stages, we need to call NAG with two + # additional flags: '-Wc,-v' and '-Wl,-v'. However, we return only + # '-Wl,-v' for the following reasons: + # 1) the interface of this method does not support multiple flags in + # the return value and, at least currently, verbose output at the + # linking stage has a higher priority for us; + # 2) NAG is usually mixed with GCC compiler, which also accepts + # '-Wl,-v' and produces meaningful result with it: '-v' is passed + # to the linker and the latter produces verbose output for the + # linking stage ('-Wc,-v', however, would break the compilation + # with a message from GCC that the flag is not recognized). + # + # This way, we at least enable the implicit rpath detection, which is + # based on compilation of a C file (see method + # spack.compiler._get_compiler_link_paths): in the case of a mixed + # NAG/GCC toolchain, the flag will be passed to g++ (e.g. + # 'g++ -Wl,-v ./main.c'), otherwise, the flag will be passed to nagfor + # (e.g. 'nagfor -Wl,-v ./main.c' - note that nagfor recognizes '.c' + # extension and treats the file accordingly). The list of detected + # rpaths will contain only GCC-related directories and rpaths to + # NAG-related directories are injected by nagfor anyway. + return "-Wl,-v" + @property def openmp_flag(self): return "-openmp" diff --git a/lib/spack/spack/test/compilers.py b/lib/spack/spack/test/compilers.py index 7c79e9027fb..4598605fe48 100644 --- a/lib/spack/spack/test/compilers.py +++ b/lib/spack/spack/test/compilers.py @@ -157,13 +157,14 @@ def test_compiler_flags_from_config_are_grouped(): class MockCompiler(Compiler): def __init__(self): super(MockCompiler, self).__init__( - "badcompiler@1.0.0", - default_compiler_entry['operating_system'], - None, - [default_compiler_entry['paths']['cc'], - default_compiler_entry['paths']['cxx'], - default_compiler_entry['paths']['fc'], - default_compiler_entry['paths']['f77']]) + cspec="badcompiler@1.0.0", + operating_system=default_compiler_entry['operating_system'], + target=None, + paths=[default_compiler_entry['paths']['cc'], + default_compiler_entry['paths']['cxx'], + default_compiler_entry['paths']['fc'], + default_compiler_entry['paths']['f77']], + environment={}) _get_compiler_link_paths = Compiler._get_compiler_link_paths @@ -267,6 +268,32 @@ def test_get_compiler_link_paths_no_verbose_flag(): assert dirs == [] +def test_get_compiler_link_paths_load_env(working_env, monkeypatch, tmpdir): + gcc = str(tmpdir.join('gcc')) + with open(gcc, 'w') as f: + f.write("""#!/bin/bash +if [[ $ENV_SET == "1" && $MODULE_LOADED == "1" ]]; then + echo '""" + no_flag_output + """' +fi +""") + fs.set_executable(gcc) + + # Set module load to turn compiler on + def module(*args): + if args[0] == 'show': + return '' + elif args[0] == 'load': + os.environ['MODULE_LOADED'] = "1" + monkeypatch.setattr(spack.util.module_cmd, 'module', module) + + compiler = MockCompiler() + compiler.environment = {'set': {'ENV_SET': '1'}} + compiler.modules = ['turn_on'] + + dirs = compiler._get_compiler_link_paths([gcc]) + assert dirs == no_flag_dirs + + # Get the desired flag from the specified compiler spec. def flag_value(flag, spec): compiler = None diff --git a/lib/spack/spack/test/data/compiler_verbose_output/collect2-6.3.0-gnu-ld.txt b/lib/spack/spack/test/data/compiler_verbose_output/collect2-6.3.0-gnu-ld.txt new file mode 100644 index 00000000000..cceff7fc658 --- /dev/null +++ b/lib/spack/spack/test/data/compiler_verbose_output/collect2-6.3.0-gnu-ld.txt @@ -0,0 +1,3 @@ +collect2 version 6.5.0 +/usr/bin/ld -plugin /scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/liblto_plugin.so -plugin-opt=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccbFmewQ.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -rpath /scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib:/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib64 --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o output /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o /scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/crtbegin.o -L/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0 -L/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../.. -v /tmp/ccxz6i1I.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/crtend.o /usr/lib/x86_64-linux-gnu/crtn.o +GNU ld (GNU Binutils for Debian) 2.28 diff --git a/lib/spack/spack/test/data/compiler_verbose_output/nag-6.2-gcc-6.5.0.txt b/lib/spack/spack/test/data/compiler_verbose_output/nag-6.2-gcc-6.5.0.txt new file mode 100644 index 00000000000..9fa3dc69bae --- /dev/null +++ b/lib/spack/spack/test/data/compiler_verbose_output/nag-6.2-gcc-6.5.0.txt @@ -0,0 +1,13 @@ +NAG Fortran Compiler Release 6.2(Chiyoda) Build 6223 +Reading specs from /scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/specs +COLLECT_GCC=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/bin/gcc +COLLECT_LTO_WRAPPER=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/lto-wrapper +Target: x86_64-pc-linux-gnu +Configured with: /tmp/m300488/spack-stage/spack-stage-gcc-6.5.0-4sdjgrsboy3lowtq3t7pmp7rx3ogkqtz/spack-src/configure --prefix=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs --with-pkgversion='Spack GCC' --with-bugurl=https://github.com/spack/spack/issues --disable-multilib --enable-languages=c,c++,fortran --disable-nls --with-mpfr=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/mpfr-3.1.6-w63rspk --with-gmp=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gmp-6.1.2-et64cuj --with-system-zlib --with-mpc=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/mpc-1.1.0-en66k4t --with-isl=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/isl-0.18-62v4uyg +Thread model: posix +gcc version 6.5.0 (Spack GCC) +COMPILER_PATH=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/:/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/:/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/libexec/gcc/x86_64-pc-linux-gnu/:/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/:/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/ +LIBRARY_PATH=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/:/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../lib64/:/lib/x86_64-linux-gnu/:/lib/../lib64/:/usr/lib/x86_64-linux-gnu/:/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-m64' '-o' 'output' '-v' '-mtune=generic' '-march=x86-64' + /scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/collect2 -plugin /scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/liblto_plugin.so -plugin-opt=/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/libexec/gcc/x86_64-pc-linux-gnu/6.5.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccBpU203.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -rpath /scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib:/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib64 --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o output /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o /scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/crtbegin.o -L/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0 -L/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/../../.. /sw/stretch-x64/nag/nag-6.2/lib/NAG_Fortran/f62init.o /sw/stretch-x64/nag/nag-6.2/lib/NAG_Fortran/quickfit.o /tmp/main.000786.o -rpath /sw/stretch-x64/nag/nag-6.2/lib/NAG_Fortran /sw/stretch-x64/nag/nag-6.2/lib/NAG_Fortran/libf62rts.so /sw/stretch-x64/nag/nag-6.2/lib/NAG_Fortran/libf62rts.a -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0/crtend.o /usr/lib/x86_64-linux-gnu/crtn.o +COLLECT_GCC_OPTIONS='-m64' '-o' 'output' '-v' '-mtune=generic' '-march=x86-64' diff --git a/lib/spack/spack/test/link_paths.py b/lib/spack/spack/test/link_paths.py index 27e42d2194b..4ae0a35cf82 100644 --- a/lib/spack/spack/test/link_paths.py +++ b/lib/spack/spack/test/link_paths.py @@ -32,8 +32,8 @@ def check_link_paths(filename, paths): def test_icc16_link_paths(): check_link_paths('icc-16.0.3.txt', [ - '/usr/tce/packages/intel/intel-16.0.3/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64_lin', # noqa - '/usr/tce/packages/gcc/gcc-4.9.3/lib64/gcc/x86_64-unknown-linux-gnu/4.9.3', # noqa + '/usr/tce/packages/intel/intel-16.0.3/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64_lin', # noqa + '/usr/tce/packages/gcc/gcc-4.9.3/lib64/gcc/x86_64-unknown-linux-gnu/4.9.3', # noqa '/usr/tce/packages/gcc/gcc-4.9.3/lib64']) @@ -82,6 +82,28 @@ def test_clang_apple_ld_link_paths(): '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib']) # noqa +def test_nag_mixed_gcc_gnu_ld_link_paths(): + # This is a test of a mixed NAG/GCC toolchain, i.e. 'cxx' is set to g++ and + # is used for the rpath detection. The reference compiler output is a + # result of + # '/path/to/gcc/bin/g++ -Wl,-v ./main.c'. + check_link_paths('collect2-6.3.0-gnu-ld.txt', [ + '/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0', # noqa + '/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib64', # noqa + '/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib']) # noqa + + +def test_nag_link_paths(): + # This is a test of a NAG-only toolchain, i.e. 'cc' and 'cxx' are empty, + # and therefore 'fc' is used for the rpath detection). The reference + # compiler output is a result of + # 'nagfor -Wc=/path/to/gcc/bin/gcc -Wl,-v ./main.c'. + check_link_paths('nag-6.2-gcc-6.5.0.txt', [ + '/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib/gcc/x86_64-pc-linux-gnu/6.5.0', # noqa + '/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib64', # noqa + '/scratch/local1/spack/opt/spack/gcc-6.3.0-haswell/gcc-6.5.0-4sdjgrs/lib']) # noqa + + def test_obscure_parsing_rules(): check_link_paths('obscure-parsing-rules.txt', [ '/first/path', From 3347ef2de4e08374750eb68f750800c1854d595f Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Wed, 3 Jun 2020 09:45:13 -0700 Subject: [PATCH 597/802] Feature: add option to create view by copying/relocating files (#16480) * add subcommand `spack view copy/relocate` * update bash completions * add copy/relocate commands to view tests * allow copied views to be removed --- lib/spack/spack/cmd/view.py | 23 +++++-- lib/spack/spack/filesystem_view.py | 60 ++++++++++++++++++- lib/spack/spack/package.py | 2 +- lib/spack/spack/test/cmd/view.py | 16 +++-- share/spack/spack-completion.bash | 20 ++++++- .../repos/builtin/packages/python/package.py | 4 +- 6 files changed, 108 insertions(+), 17 deletions(-) diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index bad155a456b..151f6c15640 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -33,8 +33,6 @@ YamlFilesystemView. ''' -import os - import llnl.util.tty as tty from llnl.util.link_tree import MergeConflictError from llnl.util.tty.color import colorize @@ -45,13 +43,15 @@ import spack.schema.projections from spack.config import validate from spack.filesystem_view import YamlFilesystemView +from spack.filesystem_view import view_symlink, view_hardlink, view_copy from spack.util import spack_yaml as s_yaml description = "project packages to a compact naming scheme on the filesystem." section = "environments" level = "short" -actions_link = ["symlink", "add", "soft", "hardlink", "hard"] +actions_link = ["symlink", "add", "soft", "hardlink", "hard", "copy", + "relocate"] actions_remove = ["remove", "rm"] actions_status = ["statlink", "status", "check"] @@ -112,6 +112,9 @@ def setup_parser(sp): "hardlink": ssp.add_parser( 'hardlink', aliases=['hard'], help='add packages files to a filesystem view via hard links'), + "copy": ssp.add_parser( + 'copy', aliases=['relocate'], + help='add package files to a filesystem view via copy/relocate'), "remove": ssp.add_parser( 'remove', aliases=['rm'], help='remove packages from a filesystem view'), @@ -125,7 +128,7 @@ def setup_parser(sp): act.add_argument('path', nargs=1, help="path to file system view directory") - if cmd in ("symlink", "hardlink"): + if cmd in ("symlink", "hardlink", "copy"): # invalid for remove/statlink, for those commands the view needs to # already know its own projections. help_msg = "Initialize view using projections from file." @@ -157,7 +160,7 @@ def setup_parser(sp): so["nargs"] = "+" act.add_argument('specs', **so) - for cmd in ["symlink", "hardlink"]: + for cmd in ["symlink", "hardlink", "copy"]: act = file_system_view_actions[cmd] act.add_argument("-i", "--ignore-conflicts", action='store_true') @@ -179,11 +182,19 @@ def view(parser, args): else: ordered_projections = {} + # What method are we using for this view + if args.action in ("hardlink", "hard"): + link_fn = view_hardlink + elif args.action in ("copy", "relocate"): + link_fn = view_copy + else: + link_fn = view_symlink + view = YamlFilesystemView( path, spack.store.layout, projections=ordered_projections, ignore_conflicts=getattr(args, "ignore_conflicts", False), - link=os.link if args.action in ["hardlink", "hard"] else os.symlink, + link=link_fn, verbose=args.verbose) # Process common args and specs diff --git a/lib/spack/spack/filesystem_view.py b/lib/spack/spack/filesystem_view.py index b2bc30e1a5c..f4d77a694bc 100644 --- a/lib/spack/spack/filesystem_view.py +++ b/lib/spack/spack/filesystem_view.py @@ -24,6 +24,7 @@ import spack.schema.projections import spack.projections import spack.config +import spack.relocate from spack.error import SpackError from spack.directory_layout import ExtensionAlreadyInstalledError from spack.directory_layout import YamlViewExtensionsLayout @@ -41,6 +42,58 @@ _projections_path = '.spack/projections.yaml' +def view_symlink(src, dst, **kwargs): + # keyword arguments are irrelevant + # here to fit required call signature + os.symlink(src, dst) + + +def view_hardlink(src, dst, **kwargs): + # keyword arguments are irrelevant + # here to fit required call signature + os.link(src, dst) + + +def view_copy(src, dst, view, spec=None): + """ + Copy a file from src to dst. + + Use spec and view to generate relocations + """ + shutil.copyfile(src, dst) + if spec: + # Not metadata, we have to relocate it + + # Get information on where to relocate from/to + prefix_to_projection = dict( + (dep.prefix, view.get_projection_for_spec(dep)) + for dep in spec.traverse() + ) + + if spack.relocate.is_binary(dst): + # relocate binaries + spack.relocate.relocate_text_bin( + binaries=[dst], + orig_install_prefix=spec.prefix, + new_install_prefix=view.get_projection_for_spec(spec), + orig_spack=spack.paths.spack_root, + new_spack=view._root, + new_prefixes=prefix_to_projection + ) + else: + # relocate text + spack.relocate.relocate_text( + files=[dst], + orig_layout_root=spack.store.layout.root, + new_layout_root=view._root, + orig_install_prefix=spec.prefix, + new_install_prefix=view.get_projection_for_spec(spec), + orig_spack=spack.paths.spack_root, + new_spack=view._root, + new_prefixes=prefix_to_projection + ) + + class FilesystemView(object): """ Governs a filesystem view that is located at certain root-directory. @@ -67,9 +120,12 @@ def __init__(self, root, layout, **kwargs): self.projections = kwargs.get('projections', {}) self.ignore_conflicts = kwargs.get("ignore_conflicts", False) - self.link = kwargs.get("link", os.symlink) self.verbose = kwargs.get("verbose", False) + # Setup link function to include view + link_func = kwargs.get("link", view_symlink) + self.link = ft.partial(link_func, view=self) + def add_specs(self, *specs, **kwargs): """ Add given specs to view. @@ -355,8 +411,6 @@ def remove_file(self, src, dest): if not os.path.lexists(dest): tty.warn("Tried to remove %s which does not exist" % dest) return - if not os.path.islink(dest): - raise ValueError("%s is not a link tree!" % dest) # remove if dest is a hardlink/symlink to src; this will only # be false if two packages are merged into a prefix and have a # conflicting file diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 9b6f0efb48b..bb5ea41dc3e 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -332,7 +332,7 @@ def add_files_to_view(self, view, merge_map): """ for src, dst in merge_map.items(): if not os.path.exists(dst): - view.link(src, dst) + view.link(src, dst, spec=self.spec) def remove_files_from_view(self, view, merge_map): """Given a map of package files to files currently linked in the view, diff --git a/lib/spack/spack/test/cmd/view.py b/lib/spack/spack/test/cmd/view.py index c52cd123252..d908248a19b 100644 --- a/lib/spack/spack/test/cmd/view.py +++ b/lib/spack/spack/test/cmd/view.py @@ -24,7 +24,8 @@ def create_projection_file(tmpdir, projection): return projection_file -@pytest.mark.parametrize('cmd', ['hardlink', 'symlink', 'hard', 'add']) +@pytest.mark.parametrize('cmd', ['hardlink', 'symlink', 'hard', 'add', + 'copy', 'relocate']) def test_view_link_type( tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery, cmd): @@ -33,10 +34,14 @@ def test_view_link_type( view(cmd, viewpath, 'libdwarf') package_prefix = os.path.join(viewpath, 'libdwarf') assert os.path.exists(package_prefix) - assert os.path.islink(package_prefix) == (not cmd.startswith('hard')) + + # Check that we use symlinks for and only for the appropriate subcommands + is_link_cmd = cmd in ('symlink', 'add') + assert os.path.islink(package_prefix) == is_link_cmd -@pytest.mark.parametrize('cmd', ['hardlink', 'symlink', 'hard', 'add']) +@pytest.mark.parametrize('cmd', ['hardlink', 'symlink', 'hard', 'add', + 'copy', 'relocate']) def test_view_projections( tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery, cmd): @@ -54,7 +59,10 @@ def test_view_projections( package_prefix = os.path.join(viewpath, 'libdwarf-20130207/libdwarf') assert os.path.exists(package_prefix) - assert os.path.islink(package_prefix) == (not cmd.startswith('hard')) + + # Check that we use symlinks for and only for the appropriate subcommands + is_symlink_cmd = cmd in ('symlink', 'add') + assert os.path.islink(package_prefix) == is_symlink_cmd def test_view_multiple_projections( diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 49518de059b..6801862beed 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1521,7 +1521,7 @@ _spack_view() { then SPACK_COMPREPLY="-h --help -v --verbose -e --exclude -d --dependencies" else - SPACK_COMPREPLY="symlink add soft hardlink hard remove rm statlink status check" + SPACK_COMPREPLY="symlink add soft hardlink hard copy relocate remove rm statlink status check" fi } @@ -1570,6 +1570,24 @@ _spack_view_hard() { fi } +_spack_view_copy() { + if $list_options + then + SPACK_COMPREPLY="-h --help --projection-file -i --ignore-conflicts" + else + _all_packages + fi +} + +_spack_view_relocate() { + if $list_options + then + SPACK_COMPREPLY="-h --help --projection-file -i --ignore-conflicts" + else + _all_packages + fi +} + _spack_view_remove() { if $list_options then diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 7a269f8a1d6..2311f6ad39a 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -962,7 +962,7 @@ def add_files_to_view(self, view, merge_map): bin_dir = self.spec.prefix.bin for src, dst in merge_map.items(): if not path_contains_subdirectory(src, bin_dir): - view.link(src, dst) + view.link(src, dst, spec=self.spec) elif not os.path.islink(src): copy(src, dst) if 'script' in get_filetype(src): @@ -988,7 +988,7 @@ def add_files_to_view(self, view, merge_map): orig_link_target = os.path.join(self.spec.prefix, realpath_rel) new_link_target = os.path.abspath(merge_map[orig_link_target]) - view.link(new_link_target, dst) + view.link(new_link_target, dst, spec=self.spec) def remove_files_from_view(self, view, merge_map): bin_dir = self.spec.prefix.bin From 0086c475466ee2501ccbf446a22ed68930c3e580 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Wed, 3 Jun 2020 11:38:27 -0700 Subject: [PATCH 598/802] patch lambda capture issue for @1.1906.1, fixed in upstream faodel@master (#16935) --- .../faodel/lambda-capture-f0267fc.patch | 26 +++++++++++++++++++ .../repos/builtin/packages/faodel/package.py | 1 + 2 files changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/faodel/lambda-capture-f0267fc.patch diff --git a/var/spack/repos/builtin/packages/faodel/lambda-capture-f0267fc.patch b/var/spack/repos/builtin/packages/faodel/lambda-capture-f0267fc.patch new file mode 100644 index 00000000000..2dd2c32d118 --- /dev/null +++ b/var/spack/repos/builtin/packages/faodel/lambda-capture-f0267fc.patch @@ -0,0 +1,26 @@ +From f0267fc728d0f49ad396b83e8e62fba54027f31f Mon Sep 17 00:00:00 2001 +From: Craig Ulmer +Date: Fri, 29 May 2020 23:08:29 -0700 +Subject: [PATCH] FIX: Removes variable from lambda capture that conflicted + with args + +--- + src/kelpie/pools/DHTPool/DHTPool.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/kelpie/pools/DHTPool/DHTPool.cpp b/src/kelpie/pools/DHTPool/DHTPool.cpp +index df9c1d3..d24aa89 100644 +--- a/src/kelpie/pools/DHTPool/DHTPool.cpp ++++ b/src/kelpie/pools/DHTPool/DHTPool.cpp +@@ -229,7 +229,7 @@ rc_t DHTPool::Need(const Key &key, size_t expected_ldo_user_bytes, lunasa::DataO + bool is_found=false; + + rc_t rc = Want(key, expected_ldo_user_bytes, +- [&key, &returned_ldo, &cv, &is_found] (bool success, Key key, lunasa::DataObject result_ldo, ++ [&returned_ldo, &cv, &is_found] (bool success, Key key, lunasa::DataObject result_ldo, + const kv_row_info_t &ri, const kv_col_info_t &c) { + if(success) { + *returned_ldo = result_ldo; +-- +2.24.2 (Apple Git-127) + diff --git a/var/spack/repos/builtin/packages/faodel/package.py b/var/spack/repos/builtin/packages/faodel/package.py index 63f5798a024..255f0396fa4 100644 --- a/var/spack/repos/builtin/packages/faodel/package.py +++ b/var/spack/repos/builtin/packages/faodel/package.py @@ -55,6 +55,7 @@ class Faodel(CMakePackage): patch('faodel_mpi.patch', when='@1.1811.1 ~mpi') # FAODEL Github issue #5 patch('faodel_sbl.patch', when='@1.1811.1 logging=sbl') + patch('lambda-capture-f0267fc.patch', when='@1.1906.1') def cmake_args(self): spec = self.spec From 24775697f5b8b38bea407fd5b2594e483f39d150 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 3 Jun 2020 17:43:51 -0700 Subject: [PATCH 599/802] Mirrors: add option to exclude packages from "mirror create" (#14154) * add an --exclude-file option to 'spack mirror create' which allows a user to specify a file of specs to exclude when creating a mirror. this is anticipated to be useful especially when using the '--all' option * allow specifying number of versions when mirroring all packages * when mirroring all specs within an environment, include dependencies of root specs * add '--exclude-specs' option to allow user to specify that specs should be excluded on the command line * add test for excluding specs --- lib/spack/spack/cmd/mirror.py | 46 ++++++++++++++++++++++----- lib/spack/spack/environment.py | 25 ++++++--------- lib/spack/spack/test/cmd/mirror.py | 50 ++++++++++++++++++++++++++++++ share/spack/spack-completion.bash | 2 +- 4 files changed, 99 insertions(+), 24 deletions(-) diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index 1473550a560..2d338204d3b 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -45,6 +45,15 @@ def setup_parser(subparser): " (this requires significant time and space)") create_parser.add_argument( '-f', '--file', help="file with specs of packages to put in mirror") + create_parser.add_argument( + '--exclude-file', + help="specs which Spack should not try to add to a mirror" + " (listed in a file, one per line)") + create_parser.add_argument( + '--exclude-specs', + help="specs which Spack should not try to add to a mirror" + " (specified on command line)") + create_parser.add_argument( '--skip-unstable-versions', action='store_true', help="don't cache versions unless they identify a stable (unchanging)" @@ -232,9 +241,7 @@ def _read_specs_from_file(filename): return specs -def mirror_create(args): - """Create a directory to be used as a spack mirror, and fill it with - package archives.""" +def _determine_specs_to_mirror(args): if args.specs and args.all: raise SpackError("Cannot specify specs on command line if you" " chose to mirror all specs with '--all'") @@ -264,6 +271,7 @@ def mirror_create(args): tty.die("Cannot pass specs on the command line with --file.") specs = _read_specs_from_file(args.file) + env_specs = None if not specs: # If nothing is passed, use environment or all if no active env if not args.all: @@ -273,12 +281,9 @@ def mirror_create(args): env = ev.get_env(args, 'mirror') if env: - mirror_specs = env.specs_by_hash.values() + env_specs = env.all_specs() else: specs = [Spec(n) for n in spack.repo.all_package_names()] - mirror_specs = spack.mirror.get_all_versions(specs) - mirror_specs.sort( - key=lambda s: (s.name, s.version)) else: # If the user asked for dependencies, traverse spec DAG get them. if args.dependencies: @@ -297,11 +302,38 @@ def mirror_create(args): msg = 'Skipping {0} as it is an external spec.' tty.msg(msg.format(spec.cshort_spec)) + if env_specs: + if args.versions_per_spec: + tty.warn("Ignoring '--versions-per-spec' for mirroring specs" + " in environment.") + mirror_specs = env_specs + else: if num_versions == 'all': mirror_specs = spack.mirror.get_all_versions(specs) else: mirror_specs = spack.mirror.get_matching_versions( specs, num_versions=num_versions) + mirror_specs.sort( + key=lambda s: (s.name, s.version)) + + exclude_specs = [] + if args.exclude_file: + exclude_specs.extend(_read_specs_from_file(args.exclude_file)) + if args.exclude_specs: + exclude_specs.extend( + spack.cmd.parse_specs(str(args.exclude_specs).split())) + if exclude_specs: + mirror_specs = list( + x for x in mirror_specs + if not any(x.satisfies(y, strict=True) for y in exclude_specs)) + + return mirror_specs + + +def mirror_create(args): + """Create a directory to be used as a spack mirror, and fill it with + package archives.""" + mirror_specs = _determine_specs_to_mirror(args) mirror = spack.mirror.Mirror( args.directory or spack.config.get('config:source_cache')) diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 8d3b1438e12..00af2df2d93 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -1232,26 +1232,19 @@ def install_all(self, args=None): self._install(spec, **kwargs) - def all_specs_by_hash(self): - """Map of hashes to spec for all specs in this environment.""" - # Note this uses dag-hashes calculated without build deps as keys, - # whereas the environment tracks specs based on dag-hashes calculated - # with all dependencies. This function should not be used by an - # Environment object for management of its own data structures - hashes = {} - for h in self.concretized_order: - specs = self.specs_by_hash[h].traverse(deptype=('link', 'run')) - for spec in specs: - hashes[spec.dag_hash()] = spec - return hashes - def all_specs(self): """Return all specs, even those a user spec would shadow.""" - return sorted(self.all_specs_by_hash().values()) + all_specs = set() + for h in self.concretized_order: + all_specs.update(self.specs_by_hash[h].traverse()) + + return sorted(all_specs) def all_hashes(self): - """Return all specs, even those a user spec would shadow.""" - return list(self.all_specs_by_hash().keys()) + """Return hashes of all specs. + + Note these hashes exclude build dependencies.""" + return list(set(s.dag_hash() for s in self.all_specs())) def roots(self): """Specs explicitly requested by the user *in this environment*. diff --git a/lib/spack/spack/test/cmd/mirror.py b/lib/spack/spack/test/cmd/mirror.py index 4bb4fad2248..f6fe0b24ddb 100644 --- a/lib/spack/spack/test/cmd/mirror.py +++ b/lib/spack/spack/test/cmd/mirror.py @@ -89,6 +89,56 @@ def test_mirror_skip_unstable(tmpdir_factory, mock_packages, config, set(['trivial-pkg-with-valid-hash'])) +class MockMirrorArgs(object): + def __init__(self, specs=None, all=False, file=None, + versions_per_spec=None, dependencies=False, + exclude_file=None, exclude_specs=None): + self.specs = specs or [] + self.all = all + self.file = file + self.versions_per_spec = versions_per_spec + self.dependencies = dependencies + self.exclude_file = exclude_file + self.exclude_specs = exclude_specs + + +def test_exclude_specs(mock_packages): + args = MockMirrorArgs( + specs=['mpich'], + versions_per_spec='all', + exclude_specs="mpich@3.0.1:3.0.2 mpich@1.0") + + mirror_specs = spack.cmd.mirror._determine_specs_to_mirror(args) + expected_include = set(spack.spec.Spec(x) for x in + ['mpich@3.0.3', 'mpich@3.0.4', 'mpich@3.0']) + expected_exclude = set(spack.spec.Spec(x) for x in + ['mpich@3.0.1', 'mpich@3.0.2', 'mpich@1.0']) + assert expected_include <= set(mirror_specs) + assert (not expected_exclude & set(mirror_specs)) + + +def test_exclude_file(mock_packages, tmpdir): + exclude_path = os.path.join(str(tmpdir), 'test-exclude.txt') + with open(exclude_path, 'w') as exclude_file: + exclude_file.write("""\ +mpich@3.0.1:3.0.2 +mpich@1.0 +""") + + args = MockMirrorArgs( + specs=['mpich'], + versions_per_spec='all', + exclude_file=exclude_path) + + mirror_specs = spack.cmd.mirror._determine_specs_to_mirror(args) + expected_include = set(spack.spec.Spec(x) for x in + ['mpich@3.0.3', 'mpich@3.0.4', 'mpich@3.0']) + expected_exclude = set(spack.spec.Spec(x) for x in + ['mpich@3.0.1', 'mpich@3.0.2', 'mpich@1.0']) + assert expected_include <= set(mirror_specs) + assert (not expected_exclude & set(mirror_specs)) + + def test_mirror_crud(tmp_scope, capsys): with capsys.disabled(): mirror('add', '--scope', tmp_scope, 'mirror', 'http://spack.io') diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 6801862beed..fa1e79c9c7f 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1042,7 +1042,7 @@ _spack_mirror() { _spack_mirror_create() { if $list_options then - SPACK_COMPREPLY="-h --help -d --directory -a --all -f --file --skip-unstable-versions -D --dependencies -n --versions-per-spec" + SPACK_COMPREPLY="-h --help -d --directory -a --all -f --file --exclude-file --exclude-specs --skip-unstable-versions -D --dependencies -n --versions-per-spec" else _all_packages fi From 748be57790832e73c78f59e43126ba22c1de78a2 Mon Sep 17 00:00:00 2001 From: shanedsnyder Date: Wed, 3 Jun 2020 20:05:46 -0500 Subject: [PATCH 600/802] update darshan-runtime & darshan-util versions (#16934) * update darshan-runtime & darshan-util versions includes up through the current release, 3.2.1 * remove pre-releases, not needed in spack --- var/spack/repos/builtin/packages/darshan-runtime/package.py | 2 ++ var/spack/repos/builtin/packages/darshan-util/package.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/darshan-runtime/package.py b/var/spack/repos/builtin/packages/darshan-runtime/package.py index 3789612f129..c58bc9edd5f 100644 --- a/var/spack/repos/builtin/packages/darshan-runtime/package.py +++ b/var/spack/repos/builtin/packages/darshan-runtime/package.py @@ -21,6 +21,8 @@ class DarshanRuntime(Package): maintainers = ['shanedsnyder', 'carns'] version('develop', branch='master') + version('3.2.1', sha256='d63048b7a3d1c4de939875943e3e7a2468a9034fcb68585edbc87f57f622e7f7') + version('3.2.0', sha256='4035435bdc0fa2a678247fbf8d5a31dfeb3a133baf06577786b1fe8d00a31b7e') version('3.1.8', sha256='3ed51c8d5d93b4a8cbb7d53d13052140a9dffe0bc1a3e1ebfc44a36a184b5c82') version('3.1.7', sha256='9ba535df292727ac1e8025bdf2dc42942715205cad8319d925723fd88709e8d6') version('3.1.6', sha256='21cb24e2a971c45e04476e00441b7fbea63d2afa727a5cf8b7a4a9d9004dd856') diff --git a/var/spack/repos/builtin/packages/darshan-util/package.py b/var/spack/repos/builtin/packages/darshan-util/package.py index 8d25fa99650..af5502a7fbf 100644 --- a/var/spack/repos/builtin/packages/darshan-util/package.py +++ b/var/spack/repos/builtin/packages/darshan-util/package.py @@ -19,6 +19,8 @@ class DarshanUtil(Package): maintainers = ['shanedsnyder', 'carns'] version('develop', branch='master') + version('3.2.1', sha256='d63048b7a3d1c4de939875943e3e7a2468a9034fcb68585edbc87f57f622e7f7') + version('3.2.0', sha256='4035435bdc0fa2a678247fbf8d5a31dfeb3a133baf06577786b1fe8d00a31b7e') version('3.1.8', sha256='3ed51c8d5d93b4a8cbb7d53d13052140a9dffe0bc1a3e1ebfc44a36a184b5c82') version('3.1.7', sha256='9ba535df292727ac1e8025bdf2dc42942715205cad8319d925723fd88709e8d6') version('3.1.6', sha256='21cb24e2a971c45e04476e00441b7fbea63d2afa727a5cf8b7a4a9d9004dd856') From 0fb671a19ed6e4afe8693ae2a17f0caaee9acca3 Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Wed, 3 Jun 2020 23:08:07 -0400 Subject: [PATCH 601/802] Gnuplot fix 16928 (#16929) * gnuplot: Fix for #16928 Dependency for --with-wx flag mistyped (should be wxwidgets) * Revert "gnuplot: Fix for #16928" This reverts commit 2b85814e5ccf5c9b2c70c7959994e89c18fdc3d8. * gnuplot: Fix for #16928 Dependency spec for --with-wx flag mistyped (should be wxwidgets, not wx) --- var/spack/repos/builtin/packages/gnuplot/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gnuplot/package.py b/var/spack/repos/builtin/packages/gnuplot/package.py index 9fb79e67466..59e527fcde4 100644 --- a/var/spack/repos/builtin/packages/gnuplot/package.py +++ b/var/spack/repos/builtin/packages/gnuplot/package.py @@ -122,7 +122,7 @@ def configure_args(self): options.append('--with-qt=no') if '+wx' in spec: - options.append('--with-wx=%s' % spec['wx'].prefix) + options.append('--with-wx=%s' % spec['wxwidgets'].prefix) else: options.append('--disable-wxwidgets') From a02fc8ae58c1ad83e09badabceaae45519d01e48 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 3 Jun 2020 22:09:06 -0500 Subject: [PATCH 602/802] Ignore __pycache__ directory (#16836) --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 96947860ee0..e2f485ab924 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /var/spack/environments /var/spack/repos/*/index.yaml /var/spack/repos/*/lock +__pycache__/ *.pyc /opt *~ @@ -36,4 +37,4 @@ lib/spack/spack/test/.cache # VSCode files .vscode -.devcontainer \ No newline at end of file +.devcontainer From dd19d6f863d01b3beb38104293b2927623b2753d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 3 Jun 2020 22:09:22 -0500 Subject: [PATCH 603/802] Fix parsing of EvtGen URL (#16883) * Fix parsing of EvtGen URL * Flake8 fix --- lib/spack/spack/test/url_parse.py | 2 ++ lib/spack/spack/url.py | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py index 06515620073..846e24d242c 100644 --- a/lib/spack/spack/test/url_parse.py +++ b/lib/spack/spack/test/url_parse.py @@ -464,6 +464,8 @@ def test_url_parse_offset(name, noffset, ver, voffset, path): 'http://laws-green.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.4.0beta.1_r20171213193219.tgz'), ('vampirtrace', '5.14.4', 'http://wwwpub.zih.tu-dresden.de/~mlieber/dcount/dcount.php?package=vampirtrace&get=VampirTrace-5.14.4.tar.gz'), + ('EvtGen', '01.07.00', + 'https://evtgen.hepforge.org/downloads?f=EvtGen-01.07.00.tar.gz'), # (we don't actually look for these, they are picked up # during the preliminary stem parsing) ('octopus', '6.0', 'http://octopus-code.org/down.php?file=6.0/octopus-6.0.tar.gz'), diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index a728c46a713..4969d5f3530 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -549,27 +549,23 @@ def parse_version_offset(path): # 8th Pass: Query strings # e.g. https://gitlab.cosma.dur.ac.uk/api/v4/projects/swift%2Fswiftsim/repository/archive.tar.gz?sha=v0.3.0 - (r'\?sha=[a-zA-Z+._-]*v?(\d[\da-zA-Z._-]*)$', suffix), - + # e.g. https://gitlab.kitware.com/api/v4/projects/icet%2Ficet/repository/archive.tar.bz2?sha=IceT-2.1.1 # e.g. http://gitlab.cosma.dur.ac.uk/swift/swiftsim/repository/archive.tar.gz?ref=v0.3.0 - (r'\?ref=[a-zA-Z+._-]*v?(\d[\da-zA-Z._-]*)$', suffix), - # e.g. http://apps.fz-juelich.de/jsc/sionlib/download.php?version=1.7.1 # e.g. https://software.broadinstitute.org/gatk/download/auth?package=GATK-archive&version=3.8-1-0-gf15c1c3ef - (r'[?&]version=v?(\d[\da-zA-Z._-]*)$', suffix), + (r'[?&](?:sha|ref|version)=[a-zA-Z\d+-]*[_-]?v?(\d[\da-zA-Z._-]*)$', suffix), # noqa: E501 # e.g. http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz # e.g. http://laws-green.lanl.gov/projects/data/eos/get_file.php?package=eospac&filename=eospac_v6.4.0beta.1_r20171213193219.tgz - (r'[?&]filename=[a-zA-Z\d+-]+[_-]v?(\d[\da-zA-Z.]*)', stem), - + # e.g. https://evtgen.hepforge.org/downloads?f=EvtGen-01.07.00.tar.gz # e.g. http://wwwpub.zih.tu-dresden.de/%7Emlieber/dcount/dcount.php?package=otf&get=OTF-1.12.5salmon.tar.gz - (r'&get=[a-zA-Z\d+-]+-v?(\d[\da-zA-Z.]*)$', stem), # noqa + (r'[?&](?:filename|f|get)=[a-zA-Z\d+-]+[_-]v?(\d[\da-zA-Z.]*)', stem), # 9th Pass: Version in path # github.com/repo/name/releases/download/vver/name # e.g. https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow - (r'github\.com/[^/]+/[^/]+/releases/download/[a-zA-Z+._-]*v?(\d[\da-zA-Z._-]*)/', path), # noqa + (r'github\.com/[^/]+/[^/]+/releases/download/[a-zA-Z+._-]*v?(\d[\da-zA-Z._-]*)/', path), # noqa: E501 # e.g. ftp://ftp.ncbi.nlm.nih.gov/blast/executables/legacy.NOTSUPPORTED/2.2.26/ncbi.tar.gz (r'(\d[\da-zA-Z._-]*)/[^/]+$', path), @@ -696,6 +692,10 @@ def parse_name_offset(path, v=None): # e.g. http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz (r'\?filename=([A-Za-z\d+-]+)$', stem), + # ?f=name-ver.ver + # e.g. https://evtgen.hepforge.org/downloads?f=EvtGen-01.07.00.tar.gz + (r'\?f=([A-Za-z\d+-]+)$', stem), + # ?package=name # e.g. http://wwwpub.zih.tu-dresden.de/%7Emlieber/dcount/dcount.php?package=otf&get=OTF-1.12.5salmon.tar.gz (r'\?package=([A-Za-z\d+-]+)', stem), From 5a7b555314c0e56377ee7292785b685624b30d90 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 3 Jun 2020 22:09:40 -0500 Subject: [PATCH 604/802] IPython: fix setuptools dependency (#16915) * IPython: fix setuptools dependency * Remove extra colon --- var/spack/repos/builtin/packages/py-ipython/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py index 8faa8ab3305..5d1710b00ec 100644 --- a/var/spack/repos/builtin/packages/py-ipython/package.py +++ b/var/spack/repos/builtin/packages/py-ipython/package.py @@ -19,8 +19,10 @@ class PyIpython(PythonPackage): version('3.1.0', sha256='532092d3f06f82b1d8d1e5c37097eae19fcf025f8f6a4b670dd49c3c338d5624') version('2.3.1', sha256='3e98466aa2fe54540bcba9aa6e01a39f40110d67668c297340c4b9514b7cc49c') - depends_on('python@2.7:2.8,3.3:', type=('build', 'run'), when='@:6') + depends_on('python@3.6:', type=('build', 'run'), when='@7.10:') depends_on('python@3.5:', type=('build', 'run'), when='@7:') + depends_on('python@3.3:', type=('build', 'run'), when='@6:') + depends_on('python@2.7:2.8,3.3:', type=('build', 'run')) depends_on('py-backports-shutil-get-terminal-size', type=('build', 'run'), when="^python@:3.2") depends_on('py-pathlib2', type=('build', 'run'), when="^python@:3.3") @@ -37,4 +39,4 @@ class PyIpython(PythonPackage): depends_on('py-appnope', type=('build', 'run'), when='platform=darwin') depends_on('py-jedi@0.10:', type=('build', 'run'), when='@7.5.0:') depends_on('py-backcall', type=('build', 'run'), when='@7.5.0:') - depends_on('py-setuptools@18.5:', type=('build', 'run'), when='@7.5.0:') + depends_on('py-setuptools@18.5:', type='run', when='@4.1:') From 61f61f3cdea3bef00ff0e6b5bf2bf59831ff630a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 3 Jun 2020 22:09:58 -0500 Subject: [PATCH 605/802] py-openpyxl: add 3.0.3 (#16940) --- var/spack/repos/builtin/packages/py-openpyxl/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-openpyxl/package.py b/var/spack/repos/builtin/packages/py-openpyxl/package.py index b8460028009..f929fe6a9bc 100644 --- a/var/spack/repos/builtin/packages/py-openpyxl/package.py +++ b/var/spack/repos/builtin/packages/py-openpyxl/package.py @@ -10,11 +10,15 @@ class PyOpenpyxl(PythonPackage): """A Python library to read/write Excel 2010 xlsx/xlsm files""" homepage = "http://openpyxl.readthedocs.org/" - url = "https://pypi.io/packages/source/o/openpyxl/openpyxl-2.4.5.tar.gz" + url = "https://pypi.io/packages/source/o/openpyxl/openpyxl-3.0.3.tar.gz" + version('3.0.3', sha256='547a9fc6aafcf44abe358b89ed4438d077e9d92e4f182c87e2dc294186dc4b64') version('2.4.5', sha256='78c331e819fb0a63a1339d452ba0b575d1a31f09fdcce793a31bec7e9ef4ef21') - depends_on('python@2.6:2.8,3.0:3.1,3.3:') + depends_on('python@3.6:', when='@3.0:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.5:', when='@2.6:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.4:', when='@2.5:', type=('build', 'run')) + depends_on('python@2.6:2.8,3.3:', when='@2.1:', type=('build', 'run')) depends_on('py-setuptools', type='build') From 6f6c243699f6f29629d809fa3861f8c1bb5bbeca Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Wed, 3 Jun 2020 23:11:44 -0400 Subject: [PATCH 606/802] mpfr: update hash for 4.0.2 patch (#16937) --- var/spack/repos/builtin/packages/mpfr/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mpfr/package.py b/var/spack/repos/builtin/packages/mpfr/package.py index b163d8a7244..fa97da76ed0 100644 --- a/var/spack/repos/builtin/packages/mpfr/package.py +++ b/var/spack/repos/builtin/packages/mpfr/package.py @@ -37,7 +37,7 @@ class Mpfr(AutotoolsPackage, GNUMirrorPackage): # Check the Bugs section of old release pages for patches. # https://www.mpfr.org/mpfr-X.Y.Z/#bugs patches = { - '4.0.2': '8f15fd27ab65341a60d724d594897d32f4597ddf642d0dc121995e2150181b0c', + '4.0.2': '3f80b836948aa96f8d1cb9cc7f3f55973f19285482a96f9a4e1623d460bcccf0', '4.0.1': '5230aab653fa8675fc05b5bdd3890e071e8df49a92a9d58c4284024affd27739', '3.1.6': '7a6dd71bcda4803d6b89612706a17b8816e1acd5dd9bf1bec29cf748f3b60008', '3.1.5': '1ae14fb3a54ae8e0faed20801970255b279eee9e5ac624891ab5d29727f0bc04', From 16e8e434c2cffa236f9f5d189423af4a81243d51 Mon Sep 17 00:00:00 2001 From: iarspider Date: Thu, 4 Jun 2020 05:15:01 +0200 Subject: [PATCH 607/802] Add pytest@5.3.4 (#16927) Dropping atomicwrites dependency: https://github.com/pytest-dev/pytest/issues/6147 --- var/spack/repos/builtin/packages/py-pytest/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-pytest/package.py b/var/spack/repos/builtin/packages/py-pytest/package.py index 85d01c240c0..b6d2c914c54 100644 --- a/var/spack/repos/builtin/packages/py-pytest/package.py +++ b/var/spack/repos/builtin/packages/py-pytest/package.py @@ -14,6 +14,7 @@ class PyPytest(PythonPackage): import_modules = ['pytest'] + version('5.3.4', sha256='1d122e8be54d1a709e56f82e2d85dcba3018313d64647f38a91aec88c239b600') version('5.2.1', sha256='ca563435f4941d0cb34767301c27bc65c510cb82e90b9ecf9cb52dc2c63caaa0') version('5.1.1', sha256='c3d5020755f70c82eceda3feaf556af9a341334414a8eca521a18f463bcead88') version('4.6.9', sha256='19e8f75eac01dd3f211edd465b39efbcbdc8fc5f7866d7dd49fedb30d8adf339') @@ -48,7 +49,7 @@ class PyPytest(PythonPackage): depends_on('py-attrs@17.4.0:', when='@3.5:', type=('build', 'run')) depends_on('py-more-itertools@4.0.0:', when='@3.5.1:', type=('build', 'run')) depends_on('py-more-itertools@4.0.0:6.0.0', when='@4.2.1:4.6.9 ^python@:2', type=('build', 'run')) - depends_on('py-atomicwrites@1.0:', when='@3.6:', type=('build', 'run')) + depends_on('py-atomicwrites@1.0:', when='@3.6:5.2.999', type=('build', 'run')) depends_on('py-pluggy@0.12:0.999', when='@4.6:', type=('build', 'run')) depends_on('py-pluggy@0.9.0:0.9.999,0.11:0.999', when='@4.5.0:4.5.999', type=('build', 'run')) depends_on('py-pluggy@0.11:', when='@4.4.2:4.4.999', type=('build', 'run')) From 02548c56fa77ed4ce62a0f8cf95b98966fcaebab Mon Sep 17 00:00:00 2001 From: Mathew Cleveland Date: Wed, 3 Jun 2020 21:16:46 -0600 Subject: [PATCH 608/802] + Add opppy-0_1_3 (#16926) + Update maintainers for OPPPY package + remove "run" requirement for setuptools and sphynx Co-authored-by: Cleveland --- var/spack/repos/builtin/packages/py-opppy/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-opppy/package.py b/var/spack/repos/builtin/packages/py-opppy/package.py index 6e512b12c66..81bcf6d5af4 100644 --- a/var/spack/repos/builtin/packages/py-opppy/package.py +++ b/var/spack/repos/builtin/packages/py-opppy/package.py @@ -14,15 +14,17 @@ class PyOpppy(PythonPackage): homepage = "https://github.com/lanl/opppy" url = "https://github.com/lanl/OPPPY/archive/opppy-0_1_2.tar.gz" git = "https://github.com/lanl/opppy.git" + maintainers = ['clevelam'] version('master', branch='master') + version('0_1_3', sha256='c3ca97f2ff8ab319b5c7257baa8cab852387dc00d426b4534c06f0894363c541') version('0_1_2', sha256='ef3795d3164fa0aa7ea7da7e223d6d0a48d2960aefd03a7d90cdb8b8f480cd4c') version('0_1_1', sha256='505c023853e75552abc65de9777a125ecb6a99a1cb4e605a4f702af837e3168b') - depends_on('py-setuptools', type=('build', 'run')) + depends_on('py-setuptools', type=('build')) + depends_on('py-sphinx', type=('build')) depends_on('py-numpy@1.6:', type=('build', 'run')) depends_on('python@3:', type=('build', 'run')) depends_on('py-argparse', type=('build', 'run'), when='^python@:2.6') depends_on('py-scipy', type=('build', 'run')) depends_on('py-matplotlib', type=('build', 'run')) - depends_on('py-sphinx', type=('build', 'run')) From 104a0c42594687c8753f372ae33985e4cc40e396 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Wed, 3 Jun 2020 23:25:09 -0400 Subject: [PATCH 609/802] Trilinos: add Stratimikos package (#16925) Stratimikos is an optional dependency for our project. It depends on Thyra, and thyra has subpackages that should be enabled based on tpetra/epetra/epetraext. --- var/spack/repos/builtin/packages/trilinos/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 3626f328c87..5e8a96a16aa 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -179,6 +179,8 @@ class Trilinos(CMakePackage): description='Compile with Shards') variant('shylu', default=False, description='Compile with ShyLU') + variant('stratimikos', default=False, + description='Compile with Stratimikos') variant('teko', default=False, description='Compile with Teko') variant('tempus', default=False, @@ -468,6 +470,7 @@ def define_tpl_enable(cmake_var, spec_var=None): define_trilinos_enable('Shards'), define_trilinos_enable('ShyLU'), define_trilinos_enable('STK'), + define_trilinos_enable('Stratimikos'), define_trilinos_enable('Teko'), define_trilinos_enable('Tempus'), define_trilinos_enable('Teuchos'), @@ -513,6 +516,12 @@ def define_tpl_enable(cmake_var, spec_var=None): define('Trilinos_ENABLE_SEACASNemslice', False) ]) + if '+stratimikos' in spec: + # Add thyra adapters based on package enables + options.extend( + define_trilinos_enable('Thyra' + pkg + 'Adapters', pkg.lower()) + for pkg in ['Epetra', 'EpetraExt', 'Tpetra']) + # ######################### TPLs ############################# blas = spec['blas'].libs From 6f4631ee4812ce2e5d3731b20aa0d9e0f7f89b31 Mon Sep 17 00:00:00 2001 From: iarspider Date: Thu, 4 Jun 2020 05:25:38 +0200 Subject: [PATCH 610/802] Add py-jupyter-core@4.6.1 (#16922) --- var/spack/repos/builtin/packages/py-jupyter-core/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-jupyter-core/package.py b/var/spack/repos/builtin/packages/py-jupyter-core/package.py index 9fb84e40cb9..3bb21a4b546 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-core/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-core/package.py @@ -13,6 +13,7 @@ class PyJupyterCore(PythonPackage): url = "https://pypi.io/packages/source/j/jupyter-core/jupyter_core-4.6.0.tar.gz" version('4.6.3', sha256='394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e') + version('4.6.1', sha256='a183e0ec2e8f6adddf62b0a3fc6a2237e3e0056d381e536d3e7c7ecc3067e244') version('4.6.0', sha256='85103cee6548992780912c1a0a9ec2583a4a18f1ef79a248ec0db4446500bce3') version('4.4.0', sha256='ba70754aa680300306c699790128f6fbd8c306ee5927976cbe48adacf240c0b7') version('4.2.0', sha256='44ec837a53bebf4e937112d3f9ccf31fee4f8db3e406dd0dd4f0378a354bed9c') From ad50a0218863d958022186a04e6e3a1402b3e9fb Mon Sep 17 00:00:00 2001 From: iarspider Date: Thu, 4 Jun 2020 05:26:13 +0200 Subject: [PATCH 611/802] Add matplotlib 3.1.0 (#16921) --- var/spack/repos/builtin/packages/py-matplotlib/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 4e5dbf91356..9b9b77f00a2 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -32,6 +32,7 @@ class PyMatplotlib(PythonPackage): version('3.1.3', sha256='db3121f12fb9b99f105d1413aebaeb3d943f269f3d262b45586d12765866f0c6') version('3.1.2', sha256='8e8e2c2fe3d873108735c6ee9884e6f36f467df4a143136209cff303b183bada') version('3.1.1', sha256='1febd22afe1489b13c6749ea059d392c03261b2950d1d45c17e3aed812080c93') + version('3.1.0', sha256='1e0213f87cc0076f7b0c4c251d7e23601e2419cd98691df79edb95517ba06f0c') version('3.0.2', sha256='c94b792af431f6adb6859eb218137acd9a35f4f7442cea57e4a59c54751c36af') version('3.0.0', sha256='b4e2333c98a7c2c1ff6eb930cd2b57d4b818de5437c5048802096b32f66e65f9') version('2.2.5', sha256='a3037a840cd9dfdc2df9fee8af8f76ca82bfab173c0f9468193ca7a89a2b60ea') From 0dd1d1f21a1ead55ab163207530ab403c34c11ee Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 4 Jun 2020 08:05:22 -0500 Subject: [PATCH 612/802] NumPy: add 1.18.5 (#16943) --- var/spack/repos/builtin/packages/py-numpy/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index dbbfc815410..4659a449ebf 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -16,7 +16,7 @@ class PyNumpy(PythonPackage): number capabilities""" homepage = "https://numpy.org/" - url = "https://pypi.io/packages/source/n/numpy/numpy-1.18.4.zip" + url = "https://pypi.io/packages/source/n/numpy/numpy-1.18.5.zip" git = "https://github.com/numpy/numpy.git" maintainers = ['adamjstewart'] @@ -30,6 +30,7 @@ class PyNumpy(PythonPackage): ] version('master', branch='master') + version('1.18.5', sha256='34e96e9dae65c4839bd80012023aadd6ee2ccb73ce7fdf3074c62f301e63120b') version('1.18.4', sha256='bbcc85aaf4cd84ba057decaead058f43191cc0e30d6bc5d44fe336dc3d3f4509') version('1.18.3', sha256='e46e2384209c91996d5ec16744234d1c906ab79a701ce1a26155c9ec890b8dc8') version('1.18.2', sha256='e7894793e6e8540dbeac77c87b489e331947813511108ae097f1715c018b8f3d') From 7617054a5d50633930b0e08f3208b81f55b35dee Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 4 Jun 2020 08:05:48 -0500 Subject: [PATCH 613/802] Fix obsolete references to wx package (#16944) --- var/spack/repos/builtin/packages/paraver/package.py | 2 +- var/spack/repos/builtin/packages/wxpropgrid/package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/paraver/package.py b/var/spack/repos/builtin/packages/paraver/package.py index fe9e31b2f20..fe305fc07ef 100644 --- a/var/spack/repos/builtin/packages/paraver/package.py +++ b/var/spack/repos/builtin/packages/paraver/package.py @@ -51,6 +51,6 @@ def install(self, spec, prefix): "--with-paraver=%s" % prefix, "--with-boost=%s" % spec['boost'].prefix, "--with-boost-serialization=boost_serialization", - "--with-wxdir=%s" % spec['wx'].prefix.bin) + "--with-wxdir=%s" % spec['wxwidgets'].prefix.bin) make() make("install") diff --git a/var/spack/repos/builtin/packages/wxpropgrid/package.py b/var/spack/repos/builtin/packages/wxpropgrid/package.py index 644af132217..c288d0d5338 100644 --- a/var/spack/repos/builtin/packages/wxpropgrid/package.py +++ b/var/spack/repos/builtin/packages/wxpropgrid/package.py @@ -20,7 +20,7 @@ class Wxpropgrid(Package, SourceforgePackage): def install(self, spec, prefix): configure("--prefix=%s" % prefix, "--with-wxdir=%s" % - spec['wx'].prefix.bin, "--enable-unicode") + spec['wxwidgets'].prefix.bin, "--enable-unicode") make() make("install") From b64ec7fba4c512f6abcfc51b7b2c5c92907bbeda Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Thu, 4 Jun 2020 06:58:33 -0700 Subject: [PATCH 614/802] pass hwloc to configure via useropt; use lib/ or lib64/ as appropriate for libunwind (#16941) --- .../repos/builtin/packages/tau/package.py | 3 ++ .../repos/builtin/packages/tau/unwind.patch | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 var/spack/repos/builtin/packages/tau/unwind.patch diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py index 5a4d704c430..1d2dea580b7 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -107,6 +107,8 @@ class Tau(Package): conflicts('+adios2', when='@:2.29.1') conflicts('+sqlite', when='@:2.29.1') + patch('unwind.patch', when="@2.29") + def set_compiler_options(self, spec): useropt = ["-O2 -g", self.rpath_args] @@ -144,6 +146,7 @@ def set_compiler_options(self, spec): def setup_build_environment(self, env): env.prepend_path('LIBRARY_PATH', self.spec['zlib'].prefix.lib) + env.prepend_path('LIBRARY_PATH', self.spec['hwloc'].prefix.lib) def install(self, spec, prefix): # TAU isn't happy with directories that have '@' in the path. Sigh. diff --git a/var/spack/repos/builtin/packages/tau/unwind.patch b/var/spack/repos/builtin/packages/tau/unwind.patch new file mode 100644 index 00000000000..1d9faa4cc6b --- /dev/null +++ b/var/spack/repos/builtin/packages/tau/unwind.patch @@ -0,0 +1,34 @@ +From 3b60cbcab167f8f1cf450f0319850bfa88f39d3a Mon Sep 17 00:00:00 2001 +From: eugeneswalker +Date: Thu, 4 Jun 2020 06:12:41 -0700 +Subject: [PATCH] check for unwind_dir/lib and unwind_dir/lib64 + +--- + configure | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 3bd7430..b673cdf 100755 +--- a/configure ++++ b/configure +@@ -1662,8 +1662,15 @@ for arg in "$@"; do + -unwind=*) + unwind_dir=`echo $arg | sed -e 's/-unwind=//'` + if [ $unwind_dir != "/usr" ]; then +- unwind_inc="$unwind_dir/include" +- unwind_lib="$unwind_dir/lib" ++ unwind_inc="$unwind_dir/include" ++ unwind_lib="" ++ if [[ -d "$unwind_dir/lib" ]] ; then ++ unwind_lib="$unwind_dir/lib" ++ elif [[ -d "$unwind_dir/lib64" ]] ; then ++ unwind_lib="$unwind_dir/lib64" ++ else ++ exit 1 ++ fi + fi + # So that the user doesn't have to specify the unwinder, + # use libunwind as the default. +-- +2.24.2 (Apple Git-127) + From 44ec8cc4e44b9d10be99c28ccb03aea88d8274e7 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Thu, 4 Jun 2020 09:16:11 -0700 Subject: [PATCH 615/802] sz: patch in ctag optionality from robertu94/sz 3637a87f986c (#16953) --- .../packages/sz/ctags-only-if-requested.patch | 42 +++++++++++++++++++ .../repos/builtin/packages/sz/package.py | 2 + 2 files changed, 44 insertions(+) create mode 100644 var/spack/repos/builtin/packages/sz/ctags-only-if-requested.patch diff --git a/var/spack/repos/builtin/packages/sz/ctags-only-if-requested.patch b/var/spack/repos/builtin/packages/sz/ctags-only-if-requested.patch new file mode 100644 index 00000000000..0b3494f11e1 --- /dev/null +++ b/var/spack/repos/builtin/packages/sz/ctags-only-if-requested.patch @@ -0,0 +1,42 @@ +From 3637a87f986cb64ddc1bde3551e29894ab18500b Mon Sep 17 00:00:00 2001 +From: Robert Underwood +Date: Wed, 3 Jun 2020 12:48:33 -0400 +Subject: [PATCH] Don't require ctags unless we ask for it + +Previously this caused build failures if the user had a bad version of +ctags. Don't build with it. +--- + CMakeLists.txt | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4fd4014..d764a44 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,13 +36,16 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + + #generate tags for the project if tags exist +-find_program(TAGS ctags) +-if(TAGS) +- add_custom_target(tags ALL +- COMMAND ${TAGS} --exclude=${CMAKE_BINARY_DIR} -f ${CMAKE_BINARY_DIR}/tags --c++-kinds=+p --fields=+iaS -R +- COMMENT Generating Tag files +- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +- ) ++option(BUILD_CTAGS "enable ctags generation target" OFF) ++if(BUILD_CTAGS) ++ find_program(TAGS ctags) ++ if(TAGS) ++ add_custom_target(tags ALL ++ COMMAND ${TAGS} --exclude=${CMAKE_BINARY_DIR} -f ${CMAKE_BINARY_DIR}/tags --c++-kinds=+p --fields=+iaS -R ++ COMMENT Generating Tag files ++ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ++ ) ++ endif() + endif() + + option(BUILD_SHARED_LIBS "build shared libraries over static libraries" ON) +-- +2.24.2 (Apple Git-127) + diff --git a/var/spack/repos/builtin/packages/sz/package.py b/var/spack/repos/builtin/packages/sz/package.py index b0d92dd51c5..897aa57a1c7 100644 --- a/var/spack/repos/builtin/packages/sz/package.py +++ b/var/spack/repos/builtin/packages/sz/package.py @@ -54,6 +54,8 @@ class Sz(CMakePackage): depends_on('hdf5', when="+hdf5") depends_on('netcdf-c', when="+netcdf") + patch('ctags-only-if-requested.patch', when='@2.1.8.1:2.1.8.3') + @property def build_directory(self): """autotools needs a different build directory to work""" From 0a3601a3f1bced90a8572cf64360b8645775281c Mon Sep 17 00:00:00 2001 From: Andrew Gaspar Date: Thu, 4 Jun 2020 15:34:19 -0600 Subject: [PATCH 616/802] libgit2 v1.0.1 (#16952) --- var/spack/repos/builtin/packages/libgit2/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libgit2/package.py b/var/spack/repos/builtin/packages/libgit2/package.py index 6fe9022179a..dd5d55fb6f4 100644 --- a/var/spack/repos/builtin/packages/libgit2/package.py +++ b/var/spack/repos/builtin/packages/libgit2/package.py @@ -18,6 +18,7 @@ class Libgit2(CMakePackage): maintainers = ["AndrewGaspar"] + version('1.0.1', sha256='1775427a6098f441ddbaa5bd4e9b8a043c7401e450ed761e69a415530fea81d2') version('1.0.0', sha256='6a1fa16a7f6335ce8b2630fbdbb5e57c4027929ebc56fcd1ac55edb141b409b4') version('0.99.0', sha256='174024310c1563097a6613a0d3f7539d11a9a86517cd67ce533849065de08a11') version('0.28.5', sha256='2b7b68aee6f123bc84cc502a9c12738435b8054e7d628962e091cd2a25be4f42') From 0d43e41da00d011fda7c17dc4d88b16e9deaebb9 Mon Sep 17 00:00:00 2001 From: Andrew Gaspar Date: Thu, 4 Jun 2020 15:59:14 -0600 Subject: [PATCH 617/802] Rust v1.44.0 (#16957) * libgit2 v1.0.1 * Rust 1.44.0 * Fix flake8 --- .../repos/builtin/packages/rust/package.py | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py index 3e89f9b974d..ff8cba54e63 100644 --- a/var/spack/repos/builtin/packages/rust/package.py +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -85,6 +85,7 @@ class Rust(Package): # The `x.py` bootstrapping script did not exist prior to Rust 1.17. It # would be possible to support both, but for simplicitly, we only support # Rust 1.17 and newer + version('1.44.0', sha256='bf2df62317e533e84167c5bc7d4351a99fdab1f9cd6e6ba09f51996ad8561100') version('1.43.1', sha256='cde177b4a8c687da96f20de27630a1eb55c9d146a15e4c900d5c31cd3c3ac41d') version('1.43.0', sha256='75f6ac6c9da9f897f4634d5a07be4084692f7ccc2d2bb89337be86cfc18453a1') version('1.42.0', sha256='d2e8f931d16a0539faaaacd801e0d92c58df190269014b2360c6ab2a90ee3475') @@ -126,6 +127,12 @@ class Rust(Package): # This dictionary contains a version: hash dictionary for each supported # Rust target. rust_releases = { + '1.44.0': { + 'x86_64-unknown-linux-gnu': 'eaa34271b4ac4d2c281831117d4d335eed0b37fe7a34477d9855a6f1d930a624', + 'powerpc64le-unknown-linux-gnu': '97038ea935c7a5b21f5aaaaad409c514e2b2ae8ea55994ba39645f453e98bc9f', + 'aarch64-unknown-linux-gnu': 'bcc916003cb9c7ff44f5f9af348020b422dbc5bd4fe49bdbda2de6ce0a1bb745', + 'x86_64-apple-darwin': 'f20388b80b2b0a8b122d89058f785a2cf3b14e93bcac53471d60fdb4106ffa35' + }, '1.43.1': { 'x86_64-unknown-linux-gnu': '25cd71b95bba0daef56bad8c943a87368c4185b90983f4412f46e3e2418c0505', 'powerpc64le-unknown-linux-gnu': '1670f00b00cc1bed38d523a25dba7420de3c06986c15a0248e06299f80ce6124', @@ -370,11 +377,11 @@ class Rust(Package): sha256='0000000000000000000000000000000000000000000000000000000000000000', destination='spack_bootstrap_stage', when='@{version} platform={platform} target={target}'\ - .format( - version=prerelease_version, - platform=rust_arch['platform'], - target=rust_arch['target'] - ) + .format( + version=prerelease_version, + platform=rust_arch['platform'], + target=rust_arch['target'] + ) ) # This loop generates resources for each binary distribution, and maps @@ -401,11 +408,11 @@ class Rust(Package): sha256=rust_sha256, destination='spack_bootstrap_stage', when='@{version} platform={platform} target={target}'\ - .format( - version=rust_version, - platform=rust_arch['platform'], - target=rust_arch['target'] - ) + .format( + version=rust_version, + platform=rust_arch['platform'], + target=rust_arch['target'] + ) ) # This routine returns the target architecture we intend to build for. From 92e24950e5cbe28a3b241b13e2dc5363c7b994d7 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Thu, 4 Jun 2020 22:49:46 -0700 Subject: [PATCH 618/802] add erlang version 23.0 (#16961) --- var/spack/repos/builtin/packages/erlang/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/erlang/package.py b/var/spack/repos/builtin/packages/erlang/package.py index 1101bee787d..f1fc027ae09 100644 --- a/var/spack/repos/builtin/packages/erlang/package.py +++ b/var/spack/repos/builtin/packages/erlang/package.py @@ -16,6 +16,7 @@ class Erlang(AutotoolsPackage): homepage = "https://erlang.org/" url = "https://erlang.org/download/otp_src_22.2.tar.gz" + version('23.0', sha256='42dcf3c721f4de59fe74ae7b65950c2174c46dc8d1dd4e27c0594d86f606a635') version('22.2', sha256='89c2480cdac566065577c82704a48e10f89cf2e6ca5ab99e1cf80027784c678f') version('22.1', sha256='cd33a102cbac6dd1c7b1e7a9a0d82d13587771fac4e96e8fff92e403d15e32c8') version('22.0', sha256='042e168d74055a501c75911694758a30597446accd8c82ec569552b9e9fcd272') From 5b272e3ff3f7cac83d4e3db402781f535950d26f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 5 Jun 2020 09:08:32 +0200 Subject: [PATCH 619/802] commands: use a single ThreadPool for `spack versions` (#16749) This fixes a fork bomb in `spack versions`. Recursive generation of pools to scrape URLs in `_spider` was creating large numbers of processes. Instead of recursively creating process pools, we now use a single `ThreadPool` with a concurrency limit. More on the issue: having ~10 users running at the same time spack versions on front-end nodes caused kernel lockup due to the high number of sockets opened (sys-admin reports ~210k distributed over 3 nodes). Users were internal, so they had ulimit -n set to ~70k. The forking behavior could be observed by just running: $ spack versions boost and checking the number of processes spawned. Number of processes per se was not the issue, but each one of them opens a socket which can stress `iptables`. In the original issue the kernel watchdog was reporting: Message from syslogd@login03 at May 19 12:01:30 ... kernel:Watchdog CPU:110 Hard LOCKUP Message from syslogd@login03 at May 19 12:01:31 ... kernel:watchdog: BUG: soft lockup - CPU#110 stuck for 23s! [python3:2756] Message from syslogd@login03 at May 19 12:01:31 ... kernel:watchdog: BUG: soft lockup - CPU#94 stuck for 22s! [iptables:5603] --- lib/spack/spack/cmd/versions.py | 6 +- lib/spack/spack/package.py | 5 +- lib/spack/spack/test/web.py | 182 +++++++++----------- lib/spack/spack/util/web.py | 264 +++++++++++++++--------------- share/spack/spack-completion.bash | 2 +- 5 files changed, 218 insertions(+), 241 deletions(-) diff --git a/lib/spack/spack/cmd/versions.py b/lib/spack/spack/cmd/versions.py index 723f89ce08e..366307f0b2c 100644 --- a/lib/spack/spack/cmd/versions.py +++ b/lib/spack/spack/cmd/versions.py @@ -21,6 +21,10 @@ def setup_parser(subparser): subparser.add_argument('-s', '--safe-only', action='store_true', help='only list safe versions of the package') + subparser.add_argument( + '-c', '--concurrency', default=32, type=int, + help='number of concurrent requests' + ) arguments.add_common_arguments(subparser, ['package']) @@ -45,7 +49,7 @@ def versions(parser, args): if sys.stdout.isatty(): tty.msg('Remote versions (not yet checksummed):') - fetched_versions = pkg.fetch_remote_versions() + fetched_versions = pkg.fetch_remote_versions(args.concurrency) remote_versions = set(fetched_versions).difference(safe_versions) if not remote_versions: diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index bb5ea41dc3e..c9774c5b29b 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -2020,7 +2020,7 @@ def all_urls(self): urls.append(args['url']) return urls - def fetch_remote_versions(self): + def fetch_remote_versions(self, concurrency=128): """Find remote versions of this package. Uses ``list_url`` and any other URLs listed in the package file. @@ -2033,7 +2033,8 @@ def fetch_remote_versions(self): try: return spack.util.web.find_versions_of_archive( - self.all_urls, self.list_url, self.list_depth) + self.all_urls, self.list_url, self.list_depth, concurrency + ) except spack.util.web.NoNetworkConnectionError as e: tty.die("Package.fetch_versions couldn't connect to:", e.url, e.message) diff --git a/lib/spack/spack/test/web.py b/lib/spack/spack/test/web.py index ae62301319b..dfca41c95bb 100644 --- a/lib/spack/spack/test/web.py +++ b/lib/spack/spack/test/web.py @@ -2,125 +2,101 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - -"""Tests for web.py.""" import os + +import ordereddict_backport import pytest - -from ordereddict_backport import OrderedDict - import spack.paths -import spack.util.web as web_util +import spack.util.web from spack.version import ver -web_data_path = os.path.join(spack.paths.test_path, 'data', 'web') - -root = 'file://' + web_data_path + '/index.html' -root_tarball = 'file://' + web_data_path + '/foo-0.0.0.tar.gz' - -page_1 = 'file://' + os.path.join(web_data_path, '1.html') -page_2 = 'file://' + os.path.join(web_data_path, '2.html') -page_3 = 'file://' + os.path.join(web_data_path, '3.html') -page_4 = 'file://' + os.path.join(web_data_path, '4.html') +def _create_url(relative_url): + web_data_path = os.path.join(spack.paths.test_path, 'data', 'web') + return 'file://' + os.path.join(web_data_path, relative_url) -def test_spider_0(): - pages, links = web_util.spider(root, depth=0) - - assert root in pages - assert page_1 not in pages - assert page_2 not in pages - assert page_3 not in pages - assert page_4 not in pages - - assert "This is the root page." in pages[root] - - assert root not in links - assert page_1 in links - assert page_2 not in links - assert page_3 not in links - assert page_4 not in links +root = _create_url('index.html') +root_tarball = _create_url('foo-0.0.0.tar.gz') +page_1 = _create_url('1.html') +page_2 = _create_url('2.html') +page_3 = _create_url('3.html') +page_4 = _create_url('4.html') -def test_spider_1(): - pages, links = web_util.spider(root, depth=1) +@pytest.mark.parametrize( + 'depth,expected_found,expected_not_found,expected_text', [ + (0, + {'pages': [root], 'links': [page_1]}, + {'pages': [page_1, page_2, page_3, page_4], + 'links': [root, page_2, page_3, page_4]}, + {root: "This is the root page."}), + (1, + {'pages': [root, page_1], 'links': [page_1, page_2]}, + {'pages': [page_2, page_3, page_4], + 'links': [root, page_3, page_4]}, + {root: "This is the root page.", + page_1: "This is page 1."}), + (2, + {'pages': [root, page_1, page_2], + 'links': [page_1, page_2, page_3, page_4]}, + {'pages': [page_3, page_4], 'links': [root]}, + {root: "This is the root page.", + page_1: "This is page 1.", + page_2: "This is page 2."}), + (3, + {'pages': [root, page_1, page_2, page_3, page_4], + 'links': [root, page_1, page_2, page_3, page_4]}, + {'pages': [], 'links': []}, + {root: "This is the root page.", + page_1: "This is page 1.", + page_2: "This is page 2.", + page_3: "This is page 3.", + page_4: "This is page 4."}), + ]) +def test_spider(depth, expected_found, expected_not_found, expected_text): + pages, links = spack.util.web.spider(root, depth=depth) - assert root in pages - assert page_1 in pages - assert page_2 not in pages - assert page_3 not in pages - assert page_4 not in pages + for page in expected_found['pages']: + assert page in pages - assert "This is the root page." in pages[root] - assert "This is page 1." in pages[page_1] + for page in expected_not_found['pages']: + assert page not in pages - assert root not in links - assert page_1 in links - assert page_2 in links - assert page_3 not in links - assert page_4 not in links + for link in expected_found['links']: + assert link in links + + for link in expected_not_found['links']: + assert link not in links + + for page, text in expected_text.items(): + assert text in pages[page] -def test_spider_2(): - pages, links = web_util.spider(root, depth=2) - - assert root in pages - assert page_1 in pages - assert page_2 in pages - assert page_3 not in pages - assert page_4 not in pages - - assert "This is the root page." in pages[root] - assert "This is page 1." in pages[page_1] - assert "This is page 2." in pages[page_2] - - assert root not in links - assert page_1 in links - assert page_1 in links - assert page_2 in links - assert page_3 in links - assert page_4 in links - - -def test_spider_3(): - pages, links = web_util.spider(root, depth=3) - - assert root in pages - assert page_1 in pages - assert page_2 in pages - assert page_3 in pages - assert page_4 in pages - - assert "This is the root page." in pages[root] - assert "This is page 1." in pages[page_1] - assert "This is page 2." in pages[page_2] - assert "This is page 3." in pages[page_3] - assert "This is page 4." in pages[page_4] - - assert root in links # circular link on page 3 - assert page_1 in links - assert page_1 in links - assert page_2 in links - assert page_3 in links - assert page_4 in links +def test_spider_no_response(monkeypatch): + # Mock the absence of a response + monkeypatch.setattr( + spack.util.web, 'read_from_url', lambda x, y: (None, None, None) + ) + pages, links = spack.util.web.spider(root, depth=0) + assert not pages and not links def test_find_versions_of_archive_0(): - versions = web_util.find_versions_of_archive( + versions = spack.util.web.find_versions_of_archive( root_tarball, root, list_depth=0) assert ver('0.0.0') in versions def test_find_versions_of_archive_1(): - versions = web_util.find_versions_of_archive( + versions = spack.util.web.find_versions_of_archive( root_tarball, root, list_depth=1) assert ver('0.0.0') in versions assert ver('1.0.0') in versions def test_find_versions_of_archive_2(): - versions = web_util.find_versions_of_archive( + versions = spack.util.web.find_versions_of_archive( root_tarball, root, list_depth=2) assert ver('0.0.0') in versions assert ver('1.0.0') in versions @@ -128,14 +104,14 @@ def test_find_versions_of_archive_2(): def test_find_exotic_versions_of_archive_2(): - versions = web_util.find_versions_of_archive( + versions = spack.util.web.find_versions_of_archive( root_tarball, root, list_depth=2) # up for grabs to make this better. assert ver('2.0.0b2') in versions def test_find_versions_of_archive_3(): - versions = web_util.find_versions_of_archive( + versions = spack.util.web.find_versions_of_archive( root_tarball, root, list_depth=3) assert ver('0.0.0') in versions assert ver('1.0.0') in versions @@ -145,7 +121,7 @@ def test_find_versions_of_archive_3(): def test_find_exotic_versions_of_archive_3(): - versions = web_util.find_versions_of_archive( + versions = spack.util.web.find_versions_of_archive( root_tarball, root, list_depth=3) assert ver('2.0.0b2') in versions assert ver('3.0a1') in versions @@ -159,35 +135,35 @@ def test_get_header(): # looking up headers should just work like a plain dict # lookup when there is an entry with the right key - assert(web_util.get_header(headers, 'Content-type') == 'text/plain') + assert(spack.util.web.get_header(headers, 'Content-type') == 'text/plain') # looking up headers should still work if there is a fuzzy match - assert(web_util.get_header(headers, 'contentType') == 'text/plain') + assert(spack.util.web.get_header(headers, 'contentType') == 'text/plain') # ...unless there is an exact match for the "fuzzy" spelling. headers['contentType'] = 'text/html' - assert(web_util.get_header(headers, 'contentType') == 'text/html') + assert(spack.util.web.get_header(headers, 'contentType') == 'text/html') # If lookup has to fallback to fuzzy matching and there are more than one # fuzzy match, the result depends on the internal ordering of the given # mapping - headers = OrderedDict() + headers = ordereddict_backport.OrderedDict() headers['Content-type'] = 'text/plain' headers['contentType'] = 'text/html' - assert(web_util.get_header(headers, 'CONTENT_TYPE') == 'text/plain') + assert(spack.util.web.get_header(headers, 'CONTENT_TYPE') == 'text/plain') del headers['Content-type'] - assert(web_util.get_header(headers, 'CONTENT_TYPE') == 'text/html') + assert(spack.util.web.get_header(headers, 'CONTENT_TYPE') == 'text/html') # Same as above, but different ordering - headers = OrderedDict() + headers = ordereddict_backport.OrderedDict() headers['contentType'] = 'text/html' headers['Content-type'] = 'text/plain' - assert(web_util.get_header(headers, 'CONTENT_TYPE') == 'text/html') + assert(spack.util.web.get_header(headers, 'CONTENT_TYPE') == 'text/html') del headers['contentType'] - assert(web_util.get_header(headers, 'CONTENT_TYPE') == 'text/plain') + assert(spack.util.web.get_header(headers, 'CONTENT_TYPE') == 'text/plain') # If there isn't even a fuzzy match, raise KeyError with pytest.raises(KeyError): - web_util.get_header(headers, 'ContentLength') + spack.util.web.get_header(headers, 'ContentLength') diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index 8039dc5fdaf..3f71dd1f719 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -7,17 +7,18 @@ import codecs import errno -import re +import multiprocessing.pool import os import os.path +import re import shutil import ssl import sys import traceback -from six.moves.urllib.request import urlopen, Request +import six from six.moves.urllib.error import URLError -import multiprocessing.pool +from six.moves.urllib.request import urlopen, Request try: # Python 2 had these in the HTMLParser package. @@ -63,34 +64,6 @@ def handle_starttag(self, tag, attrs): self.links.append(val) -class NonDaemonProcess(multiprocessing.Process): - """Process that allows sub-processes, so pools can have sub-pools.""" - @property - def daemon(self): - return False - - @daemon.setter - def daemon(self, value): - pass - - -if sys.version_info[0] < 3: - class NonDaemonPool(multiprocessing.pool.Pool): - """Pool that uses non-daemon processes""" - Process = NonDaemonProcess -else: - - class NonDaemonContext(type(multiprocessing.get_context())): # novm - Process = NonDaemonProcess - - class NonDaemonPool(multiprocessing.pool.Pool): - """Pool that uses non-daemon processes""" - - def __init__(self, *args, **kwargs): - kwargs['context'] = NonDaemonContext() - super(NonDaemonPool, self).__init__(*args, **kwargs) - - def uses_ssl(parsed_url): if parsed_url.scheme == 'https': return True @@ -336,109 +309,152 @@ def list_url(url): for key in _iter_s3_prefix(s3, url))) -def _spider(url, visited, root, depth, max_depth, raise_on_error): - """Fetches URL and any pages it links to up to max_depth. +def spider(root_urls, depth=0, concurrency=32): + """Get web pages from root URLs. - depth should initially be zero, and max_depth is the max depth of - links to follow from the root. + If depth is specified (e.g., depth=2), then this will also follow + up to levels of links from each root. - Prints out a warning only if the root can't be fetched; it ignores - errors with pages that the root links to. + Args: + root_urls (str or list of str): root urls used as a starting point + for spidering + depth (int): level of recursion into links + concurrency (int): number of simultaneous requests that can be sent - Returns a tuple of: - - pages: dict of pages visited (URL) mapped to their full text. - - links: set of links encountered while visiting the pages. + Returns: + A dict of pages visited (URL) mapped to their full text and the + set of visited links. """ - pages = {} # dict from page URL -> text content. - links = set() # set of all links seen on visited pages. + # Cache of visited links, meant to be captured by the closure below + _visited = set() - try: - response_url, _, response = read_from_url(url, 'text/html') - if not response_url or not response: - return pages, links + def _spider(url, collect_nested): + """Fetches URL and any pages it links to. - page = codecs.getreader('utf-8')(response).read() - pages[response_url] = page + Prints out a warning only if the root can't be fetched; it ignores + errors with pages that the root links to. - # Parse out the links in the page - link_parser = LinkParser() + Args: + url (str): url being fetched and searched for links + collect_nested (bool): whether we want to collect arguments + for nested spidering on the links found in this url + + Returns: + A tuple of: + - pages: dict of pages visited (URL) mapped to their full text. + - links: set of links encountered while visiting the pages. + - spider_args: argument for subsequent call to spider + """ + pages = {} # dict from page URL -> text content. + links = set() # set of all links seen on visited pages. subcalls = [] - link_parser.feed(page) - while link_parser.links: - raw_link = link_parser.links.pop() - abs_link = url_util.join( - response_url, - raw_link.strip(), - resolve_href=True) - links.add(abs_link) + try: + response_url, _, response = read_from_url(url, 'text/html') + if not response_url or not response: + return pages, links, subcalls - # Skip stuff that looks like an archive - if any(raw_link.endswith(suf) for suf in ALLOWED_ARCHIVE_TYPES): - continue + page = codecs.getreader('utf-8')(response).read() + pages[response_url] = page - # Skip things outside the root directory - if not abs_link.startswith(root): - continue + # Parse out the links in the page + link_parser = LinkParser() + link_parser.feed(page) - # Skip already-visited links - if abs_link in visited: - continue + while link_parser.links: + raw_link = link_parser.links.pop() + abs_link = url_util.join( + response_url, + raw_link.strip(), + resolve_href=True) + links.add(abs_link) - # If we're not at max depth, follow links. - if depth < max_depth: - subcalls.append((abs_link, visited, root, - depth + 1, max_depth, raise_on_error)) - visited.add(abs_link) + # Skip stuff that looks like an archive + if any(raw_link.endswith(s) for s in ALLOWED_ARCHIVE_TYPES): + continue - if subcalls: - pool = NonDaemonPool(processes=len(subcalls)) - try: - results = pool.map(_spider_wrapper, subcalls) + # Skip already-visited links + if abs_link in _visited: + continue - for sub_pages, sub_links in results: - pages.update(sub_pages) - links.update(sub_links) + # If we're not at max depth, follow links. + if collect_nested: + subcalls.append((abs_link,)) + _visited.add(abs_link) - finally: - pool.terminate() - pool.join() + except URLError as e: + tty.debug(str(e)) - except URLError as e: - tty.debug(e) + if hasattr(e, 'reason') and isinstance(e.reason, ssl.SSLError): + tty.warn("Spack was unable to fetch url list due to a " + "certificate verification problem. You can try " + "running spack -k, which will not check SSL " + "certificates. Use this at your own risk.") - if hasattr(e, 'reason') and isinstance(e.reason, ssl.SSLError): - tty.warn("Spack was unable to fetch url list due to a certificate " - "verification problem. You can try running spack -k, " - "which will not check SSL certificates. Use this at your " - "own risk.") + except HTMLParseError as e: + # This error indicates that Python's HTML parser sucks. + msg = "Got an error parsing HTML." - if raise_on_error: - raise NoNetworkConnectionError(str(e), url) + # Pre-2.7.3 Pythons in particular have rather prickly HTML parsing. + if sys.version_info[:3] < (2, 7, 3): + msg += " Use Python 2.7.3 or newer for better HTML parsing." - except HTMLParseError as e: - # This error indicates that Python's HTML parser sucks. - msg = "Got an error parsing HTML." + tty.warn(msg, url, "HTMLParseError: " + str(e)) - # Pre-2.7.3 Pythons in particular have rather prickly HTML parsing. - if sys.version_info[:3] < (2, 7, 3): - msg += " Use Python 2.7.3 or newer for better HTML parsing." + except Exception as e: + # Other types of errors are completely ignored, + # except in debug mode + tty.debug("Error in _spider: %s:%s" % (type(e), str(e)), + traceback.format_exc()) - tty.warn(msg, url, "HTMLParseError: " + str(e)) + finally: + tty.debug("SPIDER: [url={0}]".format(url)) - except Exception as e: - # Other types of errors are completely ignored, except in debug mode. - tty.debug("Error in _spider: %s:%s" % (type(e), e), - traceback.format_exc()) + return pages, links, subcalls + + # TODO: Needed until we drop support for Python 2.X + def star(func): + def _wrapper(args): + return func(*args) + return _wrapper + + if isinstance(root_urls, six.string_types): + root_urls = [root_urls] + + # Clear the local cache of visited pages before starting the search + _visited.clear() + + current_depth = 0 + pages, links, spider_args = {}, set(), [] + + collect = current_depth < depth + for root in root_urls: + root = url_util.parse(root) + spider_args.append((root, collect)) + + tp = multiprocessing.pool.ThreadPool(processes=concurrency) + try: + while current_depth <= depth: + tty.debug("SPIDER: [depth={0}, max_depth={1}, urls={2}]".format( + current_depth, depth, len(spider_args)) + ) + results = tp.map(star(_spider), spider_args) + spider_args = [] + collect = current_depth < depth + for sub_pages, sub_links, sub_spider_args in results: + sub_spider_args = [x + (collect,) for x in sub_spider_args] + pages.update(sub_pages) + links.update(sub_links) + spider_args.extend(sub_spider_args) + + current_depth += 1 + finally: + tp.terminate() + tp.join() return pages, links -def _spider_wrapper(args): - """Wrapper for using spider with multiprocessing.""" - return _spider(*args) - - def _urlopen(req, *args, **kwargs): """Wrapper for compatibility with old versions of Python.""" url = req @@ -460,37 +476,22 @@ def _urlopen(req, *args, **kwargs): return opener(req, *args, **kwargs) -def spider(root, depth=0): - """Gets web pages from a root URL. - - If depth is specified (e.g., depth=2), then this will also follow - up to levels of links from the root. - - This will spawn processes to fetch the children, for much improved - performance over a sequential fetch. - - """ - root = url_util.parse(root) - pages, links = _spider(root, set(), root, 0, depth, False) - return pages, links - - -def find_versions_of_archive(archive_urls, list_url=None, list_depth=0): +def find_versions_of_archive( + archive_urls, list_url=None, list_depth=0, concurrency=32 +): """Scrape web pages for new versions of a tarball. - Arguments: + Args: archive_urls (str or list or tuple): URL or sequence of URLs for different versions of a package. Typically these are just the tarballs from the package file itself. By default, this searches the parent directories of archives. - - Keyword Arguments: list_url (str or None): URL for a listing of archives. Spack will scrape these pages for download links that look like the archive URL. - - list_depth (int): Max depth to follow links on list_url pages. + list_depth (int): max depth to follow links on list_url pages. Defaults to 0. + concurrency (int): maximum number of concurrent requests """ if not isinstance(archive_urls, (list, tuple)): archive_urls = [archive_urls] @@ -511,12 +512,7 @@ def find_versions_of_archive(archive_urls, list_url=None, list_depth=0): list_urls |= additional_list_urls # Grab some web pages to scrape. - pages = {} - links = set() - for lurl in list_urls: - pg, lnk = spider(lurl, depth=list_depth) - pages.update(pg) - links.update(lnk) + pages, links = spider(list_urls, depth=list_depth, concurrency=concurrency) # Scrape them for archive URLs regexes = [] diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index fa1e79c9c7f..0a74d144883 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1510,7 +1510,7 @@ _spack_verify() { _spack_versions() { if $list_options then - SPACK_COMPREPLY="-h --help -s --safe-only" + SPACK_COMPREPLY="-h --help -s --safe-only -c --concurrency" else _all_packages fi From 94e77333e6c1392a6b95b9a9d8b71cde213ea9c1 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Fri, 5 Jun 2020 00:35:16 -0700 Subject: [PATCH 620/802] spack dev-build: Do not mark -u builds in database (#16333) Builds can be stopped before the final install phase due to user requests. Those builds should not be registered as installed in the database. We had code intended to handle this but: 1. It caught the wrong type of exception 2. We were catching these exceptions to suppress them at a lower level in the stack This PR allows the StopIteration to propagate through a ChildError, and catches it properly. Also added to an existing test to prevent regression. --- lib/spack/spack/build_environment.py | 32 +++++++++++++++++++-------- lib/spack/spack/installer.py | 20 +++++++++++------ lib/spack/spack/package.py | 11 ++++----- lib/spack/spack/test/cmd/dev_build.py | 19 ++++++++++++++++ 4 files changed, 61 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 8beedf6c972..f57ecd1e582 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -812,12 +812,11 @@ def child_process(child_pipe, input_stream): setup_package(pkg, dirty=dirty) return_value = function() child_pipe.send(return_value) - except StopIteration as e: - # StopIteration is used to stop installations - # before the final stage, mainly for debug purposes - tty.msg(e) - child_pipe.send(None) + except StopPhase as e: + # Do not create a full ChildError from this, it's not an error + # it's a control statement. + child_pipe.send(e) except BaseException: # catch ANYTHING that goes wrong in the child process exc_type, exc, tb = sys.exc_info() @@ -869,15 +868,20 @@ def child_process(child_pipe, input_stream): child_result = parent_pipe.recv() p.join() + # If returns a StopPhase, raise it + if isinstance(child_result, StopPhase): + # do not print + raise child_result + # let the caller know which package went wrong. if isinstance(child_result, InstallError): child_result.pkg = pkg - # If the child process raised an error, print its output here rather - # than waiting until the call to SpackError.die() in main(). This - # allows exception handling output to be logged from within Spack. - # see spack.main.SpackCommand. if isinstance(child_result, ChildError): + # If the child process raised an error, print its output here rather + # than waiting until the call to SpackError.die() in main(). This + # allows exception handling output to be logged from within Spack. + # see spack.main.SpackCommand. child_result.print_context() raise child_result @@ -1066,3 +1070,13 @@ def __reduce__(self): def _make_child_error(msg, module, name, traceback, build_log, context): """Used by __reduce__ in ChildError to reconstruct pickled errors.""" return ChildError(msg, module, name, traceback, build_log, context) + + +class StopPhase(spack.error.SpackError): + """Pickle-able exception to control stopped builds.""" + def __reduce__(self): + return _make_stop_phase, (self.message, self.long_message) + + +def _make_stop_phase(msg, long_msg): + return StopPhase(msg, long_msg) diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index 8886f3ed069..0eeec020bc1 100644 --- a/lib/spack/spack/installer.py +++ b/lib/spack/spack/installer.py @@ -784,6 +784,9 @@ def _check_last_phase(self, **kwargs): The ``stop_before`` or ``stop_at`` arguments are removed from the installation arguments. + The last phase is also set to None if it is the last phase of the + package already + Args: kwargs: ``stop_before``': stop before execution of this phase (or None) @@ -800,6 +803,10 @@ def _check_last_phase(self, **kwargs): self.pkg.last_phase not in self.pkg.phases: tty.die('\'{0}\' is not an allowed phase for package {1}' .format(self.pkg.last_phase, self.pkg.name)) + # If we got a last_phase, make sure it's not already last + if self.pkg.last_phase and \ + self.pkg.last_phase == self.pkg.phases[-1]: + self.pkg.last_phase = None def _cleanup_all_tasks(self): """Cleanup all build tasks to include releasing their locks.""" @@ -1164,13 +1171,12 @@ def build_process(): if task.compiler: spack.compilers.add_compilers_to_config( spack.compilers.find_compilers([pkg.spec.prefix])) - - except StopIteration as e: - # A StopIteration exception means that do_install was asked to - # stop early from clients. - tty.msg('{0} {1}'.format(self.pid, str(e))) - tty.msg('Package stage directory : {0}' - .format(pkg.stage.source_path)) + except spack.build_environment.StopPhase as e: + # A StopPhase exception means that do_install was asked to + # stop early from clients, and is not an error at this point + tty.debug('{0} {1}'.format(self.pid, str(e))) + tty.debug('Package stage directory : {0}' + .format(pkg.stage.source_path)) _install_task.__doc__ += install_args_docstring diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index c9774c5b29b..dc32effbec9 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -116,16 +116,17 @@ def phase_wrapper(spec, prefix): def _on_phase_start(self, instance): # If a phase has a matching stop_before_phase attribute, - # stop the installation process raising a StopIteration + # stop the installation process raising a StopPhase if getattr(instance, 'stop_before_phase', None) == self.name: - raise StopIteration('Stopping before \'{0}\' phase' - .format(self.name)) + from spack.build_environment import StopPhase + raise StopPhase('Stopping before \'{0}\' phase'.format(self.name)) def _on_phase_exit(self, instance): # If a phase has a matching last_phase attribute, - # stop the installation process raising a StopIteration + # stop the installation process raising a StopPhase if getattr(instance, 'last_phase', None) == self.name: - raise StopIteration('Stopping at \'{0}\' phase'.format(self.name)) + from spack.build_environment import StopPhase + raise StopPhase('Stopping at \'{0}\' phase'.format(self.name)) def copy(self): try: diff --git a/lib/spack/spack/test/cmd/dev_build.py b/lib/spack/spack/test/cmd/dev_build.py index 37c40e787d4..271faa845d7 100644 --- a/lib/spack/spack/test/cmd/dev_build.py +++ b/lib/spack/spack/test/cmd/dev_build.py @@ -54,6 +54,25 @@ def test_dev_build_until(tmpdir, mock_packages, install_mockery): assert f.read() == spec.package.replacement_string assert not os.path.exists(spec.prefix) + assert not spack.store.db.query(spec, installed=True) + + +def test_dev_build_until_last_phase(tmpdir, mock_packages, install_mockery): + # Test that we ignore the last_phase argument if it is already last + spec = spack.spec.Spec('dev-build-test-install@0.0.0').concretized() + + with tmpdir.as_cwd(): + with open(spec.package.filename, 'w') as f: + f.write(spec.package.original_string) + + dev_build('-u', 'install', 'dev-build-test-install@0.0.0') + + assert spec.package.filename in os.listdir(os.getcwd()) + with open(spec.package.filename, 'r') as f: + assert f.read() == spec.package.replacement_string + + assert os.path.exists(spec.prefix) + assert spack.store.db.query(spec, installed=True) def test_dev_build_before_until(tmpdir, mock_packages, install_mockery): From 8be7823cc5b7147880f7c8107519b4f24f434d8f Mon Sep 17 00:00:00 2001 From: "Tomoki, Karatsu" <49965247+t-karatsu@users.noreply.github.com> Date: Fri, 5 Jun 2020 20:17:41 +0900 Subject: [PATCH 621/802] suite-sparse: change the condition to add C11 flag. (#16859) --- var/spack/repos/builtin/packages/suite-sparse/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index da2cc222aef..0cbdd900b60 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -102,7 +102,7 @@ def install(self, spec, prefix): # GraphBLAS/Demo/Program/wildtype_demo.c. For many compilers this is # not an issue because c11 or newer is their default. However, for some # compilers (e.g. xlc) the c11 flag is necessary. - if spec.satisfies('@5.4:'): + if spec.satisfies('@5.4:5.7.1') and ('%xl' in spec or '%xl_r' in spec): make_args += ['CFLAGS+=%s' % self.compiler.c11_flag] # 64bit blas in UMFPACK: From c3be6d903aef539e54320f35d8d3b18fca830c25 Mon Sep 17 00:00:00 2001 From: "Tomoki, Karatsu" <49965247+t-karatsu@users.noreply.github.com> Date: Fri, 5 Jun 2020 20:25:02 +0900 Subject: [PATCH 622/802] cmake: modify FindMPI.cmake to treat Fujitsu MPI correctly (#16864) --- var/spack/repos/builtin/packages/cmake/package.py | 6 ++++++ .../repos/builtin/packages/netlib-scalapack/package.py | 9 --------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index cfc13c436db..fe19bdb404c 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -238,3 +238,9 @@ def test(self): def install(self, spec, prefix): make('install') + + if spec.satisfies('%fj'): + for f in find(self.prefix, 'FindMPI.cmake', recursive=True): + filter_file('mpcc_r)', 'mpcc_r mpifcc)', f, string=True) + filter_file('mpc++_r)', 'mpc++_r mpiFCC)', f, string=True) + filter_file('mpifc)', 'mpifc mpifrt)', f, string=True) diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index 2acc06e6bbd..75993c47010 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -82,15 +82,6 @@ def cmake_args(self): "-DCMAKE_Fortran_FLAGS=%s" % self.compiler.fc_pic_flag ]) - # Specify Fujitsu-MPI's location - if spec.satisfies('%fj') and '^fujitsu-mpi' in spec: - options.extend([ - '-DMPI_C_COMPILER=%s' % spec['mpi'].mpicc, - '-DMPI_CXX_COMPILER=%s' % spec['mpi'].mpicxx, - '-DMPI_Fortran_COMPILER=%s' % spec['mpi'].mpifc, - '-DMPI_BASE_DIR=%s' % spec['mpi'].prefix - ]) - return options @run_after('install') From 89cc507cf6e5fb0c943b207a70a4f43d165c5ade Mon Sep 17 00:00:00 2001 From: "Tomoki, Karatsu" <49965247+t-karatsu@users.noreply.github.com> Date: Fri, 5 Jun 2020 20:29:36 +0900 Subject: [PATCH 623/802] cmake: add linker option for VerifyFortranC when using Fujitsu compiler. (#16963) --- .../packages/cmake/fujitsu_add_linker_option.patch | 10 ++++++++++ var/spack/repos/builtin/packages/cmake/package.py | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cmake/fujitsu_add_linker_option.patch diff --git a/var/spack/repos/builtin/packages/cmake/fujitsu_add_linker_option.patch b/var/spack/repos/builtin/packages/cmake/fujitsu_add_linker_option.patch new file mode 100644 index 00000000000..4a0cf7abbf2 --- /dev/null +++ b/var/spack/repos/builtin/packages/cmake/fujitsu_add_linker_option.patch @@ -0,0 +1,10 @@ +--- spack-src/Modules/FortranCInterface/Verify/CMakeLists.txt.org 2020-06-05 15:54:59.559043595 +0900 ++++ spack-src/Modules/FortranCInterface/Verify/CMakeLists.txt 2020-06-05 15:58:28.150062948 +0900 +@@ -4,6 +4,7 @@ + cmake_minimum_required(VERSION ${CMAKE_VERSION}) + project(VerifyFortranC C Fortran) + ++set (CMAKE_EXE_LINKER_FLAGS "--linkfortran") + option(VERIFY_CXX "Whether to verify C++ and Fortran" OFF) + if(VERIFY_CXX) + enable_language(CXX) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index fe19bdb404c..933f5e1995a 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -142,6 +142,10 @@ class Cmake(Package): # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4681 patch('ignore_crayxc_warnings.patch', when='@3.7:3.17.2') + # The Fujitsu compiler requires the '--linkfortran' option + # to combine C++ and Fortran programs. + patch('fujitsu_add_linker_option.patch', when='%fj') + conflicts('+qt', when='^qt@5.4.0') # qt-5.4.0 has broken CMake modules # https://gitlab.kitware.com/cmake/cmake/issues/18166 From 76abf358138927be3ebeea2bead9fd1ccd087f41 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 5 Jun 2020 12:38:07 -0600 Subject: [PATCH 624/802] cajita: got merged in cabana (#16971) --- .../repos/builtin/packages/cajita/package.py | 29 ------------------- .../repos/builtin/packages/exampm/package.py | 1 - 2 files changed, 30 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/cajita/package.py diff --git a/var/spack/repos/builtin/packages/cajita/package.py b/var/spack/repos/builtin/packages/cajita/package.py deleted file mode 100644 index ddfa96a81ea..00000000000 --- a/var/spack/repos/builtin/packages/cajita/package.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack import * - - -class Cajita(CMakePackage): - """An MPI+Kokkos library for logically rectilinear grids""" - - homepage = "https://github.com/ECP-copa/Cajita" - git = "https://github.com/ECP-copa/Cajita.git" - - version('master', branch='master') - version('0.1', tag='0.1.0') - - variant('shared', default=True, description='Build shared libraries') - - depends_on('mpi') - depends_on('kokkos@3.0:') - - def cmake_args(self): - options = [ - '-DBUILD_SHARED_LIBS=%s' % ( - 'On' if '+shared' in self.spec else 'Off') - ] - - return options diff --git a/var/spack/repos/builtin/packages/exampm/package.py b/var/spack/repos/builtin/packages/exampm/package.py index e5ba5671960..64732c2eda5 100644 --- a/var/spack/repos/builtin/packages/exampm/package.py +++ b/var/spack/repos/builtin/packages/exampm/package.py @@ -22,7 +22,6 @@ class Exampm(CMakePackage): depends_on('kokkos@3.0:') depends_on('silo') depends_on('cabana+mpi@master') - depends_on('cajita@master') def cmake_args(self): options = [ From bfa05628cbb3f714ec6eca1fffc60fffc77ec530 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 6 Jun 2020 01:27:20 +0200 Subject: [PATCH 625/802] pkgconf: Add 1.7.3 --- var/spack/repos/builtin/packages/pkgconf/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pkgconf/package.py b/var/spack/repos/builtin/packages/pkgconf/package.py index 06fcefcc6c0..3bb59b4dd87 100644 --- a/var/spack/repos/builtin/packages/pkgconf/package.py +++ b/var/spack/repos/builtin/packages/pkgconf/package.py @@ -16,6 +16,7 @@ class Pkgconf(AutotoolsPackage): # URL must remain http:// so Spack can bootstrap curl url = "http://distfiles.dereferenced.org/pkgconf/pkgconf-1.6.3.tar.xz" + version('1.7.3', sha256='b846aea51cf696c3392a0ae58bef93e2e72f8e7073ca6ad1ed8b01c85871f9c0') version('1.6.3', sha256='61f0b31b0d5ea0e862b454a80c170f57bad47879c0c42bd8de89200ff62ea210') version('1.6.1', sha256='22b9ee38438901f9d60f180e5182821180854fa738fd071f593ea26a81da208c') version('1.6.0', sha256='6135a3abb576672ba54a899860442ba185063f0f90dae5892f64f7bae8e1ece5') From a08f3dd5050d8dc6c36a5dc9c38cbdd7e29e1dc0 Mon Sep 17 00:00:00 2001 From: Sinan Date: Fri, 5 Jun 2020 18:16:13 -0700 Subject: [PATCH 626/802] New package: py-asteval (#16976) --- .../builtin/packages/py-asteval/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-asteval/package.py diff --git a/var/spack/repos/builtin/packages/py-asteval/package.py b/var/spack/repos/builtin/packages/py-asteval/package.py new file mode 100644 index 00000000000..4f80a227896 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-asteval/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyAsteval(PythonPackage): + """Safe, minimalistic evaluator of python expression using ast module""" + + homepage = "http://github.com/newville/asteval" + url = "https://pypi.io/packages/source/a/asteval/asteval-0.9.18.tar.gz" + + version('0.9.18', sha256='5d64e18b8a72c2c7ae8f9b70d1f80b68bbcaa98c1c0d7047c35489d03209bc86') + + depends_on('python@3.5:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-pytest', type='test') From 27eb7d9f5f2326e46484bba7a2df058866928e16 Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Sat, 6 Jun 2020 03:18:00 +0200 Subject: [PATCH 627/802] xrootd: add version 4.12.1 (#16966) --- var/spack/repos/builtin/packages/xrootd/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/xrootd/package.py b/var/spack/repos/builtin/packages/xrootd/package.py index cadf24b44ea..24f966395d7 100644 --- a/var/spack/repos/builtin/packages/xrootd/package.py +++ b/var/spack/repos/builtin/packages/xrootd/package.py @@ -13,6 +13,7 @@ class Xrootd(CMakePackage): homepage = "http://xrootd.org" url = "http://xrootd.org/download/v4.6.0/xrootd-4.6.0.tar.gz" + version('4.12.1', sha256='7350d9196a26d17719b839fd242849e3995692fda25f242e67ac6ec907218d13') version('4.12.0', sha256='69ef4732256d9a88127de4bfdf96bbf73348e0c70ce1d756264871a0ffadd2fc') version('4.11.3', sha256='8e7a64fd55dfb452b6d5f76a9a97c493593943227b377623a3032da9197c7f65') version('4.11.2', sha256='4620824db97fcc37dc3dd26110da8e5c3aab1d8302e4921d4f32e83207060603') From 374f1a62e2b388fcac60aa25b3c5c5f8b18871cf Mon Sep 17 00:00:00 2001 From: Andrew Gaspar Date: Fri, 5 Jun 2020 19:25:42 -0600 Subject: [PATCH 628/802] py-flake8: add version 2.8.2 (#16959) * py-flake8: add version 3.8.2 * This version depends on different versions of py-pycodestyle and py-pyflakes * When built for python@:3.7, this depends on the py-importlib-metadata backport library * py-pycodestyle: add version 2.6.0 * py-pyflakes: add version 2.2.0 --- .../builtin/packages/py-flake8/package.py | 18 ++++++++++++------ .../builtin/packages/py-pycodestyle/package.py | 1 + .../builtin/packages/py-pyflakes/package.py | 1 + 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-flake8/package.py b/var/spack/repos/builtin/packages/py-flake8/package.py index 462758ddf41..4c585ee7558 100644 --- a/var/spack/repos/builtin/packages/py-flake8/package.py +++ b/var/spack/repos/builtin/packages/py-flake8/package.py @@ -13,6 +13,7 @@ class PyFlake8(PythonPackage): homepage = "https://github.com/PyCQA/flake8" url = "https://github.com/PyCQA/flake8/archive/3.7.8.tar.gz" + version('3.8.2', sha256='ae9b00ddaa2bb7fa69796ac73ba7607fcf06d79a8b777fa12ba5abef1e770491') version('3.7.8', sha256='201720797dc9691dd349819994e4a0bc281b70ee2ff77b0c928bb1d3c5aa9810') version('3.7.7', sha256='b3f76b02351008dc772276e74b09dd3d4b5c567ff8c6ab573352cb8fd7007444') version('3.5.0', sha256='60ffe2fdacce4ebe7cadc30f310cf1edfd8ff654ef79525d90cf0756e69de44e') @@ -31,12 +32,16 @@ class PyFlake8(PythonPackage): # http://flake8.pycqa.org/en/latest/faq.html#why-does-flake8-use-ranges-for-its-dependencies # http://flake8.pycqa.org/en/latest/internal/releases.html#releasing-flake8 + # Flake8 3.8.X + depends_on('py-pycodestyle@2.6.0:2.6.999', when='@3.8.0:3.8.999', type=('build', 'run')) + depends_on('py-pyflakes@2.2.0:2.2.999', when='@3.8.0:3.8.999', type=('build', 'run')) + # Flake8 3.7.X # FIXME @0.3.0:0.3.999 causes concretization to hang - depends_on('py-entrypoints@0.3', when='@3.7.0:3.7.999', type=('build', 'run')) + depends_on('py-entrypoints@0.3', when='@3.7.0:3.8.999', type=('build', 'run')) depends_on('py-pyflakes@2.1.0:2.1.999', when='@3.7.0:3.7.999', type=('build', 'run')) depends_on('py-pycodestyle@2.5.0:2.5.999', when='@3.7.0:3.7.999', type=('build', 'run')) - depends_on('py-mccabe@0.6.0:0.6.999', when='@3.7.0:3.7.999', type=('build', 'run')) + depends_on('py-mccabe@0.6.0:0.6.999', when='@3.7.0:3.8.999', type=('build', 'run')) # Flake8 3.5.X depends_on('py-pyflakes@1.5:1.6', when='@3.5.0:3.5.999', type=('build', 'run')) @@ -54,10 +59,11 @@ class PyFlake8(PythonPackage): depends_on('py-mccabe@0.2.1:0.4', when='@2.5.0:2.5.999', type=('build', 'run')) # Python version-specific backports - depends_on('py-enum34', when='@3.0.0: ^python@:3.3', type=('build', 'run')) - depends_on('py-typing', when='@3.7.0: ^python@:3.4', type=('build', 'run')) - depends_on('py-configparser', when='@3.0.0: ^python@:3.1', type=('build', 'run')) - depends_on('py-functools32', when='@3.7.4: ^python@:3.1', type=('build', 'run')) + depends_on('py-importlib-metadata', when='@3.8.0: ^python@:3.7', type=('build', 'run')) + depends_on('py-enum34', when='@3.0.0: ^python@:3.3', type=('build', 'run')) + depends_on('py-typing', when='@3.7.0: ^python@:3.4', type=('build', 'run')) + depends_on('py-configparser', when='@3.0.0: ^python@:3.1', type=('build', 'run')) + depends_on('py-functools32', when='@3.7.4: ^python@:3.1', type=('build', 'run')) def patch(self): """Filter pytest-runner requirement out of setup.py.""" diff --git a/var/spack/repos/builtin/packages/py-pycodestyle/package.py b/var/spack/repos/builtin/packages/py-pycodestyle/package.py index 6f9da670f86..48e833ec2f2 100644 --- a/var/spack/repos/builtin/packages/py-pycodestyle/package.py +++ b/var/spack/repos/builtin/packages/py-pycodestyle/package.py @@ -13,6 +13,7 @@ class PyPycodestyle(PythonPackage): homepage = "https://github.com/PyCQA/pycodestyle" url = "https://github.com/PyCQA/pycodestyle/archive/2.0.0.tar.gz" + version('2.6.0', sha256='08347fbc48cc92afd33117c1e8af9b99b292a4e5889f6b776f402e062fc39c97') version('2.5.0', sha256='a603453c07e8d8e15a43cf062aa7174741b74b4a27b110f9ad03d74d519173b5') version('2.3.1', sha256='e9fc1ca3fd85648f45c0d2e33591b608a17d8b9b78e22c5f898e831351bacb03') version('2.3.0', sha256='ac2a849987316521a56814b5618668d36cd5f3b04843803832a15b93b8383a50') diff --git a/var/spack/repos/builtin/packages/py-pyflakes/package.py b/var/spack/repos/builtin/packages/py-pyflakes/package.py index 156db2f0da2..402a6c525b8 100644 --- a/var/spack/repos/builtin/packages/py-pyflakes/package.py +++ b/var/spack/repos/builtin/packages/py-pyflakes/package.py @@ -12,6 +12,7 @@ class PyPyflakes(PythonPackage): homepage = "https://github.com/PyCQA/pyflakes" url = "https://github.com/PyCQA/pyflakes/archive/2.1.1.tar.gz" + version('2.2.0', sha256='4a6927b9ca7fc19817176d54b3ee2ee4202f064febdee8624ee8340303cfda7b') version('2.1.1', sha256='2c98f07a9dd57d9f33561f6b54a64a766cdf79a3c869bd8c07b7fe03094fb8c3') version('2.1.0', sha256='6cd8775b6430daad386c0de00dfbc27ce2c24468cdcc4d3da41e4aa39d8ce167') version('1.6.0', sha256='f9c72359e05bf8dc27eaaee8cdcae464497f2ccadae87ac6517605ba6040ec99') From d755cc8ce95f20926b65e23e56de249c64a6a028 Mon Sep 17 00:00:00 2001 From: John Jolly Date: Sat, 6 Jun 2020 01:55:14 -0600 Subject: [PATCH 629/802] iegenlib: add build dependencies for automake and libtool (#16980) --- var/spack/repos/builtin/packages/iegenlib/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/iegenlib/package.py b/var/spack/repos/builtin/packages/iegenlib/package.py index be61f120c77..ee198fd588f 100644 --- a/var/spack/repos/builtin/packages/iegenlib/package.py +++ b/var/spack/repos/builtin/packages/iegenlib/package.py @@ -18,11 +18,13 @@ class Iegenlib(CMakePackage): version('master', branch='master') version('2018-07-03', - url="https://github.com/CompOpt4Apps/IEGenLib/archive/fc479ee6ff01dba26beffc1dc6bacdba03262138.zip", - sha256='b4c0b368363fcc1e34b388057cc0940bb87fc336cebb0772fd6055f45009b12b') + url="https://github.com/CompOpt4Apps/IEGenLib/archive/fc479ee6ff01dba26beffc1dc6bacdba03262138.zip", + sha256='b4c0b368363fcc1e34b388057cc0940bb87fc336cebb0772fd6055f45009b12b') depends_on('cmake@2.6:', type='build') depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') depends_on('texinfo', type='build') depends_on('isl') From 944f0abb369a10a4ba5e169098dd743294325998 Mon Sep 17 00:00:00 2001 From: Nithin Senthil Kumar <52734841+nithintsk@users.noreply.github.com> Date: Sat, 6 Jun 2020 06:51:27 -0400 Subject: [PATCH 630/802] Update package for MVAPICH2 2.3.4 release (#16960) Co-authored-by: senthilkumar.16 --- var/spack/repos/builtin/packages/mvapich2/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index d8398b336da..04205b6e24f 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -10,10 +10,11 @@ class Mvapich2(AutotoolsPackage): """MVAPICH2 is an MPI implementation for Infiniband networks.""" homepage = "http://mvapich.cse.ohio-state.edu/" - url = "http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.3.3.tar.gz" + url = "http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.3.4.tar.gz" list_url = "http://mvapich.cse.ohio-state.edu/downloads/" # Prefer the latest stable release + version('2.3.4', sha256='7226a45c7c98333c8e5d2888119cce186199b430c13b7b1dca1769909e68ea7a') version('2.3.3', sha256='41d3261be57e5bc8aabf4e32981543c015c5443ff032a26f18205985e18c2b73') version('2.3.2', sha256='30cc0d7bcaa075d204692f76bca4d65a539e0f661c7460ffa9f835d6249e1ebf') version('2.3.1', sha256='314e12829f75f3ed83cd4779a972572d1787aac6543a3d024ea7c6080e0ee3bf') From c5ac168f31dd8a552634b9197da484cadd214397 Mon Sep 17 00:00:00 2001 From: darmac Date: Sun, 7 Jun 2020 04:47:30 +0800 Subject: [PATCH 631/802] protobuf: support aarch64 @2.5.0 (#16862) * protobuf: support aarch64 @2.5.0 * refine cmake args * fix patch name --- .../builtin/packages/protobuf/package.py | 39 +++++- .../protobuf/protoc2.5.0_aarch64.patch | 113 ++++++++++++++++++ 2 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 var/spack/repos/builtin/packages/protobuf/protoc2.5.0_aarch64.patch diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py index 05702d9fc96..82d2d05d75b 100644 --- a/var/spack/repos/builtin/packages/protobuf/package.py +++ b/var/spack/repos/builtin/packages/protobuf/package.py @@ -8,12 +8,11 @@ import spack.util.web -class Protobuf(CMakePackage): +class Protobuf(Package): """Google's data interchange format.""" homepage = "https://developers.google.com/protocol-buffers" url = "https://github.com/protocolbuffers/protobuf/archive/v3.10.1.tar.gz" - root_cmakelists_dir = "cmake" version('3.11.2', sha256='e8c7601439dbd4489fe5069c33d374804990a56c2f710e00227ee5d8fd650e67') version('3.11.1', sha256='4f8e805825c53bbc3c9f6b6abc009b5b5679e4702bccfca1121c42ff5ec801c7') @@ -36,6 +35,7 @@ class Protobuf(CMakePackage): version('3.2.0', sha256='a839d3f1519ff9d68ab908de5a0f269650ef1fc501c10f6eefd4cae51d29b86f') version('3.1.0', sha256='fb2a314f4be897491bb2446697be693d489af645cb0e165a85e7e64e07eb134d') version('3.0.2', sha256='a0a265bcc9d4e98c87416e59c33afc37cede9fb277292523739417e449b18c1e') + version('2.5.0', sha256='c2665a7aa2ac1a206e61b28e014486e3de59009ea2be2bde9182e0847f38b62f') variant('shared', default=True, description='Enables the build of shared libraries') @@ -43,19 +43,26 @@ class Protobuf(CMakePackage): description='The build type to build', values=('Debug', 'Release')) + depends_on('cmake', when='@3.0.2:', type='build') depends_on('zlib') + depends_on('autoconf', type='build', when='@2.5.0') + depends_on('automake', type='build', when='@2.5.0') + depends_on('libtool', type='build', when='@2.5.0') + depends_on('m4', type='build', when='@2.5.0') conflicts('%gcc@:4.6', when='@3.6.0:') # Requires c++11 conflicts('%gcc@:4.6', when='@3.2.0:3.3.0') # Breaks # first fixed in 3.4.0: https://github.com/google/protobuf/pull/3406 - patch('pkgconfig.patch', when='@:3.3.2') + patch('pkgconfig.patch', when='@3.0.2:3.3.2') patch('intel-v1.patch', when='@3.2:@3.6 %intel') # See https://github.com/protocolbuffers/protobuf/pull/7197 patch('intel-v2.patch', when='@3.7:@3.11.4 %intel') + patch('protoc2.5.0_aarch64.patch', sha256='7b44fcdb794f421174d619f83584e00a36012a16da09079e2fad9c12f7337451', when='@2.5.0 target=aarch64:') + def fetch_remote_versions(self): """Ignore additional source artifacts uploaded with releases, only keep known versions @@ -75,3 +82,29 @@ def cmake_args(self): if sys.platform == 'darwin': args.extend(['-DCMAKE_MACOSX_RPATH=ON']) return args + + @when('@3.0.2:') + def install(self, spec, prefix): + args = self.cmake_args() + args.extend(std_cmake_args) + + source_directory = join_path(self.stage.source_path, 'cmake') + build_directory = join_path(source_directory, 'build') + + with working_dir(build_directory, create=True): + cmake(source_directory, *args) + make() + make('install') + + def configure_args(self): + args = [] + args.append('--prefix=%s' % self.prefix) + return args + + @when('@2.5.0') + def install(self, spec, prefix): + args = self.configure_args() + autoreconf('-ifv') + configure(*args) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/protobuf/protoc2.5.0_aarch64.patch b/var/spack/repos/builtin/packages/protobuf/protoc2.5.0_aarch64.patch new file mode 100644 index 00000000000..aa1ebc6a9ab --- /dev/null +++ b/var/spack/repos/builtin/packages/protobuf/protoc2.5.0_aarch64.patch @@ -0,0 +1,113 @@ +diff -uprN /src/google/protobuf/stubs/atomicops_internals_arm_gcc.h /src/google/protobuf/stubs/atomicops_internals_arm_gcc.h +--- /src/google/protobuf/subs/atomicops_internals_arm_gcc.h 2018-08-03 08:50:58.579413324 +0000 ++++ /src/google/protobuf/stubs/atomicops_internals_arm_gcc.h 2018-08-03 08:50:58.711413322 +0000 +@@ -68,6 +68,30 @@ inline Atomic32 NoBarrier_CompareAndSwap + } while (prev_value == old_value); + return prev_value; + } ++inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr, ++ Atomic64 old_value, ++ Atomic64 new_value) { ++ Atomic64 prev; ++ int32_t temp; ++ ++ __asm__ __volatile__ ( // NOLINT ++ "0: \n\t" ++ "ldxr %[prev], %[ptr] \n\t" ++ "cmp %[prev], %[old_value] \n\t" ++ "bne 1f \n\t" ++ "stxr %w[temp], %[new_value], %[ptr] \n\t" ++ "cbnz %w[temp], 0b \n\t" ++ "1: \n\t" ++ : [prev]"=&r" (prev), ++ [temp]"=&r" (temp), ++ [ptr]"+Q" (*ptr) ++ : [old_value]"IJr" (old_value), ++ [new_value]"r" (new_value) ++ : "cc", "memory" ++ ); // NOLINT ++ ++ return prev; ++} + + inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, + Atomic32 new_value) { +@@ -105,6 +129,15 @@ inline Atomic32 Acquire_CompareAndSwap(v + return NoBarrier_CompareAndSwap(ptr, old_value, new_value); + } + ++inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr, ++ Atomic64 old_value, ++ Atomic64 new_value) { ++ Atomic64 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value); ++ MemoryBarrier(); ++ ++ return prev; ++} ++ + inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr, + Atomic32 old_value, + Atomic32 new_value) { +@@ -115,8 +148,11 @@ inline void NoBarrier_Store(volatile Ato + *ptr = value; + } + +-inline void MemoryBarrier() { ++/*inline void MemoryBarrier() { + pLinuxKernelMemoryBarrier(); ++}*/ ++inline void MemoryBarrier() { ++ __asm__ __volatile__ ("dmb ish" ::: "memory"); // NOLINT + } + + inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) { +@@ -129,6 +165,15 @@ inline void Release_Store(volatile Atomi + *ptr = value; + } + ++inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) { ++ __asm__ __volatile__ ( // NOLINT ++ "stlr %x[value], %[ptr] \n\t" ++ : [ptr]"=Q" (*ptr) ++ : [value]"r" (value) ++ : "memory" ++ ); // NOLINT ++} ++ + inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) { + return *ptr; + } +@@ -139,6 +184,19 @@ inline Atomic32 Acquire_Load(volatile co + return value; + } + ++inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) { ++ Atomic64 value; ++ ++ __asm__ __volatile__ ( // NOLINT ++ "ldar %x[value], %[ptr] \n\t" ++ : [value]"=r" (value) ++ : [ptr]"Q" (*ptr) ++ : "memory" ++ ); // NOLINT ++ ++ return value; ++} ++ + inline Atomic32 Release_Load(volatile const Atomic32* ptr) { + MemoryBarrier(); + return *ptr; +diff -uprN /src/google/protobuf/stubs/platform_macros.h /src/google/protobuf/stubs/platform_macros.h +--- /src/google/protobuf/stubs/platform_macros.h 2018-08-03 08:50:58.543413325 +0000 ++++ /src/google/protobuf/stubs/platform_macros.h 2018-08-03 08:50:58.595413324 +0000 +@@ -57,6 +57,9 @@ + #elif defined(__ppc__) + #define GOOGLE_PROTOBUF_ARCH_PPC 1 + #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 ++#elif defined(__aarch64__) ++#define GOOGLE_PROTOBUF_ARCH_ARM 1 ++#define GOOGLE_PROTOBUF_ARCH_64_BIT 1 + #else + #error Host architecture was not detected as supported by protobuf + #endif + From 7b6e1ae9d3fb614f45744254bf90a3674f3e30eb Mon Sep 17 00:00:00 2001 From: Sinan Date: Sat, 6 Jun 2020 13:50:16 -0700 Subject: [PATCH 632/802] py-astunparse: add version 1.6.3 (#16946) Co-authored-by: Sinan81 --- var/spack/repos/builtin/packages/py-astunparse/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-astunparse/package.py b/var/spack/repos/builtin/packages/py-astunparse/package.py index 87ca432f56a..996a59183e4 100644 --- a/var/spack/repos/builtin/packages/py-astunparse/package.py +++ b/var/spack/repos/builtin/packages/py-astunparse/package.py @@ -15,6 +15,7 @@ class PyAstunparse(PythonPackage): homepage = "https://pypi.org/project/astunparse/" url = "https://pypi.io/packages/source/a/astunparse/astunparse-1.6.2.tar.gz" + version('1.6.3', sha256='5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872') version('1.6.2', sha256='dab3e426715373fd76cd08bb1abe64b550f5aa494cf1e32384f26fd60961eb67') depends_on('py-setuptools', type='build') From 73d13461b1b4c0ad595c0506e104d2ffccc07be2 Mon Sep 17 00:00:00 2001 From: Sinan Date: Sat, 6 Jun 2020 13:51:19 -0700 Subject: [PATCH 633/802] ensure xla is turned off (#16974) Co-authored-by: Sinan81 --- var/spack/repos/builtin/packages/py-tensorflow/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 888e9432bf5..6bdc7e69be3 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -525,6 +525,13 @@ def configure(self, spec, prefix): @run_after('configure') def post_configure_fixes(self): spec = self.spec + + # make sure xla is actually turned off + if spec.satisfies('~xla'): + filter_file(r'--define with_xla_support=true', + r'--define with_xla_support=false', + '.tf_configure.bazelrc') + if spec.satisfies('@1.5.0: ~android'): # env variable is somehow ignored -> brute force # TODO: find a better solution From 36f9550178a680466bda837ecae7eb51ad8b2f03 Mon Sep 17 00:00:00 2001 From: Sinan Date: Sat, 6 Jun 2020 14:00:29 -0700 Subject: [PATCH 634/802] py-mysqlclient: relax dependency constraint, add new versions (#16985) Co-authored-by: Sinan81 --- .../repos/builtin/packages/py-mysqlclient/package.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-mysqlclient/package.py b/var/spack/repos/builtin/packages/py-mysqlclient/package.py index d1e6ef37a8c..a1f1d09e130 100644 --- a/var/spack/repos/builtin/packages/py-mysqlclient/package.py +++ b/var/spack/repos/builtin/packages/py-mysqlclient/package.py @@ -15,9 +15,10 @@ class PyMysqlclient(PythonPackage): homepage = "https://github.com/PyMySQL/mysqlclient-python" url = "https://pypi.io/packages/source/m/mysqlclient/mysqlclient-1.4.4.tar.gz" - version('1.4.4', sha256='9c737cc55a5dc8dd3583a942d5a9b21be58d16f00f5fefca4e575e7d9682e98c') - version('1.3.13', sha256='ff8ee1be84215e6c30a746b728c41eb0701a46ca76e343af445b35ce6250644f') + version('1.4.6', sha256='f3fdaa9a38752a3b214a6fe79d7cae3653731a53e577821f9187e67cbecb2e16') + version('1.4.5', sha256='e80109b0ae8d952b900b31b623181532e5e89376d707dcbeb63f99e69cefe559') + version('1.4.4', sha256='9c737cc55a5dc8dd3583a942d5a9b21be58d16f00f5fefca4e575e7d9682e98c') + version('1.3.13', sha256='ff8ee1be84215e6c30a746b728c41eb0701a46ca76e343af445b35ce6250644f') depends_on('py-setuptools', type='build') - # Below: cxxstd=17 also works - depends_on('mysql cxxstd=14') + depends_on('mysql') From 77fbdff8a232f71a8aa5a79aac7e91865f590e51 Mon Sep 17 00:00:00 2001 From: darmac Date: Sun, 7 Jun 2020 05:00:59 +0800 Subject: [PATCH 635/802] Add new package: lxc (#16984) --- .../repos/builtin/packages/lxc/package.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 var/spack/repos/builtin/packages/lxc/package.py diff --git a/var/spack/repos/builtin/packages/lxc/package.py b/var/spack/repos/builtin/packages/lxc/package.py new file mode 100644 index 00000000000..0555b6b642b --- /dev/null +++ b/var/spack/repos/builtin/packages/lxc/package.py @@ -0,0 +1,33 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Lxc(AutotoolsPackage): + """LXC is the well-known and heavily tested low-level Linux container + runtime. It is in active development since 2008 and has proven itself + in critical production environments world-wide. Some of its core + contributors are the same people that helped to implement various + well-known containerization features inside the Linux kernel.""" + + homepage = "https://linuxcontainers.org/lxc/" + url = "https://github.com/lxc/lxc/archive/lxc-4.0.2.tar.gz" + + version('4.0.2', sha256='89a9f1c6c9c0c43ffc4ec4d281381d60dcf698af1578effa491be97885ab282a') + version('4.0.1', sha256='5b17c48db24d93f8a687bf4557358e252126c50a66f5756b3e0ea2cf04a60d05') + version('4.0.0', sha256='8cd36f002f656bbcd01679e6b8892f81ed036d5589aed45b36358014b32277dd') + version('3.2.1', sha256='59f46fad0a6d921c59a6768ba781295e0986989a96e2d216de2b4b3a14392e65') + version('3.2.0', sha256='5dbf25a1c15aa96e184a4e9ef580d40f08bf06818ad21614d6c79fce5447c7eb') + version('3.1.0', sha256='14c34bb3390c60331107a5fbd5c6520e4873c774de2293e9efcb3c0e860b807d') + version('3.0.4', sha256='12a126e634a8df81507fd9d3a4984bacaacf22153c11f024e215810ea78fcc4f') + version('3.0.3', sha256='e794f287755d2529cb49f01b72802abfec31f2a02259719b60a62897da6e8298') + version('2.0.11', sha256='31334ffe0e2d8e38779d80ce670a523f4f5559c2a02c9e085c2f0cf43995d0b0') + version('2.0.10', sha256='b748de0914467aafea18a568602735907fc95f4272609dba7b0f8c91d7dde776') + + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') From c835b931091eecbf4b74f2c48be9086d8f78ea00 Mon Sep 17 00:00:00 2001 From: darmac Date: Sun, 7 Jun 2020 05:02:15 +0800 Subject: [PATCH 636/802] Add new package: py-louie (#16983) --- .../builtin/packages/py-louie/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-louie/package.py diff --git a/var/spack/repos/builtin/packages/py-louie/package.py b/var/spack/repos/builtin/packages/py-louie/package.py new file mode 100644 index 00000000000..dc23bd7a4d1 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-louie/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyLouie(PythonPackage): + """Louie provides Python programmers with a straightforward way to + dispatch signals between objects in a wide variety of contexts. It + is based on PyDispatcher, which in turn was based on a highly-rated + recipe in the Python Cookbook.""" + + homepage = "https://github.com/11craft/louie/" + url = "https://github.com/11craft/louie/archive/2.0.tar.gz" + + version('2.0', sha256='ac274ef672511357fc15d784df841c238ae13d00964094571eebabb0b14c54b2') + version('1.1', sha256='4bc227171fc546d1a527ee3059fa17df6d35a0acc10db1f942dd3da42ad96408') + + depends_on('py-setuptools', type='build') From 885808cc13d90a12a70e9ab082934b5222298004 Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Sat, 6 Jun 2020 17:12:46 -0400 Subject: [PATCH 637/802] intel-tbb: Fix for #16938 add custom libs method (#16972) * intel-tbb: Fix for #16938 add custom libs method Override the libs method to look for libraries of form libtbb* (instead of inherited which looks for libintel-tbb*) * Fixing pre-existing flake8 issues --- .../builtin/packages/intel-tbb/package.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py index 94eec8a06e6..c470e8933b3 100644 --- a/var/spack/repos/builtin/packages/intel-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-tbb/package.py @@ -132,22 +132,22 @@ def coerce_to_spack(self, tbb_build_subdir): for f in fs: lines = open(f).readlines() of = open(f, "w") - for l in lines: - if l.strip().startswith("CPLUS ="): + for lin in lines: + if lin.strip().startswith("CPLUS ="): of.write("# coerced to spack\n") of.write("CPLUS = $(CXX)\n") - elif l.strip().startswith("CONLY ="): + elif lin.strip().startswith("CONLY ="): of.write("# coerced to spack\n") of.write("CONLY = $(CC)\n") else: - of.write(l) + of.write(lin) def install(self, spec, prefix): # Deactivate use of RTM with GCC when on an OS with a very old # assembler. if (spec.satisfies('%gcc@4.8.0: os=rhel6') - or spec.satisfies('%gcc@4.8.0: os=centos6') - or spec.satisfies('%gcc@4.8.0: os=scientific6')): + or spec.satisfies('%gcc@4.8.0: os=centos6') + or spec.satisfies('%gcc@4.8.0: os=scientific6')): filter_file(r'RTM_KEY.*=.*rtm.*', 'RTM_KEY =', join_path('build', 'linux.gcc.inc')) @@ -224,3 +224,9 @@ def darwin_fix(self): # Replace @rpath in ids with full path if sys.platform == 'darwin': fix_darwin_install_name(self.prefix.lib) + + @property + def libs(self): + shared = True if '+shared' in self.spec else False + return find_libraries( + 'libtbb*', root=self.prefix, shared=shared, recursive=True) From 46a751081daa76b5a1a9555f066e1aa6629bf17d Mon Sep 17 00:00:00 2001 From: John Jolly Date: Sat, 6 Jun 2020 15:14:11 -0600 Subject: [PATCH 638/802] gcc: Fix error 'size of array is negative' (#16969) gcc 9.3.0 and glibc 2.31 (found in the base install of Ubuntu 20.04) cause the gcc package to error during build with the error: "size of array 'assertion_failed__####' is negative" Previous to this fix, the error was resolved for v8.1.0 <= gcc <= v9.2.0 via two patches. This fix backports those patches for v5.3.0 <= gcc <= v7.4.0 Potentially these patches need to be backported to versions of gcc before v5.3.0, but other compile issues need to be resolved for earlier versions of gcc first. Fixes #16968 --- .../gcc/glibc-2.31-libsanitizer-1-gcc-6.patch | 39 +++++++++++ .../gcc/glibc-2.31-libsanitizer-2-gcc-6.patch | 69 +++++++++++++++++++ .../gcc/glibc-2.31-libsanitizer-2-gcc-7.patch | 69 +++++++++++++++++++ .../repos/builtin/packages/gcc/package.py | 9 ++- 4 files changed, 183 insertions(+), 3 deletions(-) create mode 100644 var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-1-gcc-6.patch create mode 100644 var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-2-gcc-6.patch create mode 100644 var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-2-gcc-7.patch diff --git a/var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-1-gcc-6.patch b/var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-1-gcc-6.patch new file mode 100644 index 00000000000..4187b812d5d --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-1-gcc-6.patch @@ -0,0 +1,39 @@ +From ce9568e9e9cf6094be30e748821421e703754ffc Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek +Date: Fri, 8 Nov 2019 19:53:18 +0100 +Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm + bootstrap due to libsanitizer) + + Backported from mainline + 2019-10-22 Tamar Christina + Backported for version 5.3.0 <= gcc <= 6.5.0 + 2020-06-05 John L. Jolly + + PR sanitizer/92154 + * sanitizer_common/sanitizer_platform_limits_posix.cc: + Cherry-pick compiler-rt revision r375220. + +From-SVN: r277981 +--- + libsanitizer/ChangeLog | 9 +++++++++ + .../sanitizer_common/sanitizer_platform_limits_posix.cc | 6 +++++- + 2 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 6cd4a5bac8b0..06a605ff4670 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1130,8 +1130,12 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + #ifndef __GLIBC_PREREQ + #define __GLIBC_PREREQ(x, y) 0 + #endif +-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) ++#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \ ++ !defined(__arm__) + /* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ ++/* On Arm glibc 2.31 and later provide a different mode field, this field is ++ never used by libsanitizer so we can simply ignore this assert for all glibc ++ versions. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + diff --git a/var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-2-gcc-6.patch b/var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-2-gcc-6.patch new file mode 100644 index 00000000000..755db173ffb --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-2-gcc-6.patch @@ -0,0 +1,69 @@ +From 75003cdd23c310ec385344e8040d490e8dd6d2be Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek +Date: Fri, 20 Dec 2019 17:58:35 +0100 +Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm + bootstrap due to libsanitizer) + + Backported from mainline + 2019-11-26 Jakub Jelinek + Backported for version 5.3.0 <= gcc <= 6.5.0 + 2020-06-05 John L. Jolly + + PR sanitizer/92154 + * sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick + llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce. + * sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise. + +From-SVN: r279653 +--- + libsanitizer/ChangeLog | 10 ++++++++++ + .../sanitizer_platform_limits_posix.cc | 9 +++------ + .../sanitizer_platform_limits_posix.h | 15 +-------------- + 3 files changed, 14 insertions(+), 20 deletions(-) + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 06a605ff4670..d823a12190c0 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1130,12 +1130,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + #ifndef __GLIBC_PREREQ + #define __GLIBC_PREREQ(x, y) 0 + #endif +-#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \ +- !defined(__arm__) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ +-/* On Arm glibc 2.31 and later provide a different mode field, this field is +- never used by libsanitizer so we can simply ignore this assert for all glibc +- versions. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index 73af92af1e8f..6a673a7c9959 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -211,20 +211,13 @@ namespace __sanitizer { + unsigned long __unused1; + unsigned long __unused2; + #elif defined(__sparc__) +-# if defined(__arch64__) + unsigned mode; +- unsigned short __pad1; +-# else +- unsigned short __pad1; +- unsigned short mode; + unsigned short __pad2; +-# endif + unsigned short __seq; + unsigned long long __unused1; + unsigned long long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) diff --git a/var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-2-gcc-7.patch b/var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-2-gcc-7.patch new file mode 100644 index 00000000000..07cbb3fdb49 --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/glibc-2.31-libsanitizer-2-gcc-7.patch @@ -0,0 +1,69 @@ +From 75003cdd23c310ec385344e8040d490e8dd6d2be Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek +Date: Fri, 20 Dec 2019 17:58:35 +0100 +Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm + bootstrap due to libsanitizer) + + Backported from mainline + 2019-11-26 Jakub Jelinek + Backported for version 7.1.0 <= gcc <= 7.4.0 + 2020-06-05 John L. Jolly + + PR sanitizer/92154 + * sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick + llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce. + * sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise. + +From-SVN: r279653 +--- + libsanitizer/ChangeLog | 10 ++++++++++ + .../sanitizer_platform_limits_posix.cc | 9 +++------ + .../sanitizer_platform_limits_posix.h | 15 +-------------- + 3 files changed, 14 insertions(+), 20 deletions(-) + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 06a605ff4670..d823a12190c0 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1156,12 +1156,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); +-#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \ +- !defined(__arm__) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ +-/* On Arm glibc 2.31 and later provide a different mode field, this field is +- never used by libsanitizer so we can simply ignore this assert for all glibc +- versions. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index 73af92af1e8f..6a673a7c9959 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -211,20 +211,13 @@ namespace __sanitizer { + unsigned long __unused1; + unsigned long __unused2; + #elif defined(__sparc__) +-# if defined(__arch64__) + unsigned mode; +- unsigned short __pad1; +-# else +- unsigned short __pad1; +- unsigned short mode; + unsigned short __pad2; +-# endif + unsigned short __seq; + unsigned long long __unused1; + unsigned long long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index aae26bfae9b..15ee2d79738 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -242,10 +242,13 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): patch('piclibs.patch', when='+piclibs') patch('gcc-backport.patch', when='@4.7:4.9.2,5:5.3') - # Backport libsanitizer patch for glibc >= 2.31 and 8.1.0 <= gcc <= 9.2.0 + # Backport libsanitizer patch for glibc >= 2.31 and 5.3.0 <= gcc <= 9.2.0 # https://bugs.gentoo.org/708346 - patch('glibc-2.31-libsanitizer-1.patch', when='@8.1.0:8.3.99,9.0.0:9.2.0') - patch('glibc-2.31-libsanitizer-2.patch', when='@8.1.0:8.3.99,9.0.0:9.2.0') + patch('glibc-2.31-libsanitizer-1.patch', when='@7.1.0:7.4.0,8.1.0:8.3.0,9.0.0:9.2.0') + patch('glibc-2.31-libsanitizer-1-gcc-6.patch', when='@5.3.0:5.5.0,6.1.0:6.5.0') + patch('glibc-2.31-libsanitizer-2.patch', when='@8.1.0:8.3.0,9.0.0:9.2.0') + patch('glibc-2.31-libsanitizer-2-gcc-6.patch', when='@5.3.0:5.5.0,6.1.0:6.5.0') + patch('glibc-2.31-libsanitizer-2-gcc-7.patch', when='@7.1.0:7.4.0') # Older versions do not compile with newer versions of glibc # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81712 patch('ucontext_t.patch', when='@4.9,5.1:5.4,6.1:6.4,7.1') From 543f9f91d4a4200cb653dd9c44588773e497f3b7 Mon Sep 17 00:00:00 2001 From: Matthieu Dorier Date: Sat, 6 Jun 2020 22:14:40 +0100 Subject: [PATCH 639/802] added CTRE package (#16964) --- .../repos/builtin/packages/ctre/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ctre/package.py diff --git a/var/spack/repos/builtin/packages/ctre/package.py b/var/spack/repos/builtin/packages/ctre/package.py new file mode 100644 index 00000000000..2dc188b7756 --- /dev/null +++ b/var/spack/repos/builtin/packages/ctre/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack import * + + +class Ctre(CMakePackage): + """Compile time regular expressions for C++""" + + homepage = 'https://compile-time.re/' + url = 'https://github.com/hanickadot/compile-time-regular-expressions/archive/v2.8.3.tar.gz' + git = 'https://github.com/hanickadot/compile-time-regular-expressions.git' + + version('master', branch='master') + version('2.8.4', sha256='99b981857f1b66cab5e71161ae74deca268ed39a96ec6507def92d4f445cadd6') + version('2.8.3', sha256='5833a9d0fbce39ee39bd6e29df2f7fcafc82e41c373e8675ed0774bcf76fdc7a') + version('2.8.2', sha256='f89494f52ec31e5854fff3d2c5825474201476636c5d82a9365dad5188396314') + version('2.8.1', sha256='a6153629751ba0adc039551d8ff8d7018972ce362d20c0f70135496d4e7721df') + version('2.8', sha256='44ccdaa299dd43c351f208c5906422eb000e7cdcb53e4f3b7c7c094d0461ab2c') + version('2.7', sha256='ccbf42515b27d542cd36104eb9548f288b0c1989cb584a518900ba1ca3619e12') + version('2.6.4', sha256='ce216cfae0e7e1e8c7d7531cfcf81fa18f9bdbfcb800a3119788ca323bedbdac') + version('2.6.3', sha256='bdf668b02f0b986dfc0fbc6066f446e2d0a9faa3347f00f53b19131297c84c4a') + version('2.6.2', sha256='e82c87aeb0fc3f21ae8a2d3ffce2b1ef970fbea9c3e846ef1a6e5f81790f2946') + version('2.6.1', sha256='58c623d9ea1cb7890aaa63c1a87f1a60a8acf31dbd4061ab672bea287ed689ac') From ad2dd4be01d7caae69455ff61d5e006efab83e30 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 6 Jun 2020 23:18:48 +0200 Subject: [PATCH 640/802] mongo-c-driver: Add 1.16.2 (#16956) This also updates libbson to the corresponding version and adds a few missing older versions. --- .../repos/builtin/packages/libbson/package.py | 51 ++++++++++++- .../packages/mongo-c-driver/package.py | 75 +++++++++++++++++-- 2 files changed, 116 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/libbson/package.py b/var/spack/repos/builtin/packages/libbson/package.py index 9f9a1138847..e71cb2eb085 100644 --- a/var/spack/repos/builtin/packages/libbson/package.py +++ b/var/spack/repos/builtin/packages/libbson/package.py @@ -6,15 +6,19 @@ from spack import * -class Libbson(AutotoolsPackage): +class Libbson(Package): """libbson is a library providing useful routines related to building, parsing, and iterating BSON documents.""" - homepage = "https://github.com/mongodb/libbson" - url = "https://github.com/mongodb/libbson/releases/download/1.7.0/libbson-1.7.0.tar.gz" + homepage = "https://github.com/mongodb/mongo-c-driver" + url = "https://github.com/mongodb/mongo-c-driver/releases/download/1.16.2/mongo-c-driver-1.16.2.tar.gz" maintainers = ['michaelkuhn'] + version('1.16.2', sha256='0a722180e5b5c86c415b9256d753b2d5552901dc5d95c9f022072c3cd336887e') + version('1.9.5', sha256='6bb51b863a4641d6d7729e4b55df8f4389ed534c34eb3a1cda906a53df11072c') + version('1.9.4', sha256='c3cc230a3451bf7fedc5bb34c3191fd23d841e65ec415301f6c77e531924b769') + version('1.9.3', sha256='244e786c746fe6326433b1a6fcaadbdedc0da3d11c7b3168f0afa468f310e5f1') version('1.9.1', sha256='236d9fcec0fe419c2201481081e497f49136eda2349b61cfede6233013bf7601') version('1.8.1', sha256='9d18d14671b7890e27b2a5ce33a73a5ed5d33d39bba70209bae99c1dc7aa1ed4') version('1.8.0', sha256='63dea744b265a2e17c7b5e289f7803c679721d98e2975ea7d56bc1e7b8586bc1') @@ -23,12 +27,53 @@ class Libbson(AutotoolsPackage): version('1.6.2', sha256='aad410123e4bd8a9804c3c3d79e03344e2df104872594dc2cf19605d492944ba') version('1.6.1', sha256='5f160d44ea42ce9352a7a3607bc10d3b4b22d3271763aa3b3a12665e73e3a02d') + depends_on('cmake@3.1:', type='build', when='@1.10.0:') + depends_on('autoconf', type='build', when='@1.6.1') depends_on('automake', type='build', when='@1.6.1') depends_on('libtool', type='build', when='@1.6.1') depends_on('m4', type='build', when='@1.6.1') + def url_for_version(self, version): + if version >= Version('1.10.0'): + url = 'https://github.com/mongodb/mongo-c-driver/releases/download/{0}/mongo-c-driver-{0}.tar.gz' + else: + url = 'https://github.com/mongodb/libbson/releases/download/{0}/libbson-{0}.tar.gz' + + return url.format(version) + + def cmake_args(self): + args = [ + '-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF', + '-DENABLE_MONGOC=OFF' + ] + + return args + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + # We cannot simply do + # cmake('..', *std_cmake_args, *self.cmake_args()) + # because that is not Python 2 compatible. Instead, collect + # arguments into a temporary buffer first. + args = [] + args.extend(std_cmake_args) + args.extend(self.cmake_args()) + cmake('..', *args) + make() + make('install') + @property def force_autoreconf(self): # 1.6.1 tarball is broken return self.spec.satisfies('@1.6.1') + + @when('@:1.9.99') + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + make() + if self.run_tests: + make('check') + make('install') + if self.run_tests: + make('installcheck') diff --git a/var/spack/repos/builtin/packages/mongo-c-driver/package.py b/var/spack/repos/builtin/packages/mongo-c-driver/package.py index 27008d7561a..ee3fc581b9d 100644 --- a/var/spack/repos/builtin/packages/mongo-c-driver/package.py +++ b/var/spack/repos/builtin/packages/mongo-c-driver/package.py @@ -6,7 +6,7 @@ from spack import * -class MongoCDriver(AutotoolsPackage): +class MongoCDriver(Package): """libmongoc is a client library written in C for MongoDB.""" homepage = "https://github.com/mongodb/mongo-c-driver" @@ -14,6 +14,7 @@ class MongoCDriver(AutotoolsPackage): maintainers = ['michaelkuhn'] + version('1.16.2', sha256='0a722180e5b5c86c415b9256d753b2d5552901dc5d95c9f022072c3cd336887e') version('1.9.5', sha256='4a4bd0b0375450250a3da50c050b84b9ba8950ce32e16555714e75ebae0b8019') version('1.9.4', sha256='910c2f1b2e3df4d0ea39c2f242160028f90fcb8201f05339a730ec4ba70811fb') version('1.9.3', sha256='c2c94ef63aaa09efabcbadc4ac3c8740faa102266bdd2559d550f1955b824398') @@ -28,20 +29,73 @@ class MongoCDriver(AutotoolsPackage): variant('ssl', default=True, description='Enable SSL support.') variant('snappy', default=True, description='Enable Snappy support.') variant('zlib', default=True, description='Enable zlib support.') + variant('zstd', default=True, description='Enable zstd support.') patch('https://github.com/mongodb/mongo-c-driver/pull/466.patch', sha256='713a872217d11aba04a774785a2824d26b566543c270a1fa386114f5200fda20', when='@1.8.1') + depends_on('cmake@3.1:', type='build', when='@1.10.0:') + depends_on('autoconf', type='build', when='@1.8.1') depends_on('automake', type='build', when='@1.8.1') depends_on('libtool', type='build', when='@1.8.1') depends_on('m4', type='build', when='@1.8.1') + depends_on('pkgconfig', type='build') - depends_on('libbson') + # When updating mongo-c-driver, libbson has to be kept in sync. + depends_on('libbson@1.16.0:1.16.99', when='@1.16') + depends_on('libbson@1.9.0:1.9.99', when='@1.9') + depends_on('libbson@1.8.0:1.8.99', when='@1.8') + depends_on('libbson@1.7.0:1.7.99', when='@1.7') + depends_on('libbson@1.6.0:1.6.99', when='@1.6') depends_on('openssl', when='+ssl') depends_on('snappy', when='+snappy') depends_on('zlib', when='+zlib') + depends_on('zstd', when='+zstd') + + def cmake_args(self): + spec = self.spec + + args = [ + '-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF', + '-DENABLE_BSON=SYSTEM' + ] + + if '+ssl' in spec: + args.append('-DENABLE_SSL=OPENSSL') + else: + args.append('-DENABLE_SSL=OFF') + + if '+snappy' in spec: + args.append('-DENABLE_SNAPPY=ON') + else: + args.append('-DENABLE_SNAPPY=OFF') + + if '+zlib' in spec: + args.append('-DENABLE_ZLIB=SYSTEM') + else: + args.append('-DENABLE_ZLIB=OFF') + + if '+zstd' in spec: + args.append('-DENABLE_ZSTD=ON') + else: + args.append('-DENABLE_ZSTD=OFF') + + return args + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + # We cannot simply do + # cmake('..', *std_cmake_args, *self.cmake_args()) + # because that is not Python 2 compatible. Instead, collect + # arguments into a temporary buffer first. + args = [] + args.extend(std_cmake_args) + args.extend(self.cmake_args()) + cmake('..', *args) + make() + make('install') @property def force_autoreconf(self): @@ -52,7 +106,8 @@ def configure_args(self): spec = self.spec args = [ - '--disable-automatic-init-and-cleanup' + '--disable-automatic-init-and-cleanup', + '--with-libbson=system' ] if '+ssl' in spec: @@ -72,8 +127,14 @@ def configure_args(self): elif spec.satisfies('@1.8.1:'): args.append('--with-zlib=system') - if spec.satisfies('@1.9.3:'): - args.append('--with-libbson=auto') - else: - args.append('--with-libbson=system') return args + + @when('@:1.9.99') + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix), *self.configure_args()) + make() + if self.run_tests: + make('check') + make('install') + if self.run_tests: + make('installcheck') From 8f291c7e9545212d3d8688926b82fc8ec8a1ad13 Mon Sep 17 00:00:00 2001 From: vvolkl Date: Sat, 6 Jun 2020 23:29:42 +0200 Subject: [PATCH 641/802] [prmon] add package (#16949) --- .../repos/builtin/packages/prmon/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/prmon/package.py diff --git a/var/spack/repos/builtin/packages/prmon/package.py b/var/spack/repos/builtin/packages/prmon/package.py new file mode 100644 index 00000000000..4ae90c2531c --- /dev/null +++ b/var/spack/repos/builtin/packages/prmon/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * + + +class Prmon(CMakePackage): + """Standalone monitor for process resource consumption.""" + + homepage = "https://github.com/HSF/prmon/" + url = "https://github.com/HSF/prmon/archive/v1.1.1.tar.gz" + git = "https://github.com/HSF/prmon.git" + + maintainers = ['vvolkl'] + + version("master", branch="master") + version('1.1.1', sha256='5f074b05af2a12e2726c33f6a6e9e8e59ee0c4fb5fe056deb38abacd1bb6bf03') + + variant('plot', default=True, + description='Make use of plotting scripts') + + depends_on('nlohmann-json') + depends_on('cmake@3.3:', type="build") + depends_on('py-matplotlib', type="run", when="+plot") From 7bc44fa1651df7570060b8d3f4bd60592248a562 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Sun, 7 Jun 2020 06:30:43 +0900 Subject: [PATCH 642/802] ffr: fix mpi programs to use mpi compiler wrapper. (#16948) --- var/spack/repos/builtin/packages/ffr/package.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/ffr/package.py b/var/spack/repos/builtin/packages/ffr/package.py index bd3c8258d1a..35ac20f9f6a 100644 --- a/var/spack/repos/builtin/packages/ffr/package.py +++ b/var/spack/repos/builtin/packages/ffr/package.py @@ -42,7 +42,8 @@ def edit(self, spec, prefix): elif spec.satisfies('%fj'): fflags.append('-Fwide') d = find('.', 'src_main', recursive=True) - root_dir = os.path.dirname(d[0]) + src_main = d[0] + root_dir = os.path.dirname(src_main) make = join_path(root_dir, 'src_pre', 'src', 'Makefile') os.chmod(make, 0o644) filter_file('#CSRCS =.*$', 'CSRCS = kmetis_main.c io.c', make) @@ -51,9 +52,17 @@ def edit(self, spec, prefix): 'LIBPRE = ' + spec['metis'].libs.ld_flags, make ) + + make = join_path(src_main, 'src', 'Makefile') + os.chmod(make, 0o644) + with open(make, 'a') as m: + m.write('module_hpc.o: module_hpc.f\n') + m.write('\t$(MPI_F90) $(FFLAGS) -c $<\n') + m.write('\n') + m.write('hpc.o: hpc.f\n') + m.write('\t$(MPI_F90) $(FFLAGS) -c $<\n') + if spec.satisfies('@3.0_000'): - d = find('.', 'src_main', recursive=True) - root_dir = os.path.dirname(d[0]) for d in ['src_pre', 'FFR2VIZ']: workdir = join_path(root_dir, d, 'src') make = join_path(workdir, 'Makefile') From 6498b752d1dcc030c7045c6d1c4c77141ca07985 Mon Sep 17 00:00:00 2001 From: iarspider Date: Sat, 6 Jun 2020 23:33:34 +0200 Subject: [PATCH 643/802] Add rpy2@3.0.4 (#16924) * Add rpy2@3.0.4 * Style fixes * Update package.py * Proper Python version requirement --- .../repos/builtin/packages/py-rpy2/package.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-rpy2/package.py b/var/spack/repos/builtin/packages/py-rpy2/package.py index d3578c2cc23..ef9b847b00e 100644 --- a/var/spack/repos/builtin/packages/py-rpy2/package.py +++ b/var/spack/repos/builtin/packages/py-rpy2/package.py @@ -16,6 +16,7 @@ class PyRpy2(PythonPackage): homepage = "https://pypi.python.org/pypi/rpy2" url = "https://pypi.io/packages/source/r/rpy2/rpy2-2.5.4.tar.gz" + version('3.0.4', sha256='2af5158a5d56af7f7bf5e54d8d7e87b6f115ff40f056d82f93cad0cbf6acc0cb') version('3.0.0', sha256='34efc2935d9015527837d6b1de29641863d184b19d39ad415d5384be8a015bce') version('2.9.4', sha256='be57f741d0c284b5d8785ab03dff0e829303e5ac30e548d5ceb46e05b168812e') version('2.8.6', sha256='004d13734a7b9a85cbc1e7a93ec87df741e28db1273ab5b0d9efaac04a9c5f98') @@ -30,12 +31,18 @@ class PyRpy2(PythonPackage): depends_on('py-setuptools', type='build') depends_on('r', type=('build', 'run')) + # @3.0.0: + depends_on('py-cffi@1.0.0:', when='@3.0.0:', type=('build', 'run')) + depends_on('py-simplegeneric', when='@3.0.0:', type=('build', 'run')) + depends_on('py-pytest', when='@3:', type=('build', 'run')) + # @2.9.0: - depends_on('r@3.3:', when='@2.9.0:', type=('build', 'run')) - depends_on('python@3:', when='@2.9.0:', type=('build', 'run')) - depends_on('py-jinja2', when='@2.9.0:', type=('build', 'run')) - depends_on('py-six', when='@2.9.0:', type=('build', 'run')) + depends_on('r@3.3:', when='@2.9.0:', type=('build', 'run')) + depends_on('python@3.5:', when='@2.9.0:', type=('build', 'run')) + depends_on('py-jinja2', when='@2.9.0:', type=('build', 'run')) + depends_on('py-six', when='@2.9.0:2.9.999', type=('build', 'run')) # @:2.8.6 - depends_on('r@2.8:', when='@:2.8.6', type=('build', 'run')) + depends_on('r@2.8:', when='@:2.8.6', type=('build', 'run')) depends_on('py-singledispatch', when='^python@:2', type=('build', 'run')) + depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) From a2c6f6a703e577011bea6fdd97eca580a379d9b1 Mon Sep 17 00:00:00 2001 From: Sinan Date: Sun, 7 Jun 2020 07:33:03 -0700 Subject: [PATCH 644/802] py-gast: add version 0.3.3 (#16945) * py-gast: add version 0.3.3 * add python version constraints Co-authored-by: Sinan81 --- var/spack/repos/builtin/packages/py-gast/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-gast/package.py b/var/spack/repos/builtin/packages/py-gast/package.py index c7730e1e28a..c69b9bc4758 100644 --- a/var/spack/repos/builtin/packages/py-gast/package.py +++ b/var/spack/repos/builtin/packages/py-gast/package.py @@ -12,8 +12,10 @@ class PyGast(PythonPackage): homepage = "https://github.com/serge-sans-paille/gast" url = "https://pypi.io/packages/source/g/gast/gast-0.3.2.tar.gz" + version('0.3.3', sha256='b881ef288a49aa81440d2c5eb8aeefd4c2bb8993d5f50edae7413a85bfdb3b57') version('0.3.2', sha256='5c7617f1f6c8b8b426819642b16b9016727ddaecd16af9a07753e537eba8a3a5') version('0.2.2', sha256='fe939df4583692f0512161ec1c880e0a10e71e6a232da045ab8edd3756fbadf0') version('0.2.0', sha256='7068908321ecd2774f145193c4b34a11305bd104b4551b09273dfd1d6a374930') depends_on('py-setuptools', type='build') + depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) From 33923320a82dee1446999b3a55ce21a2b2cd81f3 Mon Sep 17 00:00:00 2001 From: John Jolly Date: Sun, 7 Jun 2020 08:36:14 -0600 Subject: [PATCH 645/802] rose: Add build dependencies for flex and bison (#16981) --- var/spack/repos/builtin/packages/rose/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/rose/package.py b/var/spack/repos/builtin/packages/rose/package.py index 326da4854bb..0255230da10 100644 --- a/var/spack/repos/builtin/packages/rose/package.py +++ b/var/spack/repos/builtin/packages/rose/package.py @@ -62,6 +62,8 @@ class Rose(AutotoolsPackage): depends_on("autoconf@2.69:", type="build") depends_on("automake@1.14:", type="build") depends_on("libtool@2.4:", type="build") + depends_on("flex@2.6.4:", type="build") + depends_on("bison@3.4.2:", type="build") # C++11 compatible boost and gcc versions required for +cxx11 variant: depends_on("boost@1.60.0:1.64.0,1.65.1,1.66.0:1.67.0 cxxstd=11", when="+cxx11") From b00f97f7cc6ed4be26e7adb470b163cb0e26082c Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Sun, 7 Jun 2020 23:39:53 +0900 Subject: [PATCH 646/802] boost: Don't use pre-compiled headers for Fujitsu compiler (#16914) * boost: Dopn't use pre compile header. * move %fj. --- var/spack/repos/builtin/packages/boost/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index aa4768e9548..bcdec30ae99 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -398,7 +398,7 @@ def determine_b2_options(self, spec, options): # and at least in clang 3.9 still fails to build # http://www.boost.org/build/doc/html/bbv2/reference/precompiled_headers.html # https://svn.boost.org/trac/boost/ticket/12496 - if spec.satisfies('%clang'): + if spec.satisfies('%clang') or spec.satisfies('%fj'): options.extend(['pch=off']) if '+clanglibcpp' in spec: cxxflags.append('-stdlib=libc++') From 664c32efb490260e3fd2d06864c39000354c5a93 Mon Sep 17 00:00:00 2001 From: iarspider Date: Mon, 8 Jun 2020 06:11:24 +0200 Subject: [PATCH 647/802] py-ipykernel: added v5.1.1 (#16988) --- var/spack/repos/builtin/packages/py-ipykernel/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-ipykernel/package.py b/var/spack/repos/builtin/packages/py-ipykernel/package.py index f6ce9facb10..e2f9d919171 100644 --- a/var/spack/repos/builtin/packages/py-ipykernel/package.py +++ b/var/spack/repos/builtin/packages/py-ipykernel/package.py @@ -12,6 +12,7 @@ class PyIpykernel(PythonPackage): homepage = "https://pypi.python.org/pypi/ipykernel" url = "https://github.com/ipython/ipykernel/archive/4.5.0.tar.gz" + version('5.1.1', sha256='a735d3df42e76e8176849dcc8d7746eda80b7768e8f1b38cd9aa6cabfd28baf5') version('5.1.0', sha256='30f01a2a1470d3fabbad03f5c43606c1bc2142850fc4ccedcf44281664ae9122') version('4.10.0', sha256='df2714fd0084085ed68876f75ab846202d261420b5f4069af6335b8df0475391') version('4.5.0', sha256='c5ec5130f5f7eda71345b9ef638c9213c4c2f41610a9ad338a0f1d0819421adf') From 763760cfe0fea5d0a1e4e1a5a478ee5d65d2a65e Mon Sep 17 00:00:00 2001 From: "Mark W. Krentel" Date: Sun, 7 Jun 2020 23:15:37 -0500 Subject: [PATCH 648/802] hpcviewer, ibm-java: updates versions (#16987) hpcviewer: added v2020.05. ibm-java: added v8.0.6.10. --- var/spack/repos/builtin/packages/hpcviewer/package.py | 6 ++++++ var/spack/repos/builtin/packages/ibm-java/package.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/hpcviewer/package.py b/var/spack/repos/builtin/packages/hpcviewer/package.py index 5399e42f6c8..f14f55d7876 100644 --- a/var/spack/repos/builtin/packages/hpcviewer/package.py +++ b/var/spack/repos/builtin/packages/hpcviewer/package.py @@ -37,6 +37,9 @@ class Hpcviewer(Package): maintainers = ['mwkrentel'] viewer_sha = { + ('2020.05', 'x86_64'): '27f99c94a69abd005303fb58360b0d1b3eb7d223cab81c38ae6ccdd83ec15106', + ('2020.05', 'ppc64'): '469bce07a75476c132d3791ca49e38db015917c9c36b4810e477bc1c54a13d68', + ('2020.05', 'ppc64le'): 'fc4491bf6d9eaf2b7f2d39b722c978597a881ece557fb05a4cf27caabb9e0b99', ('2020.04', 'x86_64'): '5944c7b1e518b25d143df72b06a69cffb0bfc92186eb5efee2178fc2814a0b8b', ('2020.04', 'ppc64'): 'ba60615a550aa77a17eb94272b62365a22298cebc6dc2cb7463686741e58d874', ('2020.04', 'ppc64le'): '128494077979b447875ed730f1e8c5470fafcd52ae6debe61625031248d91f7c', @@ -67,6 +70,9 @@ class Hpcviewer(Package): } trace_sha = { + ('2020.05', 'x86_64'): 'a0b925099a00c10fcb38e937068e50937175fd46dc086121525e546a63a7fd83', + ('2020.05', 'ppc64'): '40526f62f36e5b6438021c2b557256638d41a6b8f4e101534b5230ac644a9b85', + ('2020.05', 'ppc64le'): 'c16e83b59362adcebecd4231374916a2b3a3c016f75a45b24e8398f777a24f89', ('2020.04', 'x86_64'): '695f7a06479c2b6958a6ebc3985b7ed777e7e126c04424ce980b224690f769f3', ('2020.04', 'ppc64'): '78cfadaf7bc6130cc4257241499b36f4f1c47f22d0daa29f5e733ca824a87b3c', ('2020.04', 'ppc64le'): '28c225023accbc85a19c6d8fdcc14dae64a475ed5de2b94f18e58aab4edd2c09', diff --git a/var/spack/repos/builtin/packages/ibm-java/package.py b/var/spack/repos/builtin/packages/ibm-java/package.py index b2de7b1f159..72739240d5d 100644 --- a/var/spack/repos/builtin/packages/ibm-java/package.py +++ b/var/spack/repos/builtin/packages/ibm-java/package.py @@ -22,6 +22,8 @@ class IbmJava(Package): # not be available for download. version_list = [ + ('8.0.6.10', 'ppc64', 'ff5151ead88f891624eefe33d80d56c325ca0aa4b93bd96c135cad326993eda2'), + ('8.0.6.10', 'ppc64le', 'ea99ab28dd300b08940882d178247e99aafe5a998b1621cf288dfb247394e067'), ('8.0.6.7', 'ppc64', 'a1accb461a039af4587ea86511e317fea1d423e7f781459a17ed3947afed2982'), ('8.0.6.7', 'ppc64le', '9ede76a597af28c7f10c6f8a68788cc2dcd39fdab178c9bac56df8b3766ac717'), ('8.0.6.0', 'ppc64', 'e142746a83e47ab91d71839d5776f112ed154ae180d0628e3f10886151dad710'), From bd1a0a9ad4c9ac19a50c60f75aba6588c8ccfe6c Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Sun, 7 Jun 2020 21:43:52 -0700 Subject: [PATCH 649/802] view remove: directly check whether specs own files before removing from view (#16955) Bugfix for hardlinks and copies --- lib/spack/spack/filesystem_view.py | 34 ++++++++++++++++--- lib/spack/spack/test/cmd/view.py | 15 ++++++++ .../packages/needs-relocation/package.py | 28 +++++++++++++++ 3 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 var/spack/repos/builtin.mock/packages/needs-relocation/package.py diff --git a/lib/spack/spack/filesystem_view.py b/lib/spack/spack/filesystem_view.py index f4d77a694bc..0f21e4d975d 100644 --- a/lib/spack/spack/filesystem_view.py +++ b/lib/spack/spack/filesystem_view.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import filecmp import functools as ft import os import re @@ -18,6 +17,7 @@ mkdirp, remove_dead_links, remove_empty_directories) import spack.util.spack_yaml as s_yaml +import spack.util.spack_json as s_json import spack.spec import spack.store @@ -411,10 +411,34 @@ def remove_file(self, src, dest): if not os.path.lexists(dest): tty.warn("Tried to remove %s which does not exist" % dest) return - # remove if dest is a hardlink/symlink to src; this will only - # be false if two packages are merged into a prefix and have a - # conflicting file - if filecmp.cmp(src, dest, shallow=True): + + def needs_file(spec, file): + # convert the file we want to remove to a source in this spec + projection = self.get_projection_for_spec(spec) + relative_path = os.path.relpath(file, projection) + test_path = os.path.join(spec.prefix, relative_path) + + # check if this spec owns a file of that name (through the + # manifest in the metadata dir, which we have in the view). + manifest_file = os.path.join(self.get_path_meta_folder(spec), + spack.store.layout.manifest_file_name) + try: + with open(manifest_file, 'r') as f: + manifest = s_json.load(f) + except (OSError, IOError): + # if we can't load it, assume it doesn't know about the file. + manifest = {} + return test_path in manifest + + # remove if dest is not owned by any other package in the view + # This will only be false if two packages are merged into a prefix + # and have a conflicting file + + # check all specs for whether they own the file. That include the spec + # we are currently removing, as we remove files before unlinking the + # metadata directory. + if len([s for s in self.get_all_specs() + if needs_file(s, dest)]) <= 1: os.remove(dest) def check_added(self, spec): diff --git a/lib/spack/spack/test/cmd/view.py b/lib/spack/spack/test/cmd/view.py index d908248a19b..4ff15920357 100644 --- a/lib/spack/spack/test/cmd/view.py +++ b/lib/spack/spack/test/cmd/view.py @@ -40,6 +40,21 @@ def test_view_link_type( assert os.path.islink(package_prefix) == is_link_cmd +@pytest.mark.parametrize('add_cmd', ['hardlink', 'symlink', 'hard', 'add', + 'copy', 'relocate']) +def test_view_link_type_remove( + tmpdir, mock_packages, mock_archive, mock_fetch, config, + install_mockery, add_cmd): + install('needs-relocation') + viewpath = str(tmpdir.mkdir('view_{0}'.format(add_cmd))) + view(add_cmd, viewpath, 'needs-relocation') + bindir = os.path.join(viewpath, 'bin') + assert os.path.exists(bindir) + + view('remove', viewpath, 'needs-relocation') + assert not os.path.exists(bindir) + + @pytest.mark.parametrize('cmd', ['hardlink', 'symlink', 'hard', 'add', 'copy', 'relocate']) def test_view_projections( diff --git a/var/spack/repos/builtin.mock/packages/needs-relocation/package.py b/var/spack/repos/builtin.mock/packages/needs-relocation/package.py new file mode 100644 index 00000000000..681a8a53ed4 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/needs-relocation/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +def check(condition, msg): + """Raise an install error if condition is False.""" + if not condition: + raise InstallError(msg) + + +class NeedsRelocation(Package): + """A dumy package that encodes its prefix.""" + homepage = 'https://www.cmake.org' + url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz' + + version('0.0.0', '12345678qwertyuiasdfghjkzxcvbnm0') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + + exe = join_path(prefix.bin, 'exe') + with open(exe, 'w') as f: + f.write(prefix) + set_executable(exe) From d9738f569d3eb32d745da4153fbdeeebb14434d9 Mon Sep 17 00:00:00 2001 From: Justin S <3630356+codeandkey@users.noreply.github.com> Date: Mon, 8 Jun 2020 01:07:34 -0500 Subject: [PATCH 650/802] ltr-retriever: new package at v2.8.7 (#16832) Co-authored-by: Adam J. Stewart --- .../builtin/packages/ltr-retriever/package.py | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ltr-retriever/package.py diff --git a/var/spack/repos/builtin/packages/ltr-retriever/package.py b/var/spack/repos/builtin/packages/ltr-retriever/package.py new file mode 100644 index 00000000000..2cc7f0a2319 --- /dev/null +++ b/var/spack/repos/builtin/packages/ltr-retriever/package.py @@ -0,0 +1,45 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +from os import symlink + + +class LtrRetriever(Package): + """LTR_retriever is a highly accurate and sensitive program for + identification of LTR retrotransposons.""" + + homepage = "https://github.com/oushujun/LTR_retriever" + url = "https://github.com/oushujun/LTR_retriever/archive/v2.8.7.tar.gz" + + version('2.8.7', sha256='29ca6f699c57b5e964aa0ee6c7d3e1e4cd5362dadd789e5f0e8c82fe0bb29369') + + depends_on('perl', type='run') + depends_on('blast-plus', type='run') + depends_on('hmmer@3.1b2:', type='run') + depends_on('cdhit', type='run') + depends_on('repeatmasker', type='run') + + def install(self, spec, prefix): + filter_file(r'BLAST\+=.*', 'BLAST+=%s' % spec['blast-plus'].prefix.bin, + 'paths') + filter_file('RepeatMasker=.*', + 'RepeatMasker=%s' % spec['repeatmasker'].prefix.bin, + 'paths') + filter_file('HMMER=.*', + 'HMMER=%s' % spec['hmmer'].prefix.bin, + 'paths') + filter_file('CDHIT=.*', + 'CDHIT=%s' % spec['cdhit'].prefix, + 'paths') + filter_file('BLAST=.*', '', 'paths') + + mkdirp(prefix.opt) + mkdirp(prefix.bin) + + install_tree('.', prefix.opt.ltr_retriever) + + symlink(prefix.opt.ltr_retriever.LTR_retriever, + prefix.bin.LTR_retriever) From 3ea65818e1827835864c6c073175eb5edf7b4213 Mon Sep 17 00:00:00 2001 From: iarspider Date: Mon, 8 Jun 2020 14:09:48 +0200 Subject: [PATCH 651/802] Add py-storm@0.23 and update URL (#16991) * Add py-storm@0.23 and update URL * Update package.py --- var/spack/repos/builtin/packages/py-storm/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-storm/package.py b/var/spack/repos/builtin/packages/py-storm/package.py index dae4a9941d7..64a631b2009 100644 --- a/var/spack/repos/builtin/packages/py-storm/package.py +++ b/var/spack/repos/builtin/packages/py-storm/package.py @@ -9,8 +9,12 @@ class PyStorm(PythonPackage): """Storm is an object-relational mapper (ORM) for Python""" homepage = "https://storm.canonical.com/" - url = "https://launchpad.net/storm/trunk/0.20/+download/storm-0.20.tar.gz" + url = "https://launchpad.net/storm/trunk/0.20/+download/storm-0.20.tar.bz2" - version('0.20', sha256='0fa70043bb1a1c178c2f760db35f5956244cecf50dab7fb22d78be7507726603') + version('0.23', sha256='01c59f1c898fb9891333abd65519ba2dd5f68623ac8e67b54932e99ce52593d3') + version('0.20', sha256='1fe016c9ec40520eafc3cf359f1ec2b7fa86be91e45c9279bfb0ea3b06390a82') depends_on('py-setuptools', type='build') + depends_on('py-six', when='@0.23:') + depends_on('python@2.7:2.8', when='@:0.20') + depends_on('python@2.7:2.8,3.5:', when='@0.21:') From c76ab4d8fefedc5b4499912a76fed720721dcb17 Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Mon, 8 Jun 2020 15:28:21 +0200 Subject: [PATCH 652/802] R: url-version custom, release 4 (#16962) * R: url-version custom, release 4 * r: pcre condition --- var/spack/repos/builtin/packages/r/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py index 7c6807e3e71..e28ae117391 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -21,6 +21,7 @@ class R(AutotoolsPackage): extendable = True + version('4.0.0', sha256='06beb0291b569978484eb0dcb5d2339665ec745737bdfb4e873e7a5a75492940') version('3.6.3', sha256='89302990d8e8add536e12125ec591d6951022cf8475861b3690bc8bf1cefaa8f') version('3.6.2', sha256='bd65a45cddfb88f37370fbcee4ac8dd3f1aebeebe47c2f968fd9770ba2bbc954') version('3.6.1', sha256='5baa9ebd3e71acecdcc3da31d9042fb174d55a42829f8315f2457080978b1389') @@ -81,7 +82,8 @@ class R(AutotoolsPackage): depends_on('libxt', when='+X') depends_on('libxmu', when='+X') depends_on('curl') - depends_on('pcre') + depends_on('pcre2', when='@4:') + depends_on('pcre', when='@:3.6.3') depends_on('java') patch('zlib.patch', when='@:3.3.2') @@ -92,6 +94,12 @@ class R(AutotoolsPackage): # temporary fix to lower the optimization level. patch('change_optflags_tmp.patch', when='%fj@4.1.0') + # R custom URL version + def url_for_version(self, version): + """Handle R's customed URL versions""" + url = 'https://cloud.r-project.org/src/base' + return url + '/R-%s/R-%s.tar.gz' % (version.up_to(1), version) + filter_compiler_wrappers( 'Makeconf', relative_root=os.path.join('rlib', 'R', 'etc') ) From 8995b3ad3a3e38edb51378706af0e8f98444f038 Mon Sep 17 00:00:00 2001 From: vvolkl Date: Mon, 8 Jun 2020 15:30:23 +0200 Subject: [PATCH 653/802] Add Package HSF-CMakeTools (#16951) * [hsf-cmaketools] add package * fix formatting * Apply suggestions from code review Co-authored-by: Adam J. Stewart * [hsf-cmaketools] remove cmake_prefix_path which is set already by spack Co-authored-by: Adam J. Stewart --- .../packages/hsf-cmaketools/package.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 var/spack/repos/builtin/packages/hsf-cmaketools/package.py diff --git a/var/spack/repos/builtin/packages/hsf-cmaketools/package.py b/var/spack/repos/builtin/packages/hsf-cmaketools/package.py new file mode 100644 index 00000000000..78053515098 --- /dev/null +++ b/var/spack/repos/builtin/packages/hsf-cmaketools/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class HsfCmaketools(Package): + """CMake 'Find' modules for commonly used HEP Packages""" + + homepage = "https://github.com/HSF/cmaketools/" + url = "https://github.com/HSF/cmaketools/archive/1.8.tar.gz" + git = "https://github.com/HSF/cmaketools.git" + + maintainers = ['vvolkl'] + + version('master', branch='master') + version('1.8', sha256='91af30f5701dadf80a5d7e0d808c224c934f0784a3aff2d3b69aff24f7e1db41') + + # this package only needs to be installed in CMAKE_PREFIX_PATH + # which is set by spack + def install(self, spec, prefix): + mkdir(prefix.modules) + install_tree('modules', prefix.modules) + install("CMakeToolsConfig.cmake", prefix) From f8b5e413b46350f25bd7d231a8102c706fbf34f8 Mon Sep 17 00:00:00 2001 From: darmac Date: Mon, 8 Jun 2020 21:33:40 +0800 Subject: [PATCH 654/802] Add new package: py-devlib (#16982) * Add new package: py-devlib * Update var/spack/repos/builtin/packages/py-devlib/package.py Co-authored-by: Adam J. Stewart * add depends Co-authored-by: Adam J. Stewart --- .../builtin/packages/py-devlib/package.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-devlib/package.py diff --git a/var/spack/repos/builtin/packages/py-devlib/package.py b/var/spack/repos/builtin/packages/py-devlib/package.py new file mode 100644 index 00000000000..5a9bb49486c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-devlib/package.py @@ -0,0 +1,34 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyDevlib(PythonPackage): + """Library for interaction with and instrumentation of remote devices.""" + + homepage = "https://github.com/ARM-software/devlib" + url = "https://github.com/ARM-software/devlib/archive/v1.2.tar.gz" + + version('1.2', sha256='4cdb6767a9430b49eecffe34e2b9fcbcfc7e65328122d909aa71c3d11a86503d') + version('1.1.2', sha256='c900420cb97239b4642f5e333e43884fb09507b530edb55466e7b82103b4deaa') + version('1.1.1', sha256='eceb7a2721197a6023bbc2bbf346663fc117e4f54e1eb8334a3085dead9c8036') + version('1.1.0', sha256='317e9be2303ebb6aebac9a2ec398c622ea16d6e46079dc9e37253b37d739ca9d') + version('1.0.0', sha256='2f78278bdc9731a4fa13c41c74f08e0b8c5143de5fa1e1bdb2302673aec45862') + version('0.0.4', sha256='0f55e684d43fab759d0e74bd8f0d0260d9546a8b8d853d286acfe5e00c86da05') + version('0.0.3', sha256='29ec5f1de481783ab0b9efc111dfeb67c890187d56fca8592b25ee756ff32902') + version('0.0.2', sha256='972f33be16a06572a19b67d909ee0ed6cb6f21f9a9da3c43fd0ff5851421051d') + + depends_on('py-setuptools', type='build') + depends_on('py-python-dateutil', type=('build', 'run')) + depends_on('py-pexpect@3.3:', type=('build', 'run')) + depends_on('py-pyserial', type=('build', 'run')) + depends_on('py-wrapt', type=('build', 'run')) + depends_on('py-future', type=('build', 'run')) + depends_on('py-pandas', type=('build', 'run')) + depends_on('py-enum34', type=('build', 'run'), when='^python@:3.3') + depends_on('py-contextlib2', type=('build', 'run'), when='^python@:2.999') + depends_on('py-numpy@:1.16.4', type=('build', 'run'), when='^python@:2.999') + depends_on('py-numpy', type=('build', 'run'), when='^python@:3.0') From 4d064fd56cb0a8296311409397a0134151b6305e Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 9 Jun 2020 01:51:59 +0800 Subject: [PATCH 655/802] rt-tests: fix build error (#16998) This is a makefile package and needs to invoke make. --- var/spack/repos/builtin/packages/rt-tests/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/rt-tests/package.py b/var/spack/repos/builtin/packages/rt-tests/package.py index 4310ae5718e..ba5975e5189 100644 --- a/var/spack/repos/builtin/packages/rt-tests/package.py +++ b/var/spack/repos/builtin/packages/rt-tests/package.py @@ -6,7 +6,7 @@ from spack import * -class RtTests(Package): +class RtTests(MakefilePackage): """ Suite of real-time tests - cyclictest, hwlatdetect, pip_stress, pi_stress, pmqtest, ptsematest, rt-migrate-test, sendme, signaltest, @@ -19,4 +19,6 @@ class RtTests(Package): version('1.2', sha256='7ccde036059c87681a4b00e7138678d9551b1232113441f6edda31ea45452426') def install(self, spec, prefix): - install_tree('.', prefix) + mkdirp(prefix.bin) + mkdirp(prefix.share.man) + make('install', 'prefix={0}'.format(prefix)) From 6f9bfec32ec98bff24d00324ef7f9128e74ba87e Mon Sep 17 00:00:00 2001 From: Ryan Mast Date: Mon, 8 Jun 2020 14:37:49 -0700 Subject: [PATCH 656/802] HELICS: add version 2.5.1 (#17014) --- var/spack/repos/builtin/packages/helics/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/helics/package.py b/var/spack/repos/builtin/packages/helics/package.py index 9736cb6d66f..f2bb52dec6a 100644 --- a/var/spack/repos/builtin/packages/helics/package.py +++ b/var/spack/repos/builtin/packages/helics/package.py @@ -19,6 +19,7 @@ class Helics(CMakePackage): version('develop', branch='develop', submodules=True) version('master', branch='master', submodules=True) + version('2.5.1', sha256='3fc3507f7c074ff8b6a17fe54676334158fb2ff7cc8e7f4df011938f28fdbbca') version('2.5.0', sha256='6f4f9308ebb59d82d71cf068e0d9d66b6edfa7792d61d54f0a61bf20dd2a7428') version('2.4.2', sha256='957856f06ed6d622f05dfe53df7768bba8fe2336d841252f5fac8345070fa5cb') version('2.4.1', sha256='ac077e9efe466881ea366721cb31fb37ea0e72a881a717323ba4f3cdda338be4') From bcf8ebff4ff3ca25c17e690187b1e7cf46657ee5 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 8 Jun 2020 18:44:07 -0500 Subject: [PATCH 657/802] Cray: fix Blue Waters support and user-built MPIs on Cray (#16593) * Cray: fix Blue Waters support * pkg-config env vars needed on Blue Waters * cray platform: fix support for user-build MPI on cray machines * reintroduce cray environment cleaning behind cnl version guard * cray platform: fix support for user-build MPI on cray machines Co-authored-by: Gregory --- lib/spack/spack/build_environment.py | 24 ++++++++++++------- lib/spack/spack/platforms/cray.py | 6 +++-- .../repos/builtin/packages/mpich/package.py | 9 ++++--- .../builtin/packages/mvapich2/package.py | 9 ++++--- 4 files changed, 31 insertions(+), 17 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index f57ecd1e582..435de8594ec 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -53,6 +53,7 @@ import spack.paths import spack.schema.environment import spack.store +import spack.architecture as arch from spack.util.string import plural from spack.util.environment import ( env_flag, filter_system_paths, get_path, is_system_path, @@ -141,17 +142,21 @@ def clean_environment(): # can affect how some packages find libraries. We want to make # sure that builds never pull in unintended external dependencies. env.unset('LD_LIBRARY_PATH') - env.unset('CRAY_LD_LIBRARY_PATH') env.unset('LIBRARY_PATH') env.unset('CPATH') env.unset('LD_RUN_PATH') env.unset('DYLD_LIBRARY_PATH') env.unset('DYLD_FALLBACK_LIBRARY_PATH') - # Remove all pkgconfig stuff from craype - for varname in os.environ.keys(): - if 'PKGCONF' in varname: - env.unset(varname) + # On Cray systems newer than CNL5, unset CRAY_LD_LIBRARY_PATH to avoid + # interference with Spack dependencies. CNL5 (e.g. Blue Waters) requires + # these variables to be set. + hostarch = arch.Arch(arch.platform(), 'default_os', 'default_target') + if str(hostarch.platform) == 'cray' and str(hostarch.os) != 'cnl5': + env.unset('CRAY_LD_LIBRARY_PATH') + for varname in os.environ.keys(): + if 'PKGCONF' in varname: + env.unset(varname) build_lang = spack.config.get('config:build_language') if build_lang: @@ -355,10 +360,6 @@ def set_build_environment_variables(pkg, env, dirty): extra_rpaths = ':'.join(compiler.extra_rpaths) env.set('SPACK_COMPILER_EXTRA_RPATHS', extra_rpaths) - implicit_rpaths = compiler.implicit_rpaths() - if implicit_rpaths: - env.set('SPACK_COMPILER_IMPLICIT_RPATHS', ':'.join(implicit_rpaths)) - # Add bin directories from dependencies to the PATH for the build. for prefix in build_prefixes: for dirname in ['bin', 'bin64']: @@ -733,6 +734,11 @@ def setup_package(pkg, dirty): load_external_modules(pkg) + implicit_rpaths = pkg.compiler.implicit_rpaths() + if implicit_rpaths: + build_env.set('SPACK_COMPILER_IMPLICIT_RPATHS', + ':'.join(implicit_rpaths)) + # Make sure nothing's strange about the Spack environment. validate(build_env, tty.warn) build_env.apply_modifications() diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py index 2fccf2fe55e..9c8770c3680 100644 --- a/lib/spack/spack/platforms/cray.py +++ b/lib/spack/spack/platforms/cray.py @@ -22,7 +22,9 @@ 'x86-naples': 'zen', 'x86-rome': 'zen', # Cheating because we have the wrong modules on rzcrayz 'x86-skylake': 'skylake_avx512', - 'mic-knl': 'mic_knl' + 'mic-knl': 'mic_knl', + 'interlagos': 'bulldozer', + 'abudhabi': 'piledriver', } @@ -176,7 +178,7 @@ def modules_from_listdir(): craype_default_path = '/opt/cray/pe/craype/default/modulefiles' if os.path.isdir(craype_default_path): return os.listdir(craype_default_path) - return None + return [] if getattr(self, '_craype_targets', None) is None: strategies = [ diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 7b8c807cce3..042c2c5b124 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -161,8 +161,9 @@ def setup_build_environment(self, env): env.set('FFLAGS', '-fallow-argument-mismatch') def setup_dependent_build_environment(self, env, dependent_spec): - # On Cray, the regular compiler wrappers *are* the MPI wrappers. - if 'platform=cray' in self.spec: + # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers. + # Cray MPIs always have cray in the module name, e.g. "cray-mpich" + if self.spec.external_module and 'cray' in self.spec.external_module: env.set('MPICC', spack_cc) env.set('MPICXX', spack_cxx) env.set('MPIF77', spack_fc) @@ -180,7 +181,9 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.set('MPICH_FC', spack_fc) def setup_dependent_package(self, module, dependent_spec): - if 'platform=cray' in self.spec: + # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers. + # Cray MPIs always have cray in the module name, e.g. "cray-mpich" + if self.spec.external_module and 'cray' in self.spec.external_module: self.spec.mpicc = spack_cc self.spec.mpicxx = spack_cxx self.spec.mpifc = spack_fc diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 04205b6e24f..0fb3c36b289 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -209,8 +209,9 @@ def setup_run_environment(self, env): env.set('SLURM_MPI_TYPE', 'pmi2') def setup_dependent_build_environment(self, env, dependent_spec): - # On Cray, the regular compiler wrappers *are* the MPI wrappers. - if 'platform=cray' in self.spec: + # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers. + # Cray MPIs always have cray in the module name, e.g. "cray-mvapich" + if self.spec.external_module and 'cray' in self.spec.external_module: env.set('MPICC', spack_cc) env.set('MPICXX', spack_cxx) env.set('MPIF77', spack_fc) @@ -228,7 +229,9 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.set('MPICH_FC', spack_fc) def setup_dependent_package(self, module, dependent_spec): - if 'platform=cray' in self.spec: + # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers. + # Cray MPIs always have cray in the module name, e.g. "cray-mvapich" + if self.spec.external_module and 'cray' in self.spec.external_module: self.spec.mpicc = spack_cc self.spec.mpicxx = spack_cxx self.spec.mpifc = spack_fc From 9cda38c03d5eb48cb644a4985442e61e5d00bc63 Mon Sep 17 00:00:00 2001 From: oracleLee <52901865+oracleLee@users.noreply.github.com> Date: Tue, 9 Jun 2020 11:48:59 +0800 Subject: [PATCH 658/802] Update miniconda3@4.8.2 (#17003) * Update package.py * Update package.py * Update package.py * Update package.py * Update package.py * Update package.py --- var/spack/repos/builtin/packages/miniconda3/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/miniconda3/package.py b/var/spack/repos/builtin/packages/miniconda3/package.py index f75ce7420c7..b3bda3dfaad 100644 --- a/var/spack/repos/builtin/packages/miniconda3/package.py +++ b/var/spack/repos/builtin/packages/miniconda3/package.py @@ -13,6 +13,7 @@ class Miniconda3(Package): homepage = "https://conda.io/miniconda.html" url = "https://repo.continuum.io/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh" + version('4.8.2', sha256='5bbb193fd201ebe25f4aeb3c58ba83feced6a25982ef4afa86d5506c3656c142', url='https://repo.anaconda.com/miniconda/Miniconda3-py38_4.8.2-Linux-x86_64.sh', expand=False) version('4.7.12.1', sha256='bfe34e1fa28d6d75a7ad05fd02fa5472275673d5f5621b77380898dee1be15d2', expand=False) version('4.6.14', sha256='0d6b23895a91294a4924bd685a3a1f48e35a17970a073cd2f684ffe2c31fc4be', expand=False) version('4.5.11', sha256='ea4594241e13a2671c5b158b3b813f0794fe58d514795fbf72a1aad24db918cf', expand=False) From 2e20ee8ea23962d25fe2d6f3d33d2111813ccf89 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 9 Jun 2020 06:54:50 +0200 Subject: [PATCH 659/802] suite-sparse: build libraries without running demos (#17007) fixes #16638 --- var/spack/repos/builtin/packages/suite-sparse/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index 0cbdd900b60..eef38fefae9 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -142,7 +142,7 @@ def install(self, spec, prefix): # not possible, mainly because of GraphBLAS. Thus compile first and # install in a second run. if '@5.4.0:' in self.spec: - make('default', *make_args) + make('library', *make_args) make_args.append('INSTALL=%s' % prefix) make('install', *make_args) From f70b72edc527ddf11365c220e48e893e38cb1be3 Mon Sep 17 00:00:00 2001 From: Nathan <35582439+yee29@users.noreply.github.com> Date: Tue, 9 Jun 2020 06:01:55 -0700 Subject: [PATCH 660/802] Set the BOOST_ROOT environment variable when library is loaded (#16818) * Adding BOOST_ROOT env variable * Update var/spack/repos/builtin/packages/boost/package.py Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/boost/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index bcdec30ae99..1e5bd00c2bd 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -512,3 +512,6 @@ def install(self, spec, prefix): # on Darwin; correct this if (sys.platform == 'darwin') and ('+shared' in spec): fix_darwin_install_name(prefix.lib) + + def setup_run_environment(self, env): + env.set('BOOST_ROOT', self.prefix) From 11b5fa71703c76655dcab067d94e57ac97b6551d Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Tue, 9 Jun 2020 11:23:29 -0400 Subject: [PATCH 661/802] [util-linux] disabling systemd (#17008) If systemd support is enabled, install will attempt to modify files in system systemd directories. --- var/spack/repos/builtin/packages/util-linux/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/util-linux/package.py b/var/spack/repos/builtin/packages/util-linux/package.py index ccd6bba9aa3..93bdd8c3c6a 100644 --- a/var/spack/repos/builtin/packages/util-linux/package.py +++ b/var/spack/repos/builtin/packages/util-linux/package.py @@ -44,6 +44,7 @@ def configure_args(self): config_args = [ '--disable-use-tty-group', '--disable-makeinstall-chown', + '--without-systemd' ] config_args.extend(self.enable_or_disable('libuuid')) return config_args From 2421d903b034c92660fbe999b7d486e6f21a7417 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Tue, 9 Jun 2020 08:52:46 -0700 Subject: [PATCH 662/802] SpecList: fix recursion for references (#16897) * SpecList: fix and refactor variable expansion --- lib/spack/spack/spec_list.py | 71 ++++++++++++++++++------------- lib/spack/spack/test/spec_list.py | 17 ++++++++ 2 files changed, 59 insertions(+), 29 deletions(-) diff --git a/lib/spack/spack/spec_list.py b/lib/spack/spack/spec_list.py index 4468df7c35d..bc473f530cc 100644 --- a/lib/spack/spack/spec_list.py +++ b/lib/spack/spack/spec_list.py @@ -121,38 +121,42 @@ def update_reference(self, reference): self._constraints = None self._specs = None + def _parse_reference(self, name): + sigil = '' + name = name[1:] + + # Parse specs as constraints + if name.startswith('^') or name.startswith('%'): + sigil = name[0] + name = name[1:] + + # Make sure the reference is valid + if name not in self._reference: + msg = 'SpecList %s refers to ' % self.name + msg += 'named list %s ' % name + msg += 'which does not appear in its reference dict' + raise UndefinedReferenceError(msg) + + return (name, sigil) + def _expand_references(self, yaml): if isinstance(yaml, list): - for idx, item in enumerate(yaml): - if isinstance(item, string_types) and item.startswith('$'): - # Reference type can add a constraint to items - if item[1] in ('^', '%'): - name = item[2:] - sigil = item[1] - else: - name = item[1:] - sigil = '' - if name in self._reference: - ret = [self._expand_references(i) for i in yaml[:idx]] - ret += self._reference[name].specs_as_yaml_list - ret += self._expand_references(yaml[idx + 1:]) + ret = [] - # Add the sigil if we're mapping a sigil to a ref - def sigilify(arg): - if isinstance(arg, dict): - if sigil: - arg['sigil'] = sigil - return arg - else: - return sigil + arg - return list(map(sigilify, ret)) - else: - msg = 'SpecList %s refers to ' % self.name - msg += 'named list %s ' % name - msg += 'which does not appear in its reference dict' - raise UndefinedReferenceError(msg) - # No references in this - return [self._expand_references(item) for item in yaml] + for item in yaml: + # if it's a reference, expand it + if isinstance(item, string_types) and item.startswith('$'): + # replace the reference and apply the sigil if needed + name, sigil = self._parse_reference(item) + referent = [ + _sigilify(item, sigil) + for item in self._reference[name].specs_as_yaml_list + ] + ret.extend(referent) + else: + # else just recurse + ret.append(self._expand_references(item)) + return ret elif isinstance(yaml, dict): # There can't be expansions in dicts return dict((name, self._expand_references(val)) @@ -216,6 +220,15 @@ def _expand_matrix_constraints(object, specify=True): return results +def _sigilify(item, sigil): + if isinstance(item, dict): + if sigil: + item['sigil'] = sigil + return item + else: + return sigil + item + + class SpecListError(SpackError): """Error class for all errors related to SpecList objects.""" diff --git a/lib/spack/spack/test/spec_list.py b/lib/spack/spack/test/spec_list.py index ff45096c3ed..27567b4080e 100644 --- a/lib/spack/spack/test/spec_list.py +++ b/lib/spack/spack/test/spec_list.py @@ -2,6 +2,7 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import pytest import itertools from spack.spec_list import SpecList from spack.spec import Spec @@ -157,6 +158,22 @@ def test_spec_list_nested_matrices(self): expected = [Spec(' '.join(combo)) for combo in expected_components] assert set(speclist.specs) == set(expected) + @pytest.mark.regression('16897') + def test_spec_list_recursion_specs_as_constraints(self): + input = ['mpileaks', '$mpis', + {'matrix': [['hypre'], ['$%gccs', '$%clangs']]}, + 'libelf'] + + reference = {'gccs': SpecList('gccs', ['gcc@4.5.0']), + 'clangs': SpecList('clangs', ['clang@3.3']), + 'mpis': SpecList('mpis', ['zmpi@1.0', 'mpich@3.0'])} + + speclist = SpecList('specs', input, reference) + + assert speclist.specs_as_yaml_list == self.default_expansion + assert speclist.specs_as_constraints == self.default_constraints + assert speclist.specs == self.default_specs + def test_spec_list_matrix_exclude(self, mock_packages): # Test on non-boolean variants for regression for #16841 matrix = [{'matrix': [['multivalue-variant'], ['foo=bar', 'foo=baz']], From 25a837bf796eb94d78740e21147d8cfd9d942241 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 9 Jun 2020 20:00:23 +0200 Subject: [PATCH 663/802] Testing: create mock executable fixture (#16999) --- lib/spack/spack/test/conftest.py | 17 +++++++++++++++++ lib/spack/spack/test/relocate.py | 11 ++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index ae8fa80ab76..bac5bcebf60 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -1099,3 +1099,20 @@ def clear_directive_functions(): # proceeding with subsequent tests that may depend on the original # functions. spack.directives.DirectiveMeta._directives_to_be_executed = [] + + +@pytest.fixture +def mock_executable(tmpdir): + """Factory to create a mock executable in a temporary directory that + output a custom string when run. + """ + import jinja2 + + def _factory(name, output, subdir=('bin',)): + f = tmpdir.mkdir(*subdir).join(name) + t = jinja2.Template('#!/bin/bash\n{{ output }}\n') + f.write(t.render(output=output)) + f.chmod(0o755) + return str(f) + + return _factory diff --git a/lib/spack/spack/test/relocate.py b/lib/spack/spack/test/relocate.py index 6669b25eb41..551f1596f7b 100644 --- a/lib/spack/spack/test/relocate.py +++ b/lib/spack/spack/test/relocate.py @@ -107,16 +107,9 @@ def do_install_mock(self, **kwargs): @pytest.fixture() -def mock_patchelf(tmpdir): - import jinja2 - +def mock_patchelf(tmpdir, mock_executable): def _factory(output): - f = tmpdir.mkdir('bin').join('patchelf') - t = jinja2.Template('#!/bin/bash\n{{ output }}\n') - f.write(t.render(output=output)) - f.chmod(0o755) - return str(f) - + return mock_executable('patchelf', output=output) return _factory From 07e97e3ebc5a0b1594f7bc815aca441f99de5141 Mon Sep 17 00:00:00 2001 From: Rob Latham Date: Tue, 9 Jun 2020 13:53:20 -0500 Subject: [PATCH 664/802] jansson: add versions 2.10 to 2.13.1 (#17011) --- var/spack/repos/builtin/packages/jansson/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/jansson/package.py b/var/spack/repos/builtin/packages/jansson/package.py index 6647b3d4e80..43982b42ccb 100644 --- a/var/spack/repos/builtin/packages/jansson/package.py +++ b/var/spack/repos/builtin/packages/jansson/package.py @@ -14,6 +14,11 @@ class Jansson(CMakePackage): url = "https://github.com/akheron/jansson/archive/v2.9.tar.gz" maintainers = ['ax3l'] + version('2.13.1', sha256='f22901582138e3203959c9257cf83eba9929ac41d7be4a42557213a22ebcc7a0') + version('2.13', sha256='beb47da10cb27668de3012cc193a1873a898ad5710a1126be9e6d3357beb5b30') + version('2.12', sha256='76260d30e9bbd0ef392798525e8cd7fe59a6450c54ca6135672e3cd6a1642941') + version('2.11', sha256='6ff0eab3a8baf64d21cae25f88a0311fb282006eb992080722a9099469c32881') + version('2.10', sha256='b0a899f90ade82e42da0ecabc8af1fa296d69691e7c0786c4994fb79d4833ebb') version('2.9', sha256='952fa714b399e71c1c3aa020e32e899f290c82126ca4d0d14cff5d10af457656') variant('shared', default=True, From a52945613dfc5ba646ca74ae7187cb82b3e6931b Mon Sep 17 00:00:00 2001 From: victorusu Date: Tue, 9 Jun 2020 20:54:59 +0200 Subject: [PATCH 665/802] New package: py-pygelf (#17004) --- .../builtin/packages/py-pygelf/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pygelf/package.py diff --git a/var/spack/repos/builtin/packages/py-pygelf/package.py b/var/spack/repos/builtin/packages/py-pygelf/package.py new file mode 100644 index 00000000000..c2b20b57037 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pygelf/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPygelf(PythonPackage): + """Python logging handlers with GELF (Graylog Extended Log Format) + support.""" + + homepage = "https://github.com/keeprocking/pygelf" + url = "https://pypi.io/packages/source/p/pygelf/pygelf-0.3.6.tar.gz" + + # notify when the package is updated. + maintainers = ['victorusu', 'vkarak'] + + version('0.3.6', sha256='3e5bc59e3b5a754556a76ff2c69fcf2003218ad7b5ff8417482fa1f6a7eba5f9') + + depends_on('python', type=('build', 'run')) + depends_on('py-setuptools', type='build') From 8b1ffebe002c4c997d672382f9d045a590618649 Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 10 Jun 2020 06:17:31 +0800 Subject: [PATCH 666/802] Add new package: py-workload-automation --- .../py-workload-automation/package.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-workload-automation/package.py diff --git a/var/spack/repos/builtin/packages/py-workload-automation/package.py b/var/spack/repos/builtin/packages/py-workload-automation/package.py new file mode 100644 index 00000000000..bc65e210ffd --- /dev/null +++ b/var/spack/repos/builtin/packages/py-workload-automation/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyWorkloadAutomation(PythonPackage): + """Workload Automation (WA) is a framework for executing workloads and + collecting measurements on Android and Linux devices.""" + + homepage = "https://github.com/ARM-software/workload-automation" + url = "https://github.com/ARM-software/workload-automation/archive/v3.2.tar.gz" + + version('3.2', sha256='a3db9df6a9e0394231560ebe6ba491a513f6309e096eaed3db6f4cb924c393ea') + version('3.1.4', sha256='217fc33a3739d011a086315ef86b90cf332c16d1b03c9dcd60d58c9fd1f37f98') + version('3.1.3', sha256='152470808cf8dad8a833fd7b2cb7d77cf8aa5d1af404e37fa0a4ff3b07b925b2') + version('3.1.2', sha256='8226a6abc5cbd96e3f1fd6df02891237a06cdddb8b1cc8916f255fcde20d3069') + version('3.1.1', sha256='32a19be92e43439637c68d9146f21bb7a0ae7b8652c11dfc4b4bd66d59329ad4') + version('3.1.0', sha256='f00aeef7a1412144c4139c23b4c48583880ba2147207646d96359f1d295d6ac3') + version('3.0.0', sha256='8564b0c67541e3a212363403ee090dfff5e4df85770959a133c0979445b51c3c') + version('2.7.0', sha256='e9005b9db18e205bf6c4b3e09b15a118abeede73700897427565340dcd589fbb') + version('2.6.0', sha256='b94341fb067592cebe0db69fcf7c00c82f96b4eb7c7210e34b38473869824cce') + + depends_on('py-setuptools', type='build') + depends_on('py-python-dateutil', type=('build', 'run')) + depends_on('py-pexpect@3.3:', type=('build', 'run')) + depends_on('py-pyserial', type=('build', 'run')) + depends_on('py-colorama', type=('build', 'run')) + depends_on('py-pyyaml@5.1:', type=('build', 'run')) + depends_on('py-requests', type=('build', 'run')) + depends_on('py-wrapt', type=('build', 'run')) + depends_on('py-pandas@0.23.0:', type=('build', 'run'), when='^python@3.5.3:') + depends_on('py-pandas@0.23.0:0.24.2', type=('build', 'run'), when='^python@:3.5.2') + depends_on('py-future', type=('build', 'run')) + depends_on('py-louie', type=('build', 'run')) + depends_on('py-devlib', type=('build', 'run')) From 806a19c6b63acccb7c0e58a27f46ccf4c7db3f2c Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 9 Jun 2020 13:52:01 -0700 Subject: [PATCH 667/802] libffi: add patch for building with clang on power (#16855) * libffi: add patch for building with '%clang target=power*' * libffi: fix version of clang/power patch --- .../packages/libffi/clang-powerpc-3.2.1.patch | 24 +++++++++++++++++++ .../repos/builtin/packages/libffi/package.py | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libffi/clang-powerpc-3.2.1.patch diff --git a/var/spack/repos/builtin/packages/libffi/clang-powerpc-3.2.1.patch b/var/spack/repos/builtin/packages/libffi/clang-powerpc-3.2.1.patch new file mode 100644 index 00000000000..b6749cc26f8 --- /dev/null +++ b/var/spack/repos/builtin/packages/libffi/clang-powerpc-3.2.1.patch @@ -0,0 +1,24 @@ +diff --git a/src/powerpc/linux64.S b/src/powerpc/linux64.S +index d2acb70..921e9cb 100644 +--- a/src/powerpc/linux64.S ++++ b/src/powerpc/linux64.S +@@ -83,6 +83,7 @@ ffi_call_LINUX64: + mr %r4, %r1 + # if defined _CALL_LINUX || _CALL_ELF == 2 + bl ffi_prep_args64 ++ nop + # else + bl .ffi_prep_args64 + # endif +diff --git a/src/powerpc/linux64_closure.S b/src/powerpc/linux64_closure.S +index 97421a4..3c62d5f 100644 +--- a/src/powerpc/linux64_closure.S ++++ b/src/powerpc/linux64_closure.S +@@ -152,6 +152,7 @@ ffi_closure_LINUX64: + # make the call + # if defined _CALL_LINUX || _CALL_ELF == 2 + bl ffi_closure_helper_LINUX64 ++ nop + # else + bl .ffi_closure_helper_LINUX64 + # endif diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py index d21b62b1e50..0ee50aec07c 100644 --- a/var/spack/repos/builtin/packages/libffi/package.py +++ b/var/spack/repos/builtin/packages/libffi/package.py @@ -17,6 +17,8 @@ class Libffi(AutotoolsPackage, SourcewarePackage): version('3.3', sha256='72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056') version('3.2.1', sha256='d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37') + patch('clang-powerpc-3.2.1.patch', when='@3.2.1%clang platform=linux') + @property def headers(self): # The headers are probably in self.prefix.lib but we search everywhere From 872ab2110318524cbf805215e09a457a5ff4cba4 Mon Sep 17 00:00:00 2001 From: Robert Blake Date: Tue, 9 Jun 2020 14:13:54 -0700 Subject: [PATCH 668/802] Add new package: wcs (#16958) * Adding a package for wcs. * Turning on sbml for wcs. * The cpp flag needs to be available for wcs. * Wcs needs SBML to properly define the namespace. * Flake8 fixes. * Fixing the help string with the description. * Changing cpp to use the new variant syntax. * Fixing flake8 errors. * Forgot to delete one last fixme comment. * Spack "develop" needs to link to repo "devel" Co-authored-by: Adam J. Stewart Co-authored-by: Robert Blake Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/sbml/package.py | 5 ++- .../repos/builtin/packages/wcs/package.py | 33 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/wcs/package.py diff --git a/var/spack/repos/builtin/packages/sbml/package.py b/var/spack/repos/builtin/packages/sbml/package.py index 4c90d76bc2d..22c608d156e 100644 --- a/var/spack/repos/builtin/packages/sbml/package.py +++ b/var/spack/repos/builtin/packages/sbml/package.py @@ -59,6 +59,9 @@ def url_for_version(self, version): description='Build with mono support') depends_on('mono', when="+mono") + variant('cpp', default=False, + description="All c++ includes should be under a namespace") + depends_on('swig@2:', type='build') depends_on('cmake', type='build') depends_on('zlib') @@ -76,7 +79,6 @@ def cmake_args(self): "-DENABLE_RENDER:BOOL=ON", "-DWITH_BZIP2:BOOL=ON", "-DWITH_CHECK:BOOL=OFF", - "-DWITH_CPP_NAMESPACE:BOOL=OFF", "-DWITH_DOXYGEN:BOOL=OFF", "-DWITH_EXAMPLES:BOOL=OFF", "-DWITH_EXPAT:BOOL=OFF", @@ -86,6 +88,7 @@ def cmake_args(self): "-DWITH_XERCES:BOOL=OFF", "-DWITH_ZLIB:BOOL=ON", ] + args.append(self.define_from_variant('WITH_CPP_NAMESPACE', 'cpp')) if '+python' in spec: args.extend([ "-DWITH_PYTHON:BOOL=ON", diff --git a/var/spack/repos/builtin/packages/wcs/package.py b/var/spack/repos/builtin/packages/wcs/package.py new file mode 100644 index 00000000000..44a39cccbe0 --- /dev/null +++ b/var/spack/repos/builtin/packages/wcs/package.py @@ -0,0 +1,33 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Wcs(CMakePackage): + """Simulates whole cell models using discrete event simulation.""" + + homepage = "https://github.com/LLNL/wcs.git" + git = "https://github.com/LLNL/wcs.git" + maintainers = ['rblake-llnl'] + + version('master', branch='master') + version('develop', branch='devel') + + depends_on('boost+graph+filesystem+regex+system') + depends_on('sbml@5.18.0:+cpp') + depends_on('cmake@3.12:', type='build') + depends_on('cereal', type='build') + + def cmake_args(self): + spec = self.spec + args = [ + "-DBOOST_ROOT:PATH=" + spec['boost'].prefix, + "-DCEREAL_ROOT:PATH=" + spec['cereal'].prefix, + "-DSBML_ROOT:PATH=" + spec['sbml'].prefix, + "-DWCS_WITH_SBML:BOOL=ON", + "-DWCS_WITH_EXPRTK:BOOL=ON", + ] + return args From 31791f269b16e2f4c2b6e442fc4890dab1998279 Mon Sep 17 00:00:00 2001 From: Rob Latham Date: Tue, 9 Jun 2020 16:16:38 -0500 Subject: [PATCH 669/802] teach spack how to build pmix from git (#16973) * teach spack how to build pmix from git * add variant for new REST feature * reorder package to match guidance --- .../repos/builtin/packages/pmix/package.py | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/pmix/package.py b/var/spack/repos/builtin/packages/pmix/package.py index 2cb5126b535..b752aca0bf7 100644 --- a/var/spack/repos/builtin/packages/pmix/package.py +++ b/var/spack/repos/builtin/packages/pmix/package.py @@ -6,6 +6,7 @@ from spack import * import spack.architecture +import os class Pmix(AutotoolsPackage): @@ -32,8 +33,10 @@ class Pmix(AutotoolsPackage): homepage = "https://pmix.org" url = "https://github.com/pmix/pmix/releases/download/v3.1.3/pmix-3.1.3.tar.bz2" + git = "https://github.com/openpmix/openpmix.git" maintainers = ['rhc54'] + version('master', branch='master') version('3.1.3', sha256='118acb9c4e10c4e481406dcffdfa762f314af50db75336bf8460e53b56dc439d') version('3.1.2', sha256='28aed0392d4ca2cdfbdd721e6210c94dadc9830677fea37a0abe9d592c00f9c3') version('3.0.2', sha256='df68f35a3ed9517eeade80b13855cebad8fde2772b36a3f6be87559b6d430670') @@ -47,13 +50,36 @@ class Pmix(AutotoolsPackage): version('2.0.1', sha256='ba6e0f32936b1859741adb221e18b2c1ee7dc53a6b374b9f7831adf1692b15fd') version('1.2.5', sha256='a2b02d489ee730c06ee40e7f9ffcebb6c35bcb4f95153fab7c4276a3add6ae31') - depends_on('libevent@2.0.20:2.0.22,2.1.8') - depends_on('hwloc@1.11.0:1.11.99,2.0.1:', when='@3.0.0:') - variant('pmi_backwards_compatibility', default=True, description="Toggle pmi backwards compatibility") + variant('restful', + default=False, + description="allow a PMIx server to request services from " + "a system-level REST server") + + depends_on('libevent@2.0.20:2.0.22,2.1.8') + depends_on('hwloc@1.11.0:1.11.99,2.0.1:', when='@3.0.0:') + depends_on("m4", type=("build"), when="@master") + depends_on("autoconf", type=("build"), when="@master") + depends_on("automake", type=("build"), when="@master") + depends_on("libtool", type=("build"), when="@master") + depends_on("perl", type=("build"), when="@master") + depends_on('curl', when="+restful") + depends_on('jansson@2.11:', when="+restful") + + conflicts('@:3.9.9', when='+restful') + + def autoreconf(self, spec, prefix): + """Only needed when building from git checkout""" + # If configure exists nothing needs to be done + if os.path.exists(self.configure_abs_path): + return + # Else bootstrap with autotools + perl = which('perl') + perl('./autogen.pl') + def configure_args(self): spec = self.spec From 9a18fbbc3ede80d52bd70a984961728e0909cd86 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 9 Jun 2020 16:57:27 -0700 Subject: [PATCH 670/802] lib/spack : expand spack config vars in 'include' section (#16210) * Changed the 'include' config section to use 'substitute_path_variables' to allow for Spack config variables to be used (e.g. $spack). * Fixed a bug with 'include' section path expansion and added a test case for 'include' paths with embedded config variables. --- lib/spack/spack/environment.py | 5 +++-- lib/spack/spack/test/cmd/env.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 00af2df2d93..1b9df358f47 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -37,6 +37,7 @@ from spack.spec_list import SpecList, InvalidSpecConstraintError from spack.variant import UnknownVariantError import spack.util.lock as lk +from spack.util.path import substitute_path_variables #: environment variable used to indicate the active environment spack_env_var = 'SPACK_ENV' @@ -780,8 +781,8 @@ def included_config_scopes(self): # highest-precedence scopes are last. includes = config_dict(self.yaml).get('include', []) for i, config_path in enumerate(reversed(includes)): - # allow paths to contain environment variables - config_path = config_path.format(**os.environ) + # allow paths to contain spack config/environment variables, etc. + config_path = substitute_path_variables(config_path) # treat relative paths as relative to the environment if not os.path.isabs(config_path): diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index f8ed37e17c7..57037387318 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -22,6 +22,7 @@ from spack.spec_list import SpecListError from spack.util.mock_package import MockPackageMultiRepo import spack.util.spack_json as sjson +from spack.util.path import substitute_path_variables # everything here uses the mock_env_path @@ -539,6 +540,35 @@ def test_env_with_included_config_scope(): for x in e._get_environment_specs()) +def test_env_with_included_config_var_path(): + config_var_path = os.path.join('$tempdir', 'included-config.yaml') + test_config = """\ +env: + include: + - %s + specs: + - mpileaks +""" % config_var_path + + _env_create('test', StringIO(test_config)) + e = ev.read('test') + + config_real_path = substitute_path_variables(config_var_path) + fs.mkdirp(os.path.dirname(config_real_path)) + with open(config_real_path, 'w') as f: + f.write("""\ +packages: + mpileaks: + version: [2.2] +""") + + with e: + e.concretize() + + assert any(x.satisfies('mpileaks@2.2') + for x in e._get_environment_specs()) + + def test_env_config_precedence(): test_config = """\ env: From 0de12be52a0a3672cc2e3268e3048c65865ba950 Mon Sep 17 00:00:00 2001 From: asmaahassan90 <31959389+asmaahassan90@users.noreply.github.com> Date: Wed, 10 Jun 2020 01:58:34 +0200 Subject: [PATCH 671/802] add gaussian-view (#16890) --- .../builtin/packages/gaussian-view/package.py | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 var/spack/repos/builtin/packages/gaussian-view/package.py diff --git a/var/spack/repos/builtin/packages/gaussian-view/package.py b/var/spack/repos/builtin/packages/gaussian-view/package.py new file mode 100644 index 00000000000..4de3c9e02be --- /dev/null +++ b/var/spack/repos/builtin/packages/gaussian-view/package.py @@ -0,0 +1,41 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +# ---------------------------------------------------------------------------- + +from spack import * +import os + + +class GaussianView(Package): + """GaussView 6 is the latest iteration of a graphical interface used with + Gaussian. It aids in the creation of Gaussian input files, enables the + user to run Gaussian calculations from a graphical interface without the + need for using a command line instruction, and helps in the interpretation + of Gaussian output""" + + homepage = "https://gaussian.com/gaussview6/" + manual_download = True + + version('6016', + '5dd6a8df8c81763e43a308b3a18d2d3b825d3597e9628dcf43e563d1867b9638', + extension='tbz') + + depends_on('gaussian@16-B.01', type='run') + + def url_for_version(self, version): + return "file://{0}/gv-{1}-Linux-x86_64.tbz".format(os.getcwd(), + version) + + def install(self, spec, prefix): + install_tree(os.getcwd(), self.prefix) + + def setup_run_environment(self, env): + env.set('GV_DIR', self.prefix) + env.prepend_path('PATH', self.prefix) + env.set('GV_LIB_PATH', self.prefix.lib) + env.prepend_path('GV_LIB_PATH', self.prefix.lib.MesaGL) + env.prepend_path('LD_LIBRARY_PATH', self.prefix.lib.MesaGL) + env.set('ALLOWINDIRECT', '1') + env.prepend_path('QT_PLUGIN_PATH', self.prefix.plugins) From f6020d259aacfe1f7168d61f96f3f7fbb8fbe7d5 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Wed, 10 Jun 2020 21:53:09 +0900 Subject: [PATCH 672/802] adios2: fix to build on Fujitsu MPI and Fujitsu compiler (#17034) --- .../repos/builtin/packages/adios2/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 59e442a27d3..8e2d0d00e30 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -119,10 +119,20 @@ class Adios2(CMakePackage): # See https://github.com/ornladios/ADIOS2/pull/1899 patch('2.5-fix-clear_cache.patch', when='@2.5.0') + @when('%fj') + def patch(self): + """ add fujitsu mpi commands #16864 """ + f = join_path('cmake', 'upstream', 'FindMPI.cmake') + filter_file('mpcc_r)', 'mpcc_r mpifcc)', f, string=True) + filter_file('mpc++_r)', 'mpcc_r mpiFCC)', f, string=True) + filter_file('mpf77_r', 'mpf77_r mpifrt', f, string=True) + def setup_build_environment(self, env): # https://github.com/ornladios/ADIOS2/issues/2228 if self.spec.satisfies('%gcc@10: +fortran'): env.set('FFLAGS', '-fallow-argument-mismatch') + elif self.spec.satisfies('%fj +fortran'): + env.set('FFLAGS', '-Ccpp') def cmake_args(self): spec = self.spec @@ -185,6 +195,12 @@ def cmake_args(self): args.append('-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL={0}'.format( 'ON' if '+pic' in spec else 'OFF')) + if spec.satisfies('%fj'): + args.extend([ + '-DCMAKE_Fortran_SUBMODULE_EXT=.smod', + '-DCMAKE_Fortran_SUBMODULE_SEP=.' + ]) + if spec.satisfies('+python') or self.run_tests: args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s' % spec['python'].command.path) From 2827dca905bd2ae51a0b10ccf634199648f24e80 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 10 Jun 2020 07:19:41 -0700 Subject: [PATCH 673/802] ADIOS 2.6.0: New Options (#17025) Control new options/dependencies in ADIOS2 to avoid pick-up of system packages. --- var/spack/repos/builtin/packages/adios2/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 8e2d0d00e30..13f502e050d 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -77,7 +77,7 @@ class Adios2(CMakePackage): # DataMan needs dlopen conflicts('+dataman', when='~shared') - depends_on('cmake@3.6.0:', type='build') + depends_on('cmake@3.12.0:', type='build') depends_on('pkgconfig', type='build') depends_on('libffi', when='+sst') # optional in DILL @@ -179,6 +179,9 @@ def cmake_args(self): args.append('-DADIOS2_USE_DataSpaces={0}'.format( 'ON' if '+dataspaces' in spec else 'OFF')) + if spec.version >= Version('2.6.0'): + args.append('-DADIOS2_USE_IME=OFF') + if '+sst' in spec: args.extend([ # Broken dependency package From 478a8aff0e9a6b19baac2c291a3f51472381197d Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 10 Jun 2020 17:10:57 +0200 Subject: [PATCH 674/802] Move to temporary directory before running dev-build test (#17028) Without this the test would leave spurious "spack-build-*.txt" files in the current working directory. --- lib/spack/spack/test/cmd/dev_build.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/test/cmd/dev_build.py b/lib/spack/spack/test/cmd/dev_build.py index 271faa845d7..94c7690de6d 100644 --- a/lib/spack/spack/test/cmd/dev_build.py +++ b/lib/spack/spack/test/cmd/dev_build.py @@ -110,9 +110,10 @@ def module(*args): pass monkeypatch.setattr(spack.build_environment, 'module', module) - output = dev_build('-b', 'edit', '--drop-in', 'sh', - 'dev-build-test-install@0.0.0') - assert "lib/spack/env" in output + with tmpdir.as_cwd(): + output = dev_build('-b', 'edit', '--drop-in', 'sh', + 'dev-build-test-install@0.0.0') + assert "lib/spack/env" in output def test_dev_build_fails_already_installed(tmpdir, mock_packages, From 19dba603ad0e98700c681e675972fbaa7c9aed6c Mon Sep 17 00:00:00 2001 From: Justin S <3630356+codeandkey@users.noreply.github.com> Date: Wed, 10 Jun 2020 20:57:08 -0500 Subject: [PATCH 675/802] py-paramz: new package at 0.9.5 (#17026) --- .../builtin/packages/py-paramz/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-paramz/package.py diff --git a/var/spack/repos/builtin/packages/py-paramz/package.py b/var/spack/repos/builtin/packages/py-paramz/package.py new file mode 100644 index 00000000000..77c5996d12c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-paramz/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyParamz(PythonPackage): + """The Parameterization Framework.""" + + homepage = "https://github.com/sods/paramz" + url = "https://pypi.io/packages/source/p/paramz/paramz-0.9.5.tar.gz" + + version('0.9.5', sha256='0917211c0f083f344e7f1bc997e0d713dbc147b6380bc19f606119394f820b9a') + + depends_on('py-setuptools', type='build') + depends_on('py-numpy@1.7:', type=('build', 'run')) + depends_on('py-scipy', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) + depends_on('py-decorator@4.0.10:', type=('build', 'run')) From 9820a23abd06efd003464f65c84e726479a97a2b Mon Sep 17 00:00:00 2001 From: codeandkey Date: Tue, 9 Jun 2020 13:55:55 -0500 Subject: [PATCH 676/802] py-gpy: new package at 1.9.9 --- .../repos/builtin/packages/py-gpy/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-gpy/package.py diff --git a/var/spack/repos/builtin/packages/py-gpy/package.py b/var/spack/repos/builtin/packages/py-gpy/package.py new file mode 100644 index 00000000000..59bebda5d0c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-gpy/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyGpy(PythonPackage): + """The Gaussian Process Toolbox.""" + + homepage = "http://sheffieldml.github.com/GPy/" + url = "https://pypi.io/packages/source/g/gpy/GPy-1.9.9.tar.gz" + + version('1.9.9', sha256='04faf0c24eacc4dea60727c50a48a07ddf9b5751a3b73c382105e2a31657c7ed') + + depends_on('py-setuptools', type='build') + depends_on('py-numpy@1.7:', type=('build', 'run')) + depends_on('py-scipy@1.3.0:', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) + depends_on('py-paramz@0.9.0:', type=('build', 'run')) + depends_on('py-cython@0.29:', type=('build', 'run')) From b50b930d6a5af82e04dc61788a919e2e2d0b4561 Mon Sep 17 00:00:00 2001 From: Sinan Date: Thu, 11 Jun 2020 08:26:43 -0700 Subject: [PATCH 677/802] New package: py-uncertainties (#16997) --- .../packages/py-uncertainties/package.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-uncertainties/package.py diff --git a/var/spack/repos/builtin/packages/py-uncertainties/package.py b/var/spack/repos/builtin/packages/py-uncertainties/package.py new file mode 100644 index 00000000000..67a9ee0cc59 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-uncertainties/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyUncertainties(PythonPackage): + """Transparent calculations with uncertainties on the quantities involved + (aka error propagation); fast calculation of derivatives + """ + + homepage = "https://uncertainties-python-package.readthedocs.io/en/latest/" + url = "https://pypi.io/packages/source/u/uncertainties/uncertainties-3.1.4.tar.gz" + + version('3.1.4', sha256='63548a94899f2a51eeb89b640f6ac311f481a8016b37dce157186e44619bc968') + + variant('optional', default=False, description='Enable extra features involving numpy') + variant('docs', default=False, description='Build with documentation') + + depends_on('python@2.7:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-future', type=('build', 'run')) + depends_on('py-numpy', type=('build', 'run'), when='+optional') + depends_on('py-sphinx', type='build', when='+docs') From bbac630aac7a06dd681eb8483a2f89f905f10ed3 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 5 Jun 2020 14:44:57 +0200 Subject: [PATCH 678/802] Reworked tests on compilers to separate version detection Tests on version detection are now separate from other tests done on compiler. --- lib/spack/spack/test/compilers/__init__.py | 4 + lib/spack/spack/test/compilers/detection.py | 179 ++++++++++++++++++ .../test/{compilers.py => compilers/flags.py} | 170 ----------------- 3 files changed, 183 insertions(+), 170 deletions(-) create mode 100644 lib/spack/spack/test/compilers/__init__.py create mode 100644 lib/spack/spack/test/compilers/detection.py rename lib/spack/spack/test/{compilers.py => compilers/flags.py} (78%) diff --git a/lib/spack/spack/test/compilers/__init__.py b/lib/spack/spack/test/compilers/__init__.py new file mode 100644 index 00000000000..9f87532b851 --- /dev/null +++ b/lib/spack/spack/test/compilers/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) diff --git a/lib/spack/spack/test/compilers/detection.py b/lib/spack/spack/test/compilers/detection.py new file mode 100644 index 00000000000..26a559443ba --- /dev/null +++ b/lib/spack/spack/test/compilers/detection.py @@ -0,0 +1,179 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +import pytest + +import spack.compilers.arm +import spack.compilers.cce +import spack.compilers.clang +import spack.compilers.fj +import spack.compilers.gcc +import spack.compilers.intel +import spack.compilers.nag +import spack.compilers.pgi +import spack.compilers.xl +import spack.compilers.xl_r + + +@pytest.mark.parametrize('version_str,expected_version', [ + ('Arm C/C++/Fortran Compiler version 19.0 (build number 73) (based on LLVM 7.0.2)\n' # NOQA + 'Target: aarch64--linux-gnu\n' + 'Thread model: posix\n' + 'InstalledDir:\n' + '/opt/arm/arm-hpc-compiler-19.0_Generic-AArch64_RHEL-7_aarch64-linux/bin\n', # NOQA + '19.0.0.73'), + ('Arm C/C++/Fortran Compiler version 19.3.1 (build number 75) (based on LLVM 7.0.2)\n' # NOQA + 'Target: aarch64--linux-gnu\n' + 'Thread model: posix\n' + 'InstalledDir:\n' + '/opt/arm/arm-hpc-compiler-19.0_Generic-AArch64_RHEL-7_aarch64-linux/bin\n', # NOQA + '19.3.1.75') +]) +def test_arm_version_detection(version_str, expected_version): + version = spack.compilers.arm.Arm.extract_version_from_output(version_str) + assert version == expected_version + + +@pytest.mark.parametrize('version_str,expected_version', [ + ('Cray C : Version 8.4.6 Mon Apr 15, 2019 12:13:39\n', '8.4.6'), + ('Cray C++ : Version 8.4.6 Mon Apr 15, 2019 12:13:45\n', '8.4.6'), + ('Cray Fortran : Version 8.4.6 Mon Apr 15, 2019 12:13:55\n', '8.4.6') +]) +def test_cce_version_detection(version_str, expected_version): + version = spack.compilers.cce.Cce.extract_version_from_output(version_str) + assert version == expected_version + + +@pytest.mark.regression('10191') +@pytest.mark.parametrize('version_str,expected_version', [ + # macOS clang + ('Apple clang version 11.0.0 (clang-1100.0.33.8)\n' + 'Target: x86_64-apple-darwin18.7.0\n' + 'Thread model: posix\n' + 'InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin\n', # noqa + '11.0.0-apple'), + ('Apple LLVM version 7.0.2 (clang-700.1.81)\n' + 'Target: x86_64-apple-darwin15.2.0\n' + 'Thread model: posix\n', '7.0.2-apple'), + # Other platforms + ('clang version 6.0.1-svn334776-1~exp1~20181018152737.116 (branches/release_60)\n' # noqa + 'Target: x86_64-pc-linux-gnu\n' + 'Thread model: posix\n' + 'InstalledDir: /usr/bin\n', '6.0.1'), + ('clang version 3.1 (trunk 149096)\n' + 'Target: x86_64-unknown-linux-gnu\n' + 'Thread model: posix\n', '3.1'), + ('clang version 8.0.0-3~ubuntu18.04.1 (tags/RELEASE_800/final)\n' + 'Target: x86_64-pc-linux-gnu\n' + 'Thread model: posix\n' + 'InstalledDir: /usr/bin\n', '8.0.0'), + ('clang version 9.0.1-+201911131414230800840845a1eea-1~exp1~20191113231141.78\n' # noqa + 'Target: x86_64-pc-linux-gnu\n' + 'Thread model: posix\n' + 'InstalledDir: /usr/bin\n', '9.0.1'), + ('clang version 8.0.0-3 (tags/RELEASE_800/final)\n' + 'Target: aarch64-unknown-linux-gnu\n' + 'Thread model: posix\n' + 'InstalledDir: /usr/bin\n', '8.0.0') +]) +def test_clang_version_detection(version_str, expected_version): + version = spack.compilers.clang.Clang.extract_version_from_output( + version_str + ) + assert version == expected_version + + +@pytest.mark.parametrize('version_str,expected_version', [ + # C compiler + ('fcc (FCC) 4.0.0 20190314\n' + 'simulating gcc version 6.1\n' + 'Copyright FUJITSU LIMITED 2019', + '4.0.0'), + # C++ compiler + ('FCC (FCC) 4.0.0 20190314\n' + 'simulating gcc version 6.1\n' + 'Copyright FUJITSU LIMITED 2019', + '4.0.0'), + # Fortran compiler + ('frt (FRT) 4.0.0 20190314\n' + 'Copyright FUJITSU LIMITED 2019', + '4.0.0') +]) +def test_fj_version_detection(version_str, expected_version): + version = spack.compilers.fj.Fj.extract_version_from_output(version_str) + assert version == expected_version + + +@pytest.mark.parametrize('version_str,expected_version', [ + # Output of -dumpversion changed to return only major from GCC 7 + ('4.4.7\n', '4.4.7'), + ('7\n', '7') +]) +def test_gcc_version_detection(version_str, expected_version): + version = spack.compilers.gcc.Gcc.extract_version_from_output(version_str) + assert version == expected_version + + +@pytest.mark.parametrize('version_str,expected_version', [ + ('icpc (ICC) 12.1.5 20120612\n' + 'Copyright (C) 1985-2012 Intel Corporation. All rights reserved.\n', + '12.1.5'), + ('ifort (IFORT) 12.1.5 20120612\n' + 'Copyright (C) 1985-2012 Intel Corporation. All rights reserved.\n', + '12.1.5') +]) +def test_intel_version_detection(version_str, expected_version): + version = spack.compilers.intel.Intel.extract_version_from_output( + version_str + ) + assert version == expected_version + + +@pytest.mark.parametrize('version_str,expected_version', [ + ('NAG Fortran Compiler Release 6.0(Hibiya) Build 1037\n' + 'Product NPL6A60NA for x86-64 Linux\n', '6.0') +]) +def test_nag_version_detection(version_str, expected_version): + version = spack.compilers.nag.Nag.extract_version_from_output(version_str) + assert version == expected_version + + +@pytest.mark.parametrize('version_str,expected_version', [ + # Output on x86-64 + ('pgcc 15.10-0 64-bit target on x86-64 Linux -tp sandybridge\n' + 'The Portland Group - PGI Compilers and Tools\n' + 'Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.\n', + '15.10'), + # Output on PowerPC + ('pgcc 17.4-0 linuxpower target on Linuxpower\n' + 'PGI Compilers and Tools\n' + 'Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.\n', + '17.4'), + # Output when LLVM-enabled + ('pgcc-llvm 18.4-0 LLVM 64-bit target on x86-64 Linux -tp haswell\n' + 'PGI Compilers and Tools\n' + 'Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n', + '18.4') +]) +def test_pgi_version_detection(version_str, expected_version): + version = spack.compilers.pgi.Pgi.extract_version_from_output(version_str) + assert version == expected_version + + +@pytest.mark.parametrize('version_str,expected_version', [ + ('IBM XL C/C++ for Linux, V11.1 (5724-X14)\n' + 'Version: 11.01.0000.0000\n', '11.1'), + ('IBM XL Fortran for Linux, V13.1 (5724-X16)\n' + 'Version: 13.01.0000.0000\n', '13.1'), + ('IBM XL C/C++ for AIX, V11.1 (5724-X13)\n' + 'Version: 11.01.0000.0009\n', '11.1'), + ('IBM XL C/C++ Advanced Edition for Blue Gene/P, V9.0\n' + 'Version: 09.00.0000.0017\n', '9.0') +]) +def test_xl_version_detection(version_str, expected_version): + version = spack.compilers.xl.Xl.extract_version_from_output(version_str) + assert version == expected_version + + version = spack.compilers.xl_r.XlR.extract_version_from_output(version_str) + assert version == expected_version diff --git a/lib/spack/spack/test/compilers.py b/lib/spack/spack/test/compilers/flags.py similarity index 78% rename from lib/spack/spack/test/compilers.py rename to lib/spack/spack/test/compilers/flags.py index 4598605fe48..a7d442d48a7 100644 --- a/lib/spack/spack/test/compilers.py +++ b/lib/spack/spack/test/compilers/flags.py @@ -17,17 +17,6 @@ import spack.compiler import spack.compilers as compilers -import spack.compilers.arm -import spack.compilers.cce -import spack.compilers.clang -import spack.compilers.fj -import spack.compilers.gcc -import spack.compilers.intel -import spack.compilers.nag -import spack.compilers.pgi -import spack.compilers.xl -import spack.compilers.xl_r - from spack.compiler import Compiler @@ -582,165 +571,6 @@ def test_xl_r_flags(): 'xl@1.0') -@pytest.mark.parametrize('version_str,expected_version', [ - ('Arm C/C++/Fortran Compiler version 19.0 (build number 73) (based on LLVM 7.0.2)\n' # NOQA - 'Target: aarch64--linux-gnu\n' - 'Thread model: posix\n' - 'InstalledDir:\n' - '/opt/arm/arm-hpc-compiler-19.0_Generic-AArch64_RHEL-7_aarch64-linux/bin\n', # NOQA - '19.0.0.73'), - ('Arm C/C++/Fortran Compiler version 19.3.1 (build number 75) (based on LLVM 7.0.2)\n' # NOQA - 'Target: aarch64--linux-gnu\n' - 'Thread model: posix\n' - 'InstalledDir:\n' - '/opt/arm/arm-hpc-compiler-19.0_Generic-AArch64_RHEL-7_aarch64-linux/bin\n', # NOQA - '19.3.1.75') -]) -def test_arm_version_detection(version_str, expected_version): - version = spack.compilers.arm.Arm.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize('version_str,expected_version', [ - ('Cray C : Version 8.4.6 Mon Apr 15, 2019 12:13:39\n', '8.4.6'), - ('Cray C++ : Version 8.4.6 Mon Apr 15, 2019 12:13:45\n', '8.4.6'), - ('Cray Fortran : Version 8.4.6 Mon Apr 15, 2019 12:13:55\n', '8.4.6') -]) -def test_cce_version_detection(version_str, expected_version): - version = spack.compilers.cce.Cce.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.regression('10191') -@pytest.mark.parametrize('version_str,expected_version', [ - # macOS clang - ('Apple clang version 11.0.0 (clang-1100.0.33.8)\n' - 'Target: x86_64-apple-darwin18.7.0\n' - 'Thread model: posix\n' - 'InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin\n', # noqa - '11.0.0-apple'), - ('Apple LLVM version 7.0.2 (clang-700.1.81)\n' - 'Target: x86_64-apple-darwin15.2.0\n' - 'Thread model: posix\n', '7.0.2-apple'), - # Other platforms - ('clang version 6.0.1-svn334776-1~exp1~20181018152737.116 (branches/release_60)\n' # noqa - 'Target: x86_64-pc-linux-gnu\n' - 'Thread model: posix\n' - 'InstalledDir: /usr/bin\n', '6.0.1'), - ('clang version 3.1 (trunk 149096)\n' - 'Target: x86_64-unknown-linux-gnu\n' - 'Thread model: posix\n', '3.1'), - ('clang version 8.0.0-3~ubuntu18.04.1 (tags/RELEASE_800/final)\n' - 'Target: x86_64-pc-linux-gnu\n' - 'Thread model: posix\n' - 'InstalledDir: /usr/bin\n', '8.0.0'), - ('clang version 9.0.1-+201911131414230800840845a1eea-1~exp1~20191113231141.78\n' # noqa - 'Target: x86_64-pc-linux-gnu\n' - 'Thread model: posix\n' - 'InstalledDir: /usr/bin\n', '9.0.1'), - ('clang version 8.0.0-3 (tags/RELEASE_800/final)\n' - 'Target: aarch64-unknown-linux-gnu\n' - 'Thread model: posix\n' - 'InstalledDir: /usr/bin\n', '8.0.0') -]) -def test_clang_version_detection(version_str, expected_version): - version = compilers.clang.Clang.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize('version_str,expected_version', [ - # C compiler - ('fcc (FCC) 4.0.0 20190314\n' - 'simulating gcc version 6.1\n' - 'Copyright FUJITSU LIMITED 2019', - '4.0.0'), - # C++ compiler - ('FCC (FCC) 4.0.0 20190314\n' - 'simulating gcc version 6.1\n' - 'Copyright FUJITSU LIMITED 2019', - '4.0.0'), - # Fortran compiler - ('frt (FRT) 4.0.0 20190314\n' - 'Copyright FUJITSU LIMITED 2019', - '4.0.0') -]) -def test_fj_version_detection(version_str, expected_version): - version = spack.compilers.fj.Fj.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize('version_str,expected_version', [ - # Output of -dumpversion changed to return only major from GCC 7 - ('4.4.7\n', '4.4.7'), - ('7\n', '7') -]) -def test_gcc_version_detection(version_str, expected_version): - version = spack.compilers.gcc.Gcc.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize('version_str,expected_version', [ - ('icpc (ICC) 12.1.5 20120612\n' - 'Copyright (C) 1985-2012 Intel Corporation. All rights reserved.\n', - '12.1.5'), - ('ifort (IFORT) 12.1.5 20120612\n' - 'Copyright (C) 1985-2012 Intel Corporation. All rights reserved.\n', - '12.1.5') -]) -def test_intel_version_detection(version_str, expected_version): - version = compilers.intel.Intel.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize('version_str,expected_version', [ - ('NAG Fortran Compiler Release 6.0(Hibiya) Build 1037\n' - 'Product NPL6A60NA for x86-64 Linux\n', '6.0') -]) -def test_nag_version_detection(version_str, expected_version): - version = spack.compilers.nag.Nag.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize('version_str,expected_version', [ - # Output on x86-64 - ('pgcc 15.10-0 64-bit target on x86-64 Linux -tp sandybridge\n' - 'The Portland Group - PGI Compilers and Tools\n' - 'Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.\n', - '15.10'), - # Output on PowerPC - ('pgcc 17.4-0 linuxpower target on Linuxpower\n' - 'PGI Compilers and Tools\n' - 'Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.\n', - '17.4'), - # Output when LLVM-enabled - ('pgcc-llvm 18.4-0 LLVM 64-bit target on x86-64 Linux -tp haswell\n' - 'PGI Compilers and Tools\n' - 'Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n', - '18.4') -]) -def test_pgi_version_detection(version_str, expected_version): - version = spack.compilers.pgi.Pgi.extract_version_from_output(version_str) - assert version == expected_version - - -@pytest.mark.parametrize('version_str,expected_version', [ - ('IBM XL C/C++ for Linux, V11.1 (5724-X14)\n' - 'Version: 11.01.0000.0000\n', '11.1'), - ('IBM XL Fortran for Linux, V13.1 (5724-X16)\n' - 'Version: 13.01.0000.0000\n', '13.1'), - ('IBM XL C/C++ for AIX, V11.1 (5724-X13)\n' - 'Version: 11.01.0000.0009\n', '11.1'), - ('IBM XL C/C++ Advanced Edition for Blue Gene/P, V9.0\n' - 'Version: 09.00.0000.0017\n', '9.0') -]) -def test_xl_version_detection(version_str, expected_version): - version = spack.compilers.xl.Xl.extract_version_from_output(version_str) - assert version == expected_version - - version = spack.compilers.xl_r.XlR.extract_version_from_output(version_str) - assert version == expected_version - - @pytest.mark.parametrize('compiler_spec,expected_result', [ ('gcc@4.7.2', False), ('clang@3.3', False), ('clang@8.0.0', True) ]) From 3609f36e60d78a79b774023346d751dd34e506be Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 10 Jun 2020 10:41:21 +0200 Subject: [PATCH 679/802] Renamed flags.py to basics.py --- lib/spack/spack/test/compilers/{flags.py => basics.py} | 2 +- lib/spack/spack/test/compilers/detection.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename lib/spack/spack/test/compilers/{flags.py => basics.py} (99%) diff --git a/lib/spack/spack/test/compilers/flags.py b/lib/spack/spack/test/compilers/basics.py similarity index 99% rename from lib/spack/spack/test/compilers/flags.py rename to lib/spack/spack/test/compilers/basics.py index a7d442d48a7..3e43cd4e84b 100644 --- a/lib/spack/spack/test/compilers/flags.py +++ b/lib/spack/spack/test/compilers/basics.py @@ -2,7 +2,7 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - +"""Test basic behavior of compilers in Spack""" import pytest import sys diff --git a/lib/spack/spack/test/compilers/detection.py b/lib/spack/spack/test/compilers/detection.py index 26a559443ba..90311ad2d32 100644 --- a/lib/spack/spack/test/compilers/detection.py +++ b/lib/spack/spack/test/compilers/detection.py @@ -2,6 +2,7 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +"""Test detection of compiler version""" import pytest import spack.compilers.arm From f2ae9ffdf5d8e9ff9a5d6eca56f03886d45038d1 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Fri, 12 Jun 2020 09:57:26 +0200 Subject: [PATCH 680/802] gcc: Add 7.5.0 --- var/spack/repos/builtin/packages/gcc/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 15ee2d79738..04b2181b626 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -38,6 +38,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): version('8.2.0', sha256='196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080') version('8.1.0', sha256='1d1866f992626e61349a1ccd0b8d5253816222cdc13390dcfaa74b093aa2b153') + version('7.5.0', sha256='b81946e7f01f90528a1f7352ab08cc602b9ccc05d4e44da4bd501c5a189ee661') version('7.4.0', sha256='eddde28d04f334aec1604456e536416549e9b1aa137fc69204e65eb0c009fe51') version('7.3.0', sha256='832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c') version('7.2.0', sha256='1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a') @@ -244,11 +245,11 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # Backport libsanitizer patch for glibc >= 2.31 and 5.3.0 <= gcc <= 9.2.0 # https://bugs.gentoo.org/708346 - patch('glibc-2.31-libsanitizer-1.patch', when='@7.1.0:7.4.0,8.1.0:8.3.0,9.0.0:9.2.0') + patch('glibc-2.31-libsanitizer-1.patch', when='@7.1.0:7.5.0,8.1.0:8.3.0,9.0.0:9.2.0') patch('glibc-2.31-libsanitizer-1-gcc-6.patch', when='@5.3.0:5.5.0,6.1.0:6.5.0') patch('glibc-2.31-libsanitizer-2.patch', when='@8.1.0:8.3.0,9.0.0:9.2.0') patch('glibc-2.31-libsanitizer-2-gcc-6.patch', when='@5.3.0:5.5.0,6.1.0:6.5.0') - patch('glibc-2.31-libsanitizer-2-gcc-7.patch', when='@7.1.0:7.4.0') + patch('glibc-2.31-libsanitizer-2-gcc-7.patch', when='@7.1.0:7.5.0') # Older versions do not compile with newer versions of glibc # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81712 patch('ucontext_t.patch', when='@4.9,5.1:5.4,6.1:6.4,7.1') From e1e455ef3fc507d6937b5548a98f257f1fbe5b89 Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Fri, 12 Jun 2020 12:53:08 -0400 Subject: [PATCH 681/802] magics: add version 4.2.4 (#17054) * Add version 4.2.4 * Update checksum for 4.1.0 * Version @4: requires python and py-jinja2 to build --- var/spack/repos/builtin/packages/magics/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/magics/package.py b/var/spack/repos/builtin/packages/magics/package.py index 627454af755..c9c331eeb5e 100644 --- a/var/spack/repos/builtin/packages/magics/package.py +++ b/var/spack/repos/builtin/packages/magics/package.py @@ -14,12 +14,13 @@ class Magics(CMakePackage): to be as backwards-compatible as possible with the Fortran interface.""" homepage = "https://software.ecmwf.int/wiki/display/MAGP/Magics" - url = "https://confluence.ecmwf.int/download/attachments/3473464/Magics-4.1.0-Source.tar.gz?api=v2" + url = "https://confluence.ecmwf.int/download/attachments/3473464/Magics-4.2.4-Source.tar.gz?api=v2" list_url = "https://software.ecmwf.int/wiki/display/MAGP/Releases" # The policy on which minor releases remain available and which get deleted # after a newer version becomes available is unclear. - version('4.1.0', sha256='e56fb1bf82d57957a61a76284ad22024f4a7c3c989f6f796e57dfd45d88400c0') + version('4.2.4', sha256='920c7dbb1aaabe65a31c6c18010829210f8b2f8d614b6c405dc5a4530e346f07') + version('4.1.0', sha256='da626c31f53716990754dd72ab7b2f3902a8ad924b23ef3309bd14900d170541') version('2.34.3', sha256='38487562e83c0470f94d9c7fb9418cbadf92f1e643033237baba2abdc77e6238') version('2.34.1', sha256='8df27f8f262ebc32a61f8696df15a7b4a6e4203b2a8e53fe7aa13caa1c4e3fa4') version('2.33.0', sha256='32d3079749f89988715a8c3df01b712d9b989b7fd242828ec09563e47c5a3e82') @@ -92,6 +93,10 @@ class Magics(CMakePackage): depends_on('python', when='+python', type=('link', 'run')) depends_on('py-numpy', when='+python', type=('build', 'run')) depends_on('swig', when='+python', type='build') + # Versions @4: supports python 2.7 and 3.x, and require python + # and py-jinja2 for build (even though does not build python interface) + depends_on('python', when='@4.0.0:', type=('build')) + depends_on('py-jinja2', when='@4.0.0:', type=('build')) conflicts('grib=eccodes', when='@:2.29.0', msg='Eccodes is supported starting version 2.29.1') From dcd22517c7258c10cc4403378307eb38c4058d7d Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Fri, 12 Jun 2020 09:53:50 -0700 Subject: [PATCH 682/802] hydrogen: add version 1.3.4 (#17066) --- var/spack/repos/builtin/packages/hydrogen/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index d0aef797e79..c28d0872d90 100644 --- a/var/spack/repos/builtin/packages/hydrogen/package.py +++ b/var/spack/repos/builtin/packages/hydrogen/package.py @@ -18,6 +18,7 @@ class Hydrogen(CMakePackage): maintainers = ['bvanessen'] version('develop', branch='hydrogen') + version('1.3.4', sha256='7979f6656f698f0bbad6798b39d4b569835b3013ff548d98089fce7c283c6741') version('1.3.3', sha256='a51a1cfd40ac74d10923dfce35c2c04a3082477683f6b35e7b558ea9f4bb6d51') version('1.3.2', sha256='50bc5e87955f8130003d04dfd9dcad63107e92b82704f8107baf95b0ccf98ed6') version('1.3.1', sha256='a8b8521458e9e747f2b24af87c4c2749a06e500019c383e0cefb33e5df6aaa1d') From 50aba2729bb3aaa7723affd0c3165a3484253945 Mon Sep 17 00:00:00 2001 From: Robert Blake Date: Fri, 12 Jun 2020 10:42:59 -0700 Subject: [PATCH 683/802] New package: antimony (#17061) --- .../builtin/packages/antimony/package.py | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 var/spack/repos/builtin/packages/antimony/package.py diff --git a/var/spack/repos/builtin/packages/antimony/package.py b/var/spack/repos/builtin/packages/antimony/package.py new file mode 100644 index 00000000000..157a0a2510b --- /dev/null +++ b/var/spack/repos/builtin/packages/antimony/package.py @@ -0,0 +1,54 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Antimony(CMakePackage): + """Human readable language for modifying sbml""" + + homepage = "http://antimony.sourceforge.net/" + url = "antimony" + + maintainers = ['rblake-llnl'] + + version('2.8', sha256='7e3e38706c074b72e241ac56ef4ce23e87ef8c718c70f29b2207f1847c43770f') + version('2.7', sha256='7ad181cac632282ae77ced09388dd92db87ea4683eed8c45f2b43861ae2acad4') + version('2.6', sha256='afc8dc5ec6bc2cd3085038f80362327456f219171b09a13f775b50550c8b1d87') + version('2.5', sha256='138d6b45df62198ca71bd3b3c8fd06920f8a78d7de7f6dbc1b89fa7ea7c7d215') + version('2.4', sha256='1597efa823f9a48f5a40373cbd40386207764807fbc0b79cf20d0f8570a7e54b') + version('2.2', sha256='795c777dd90c28fd8c3f4f8896702744b7389cff2fcf40e797b4bfafbb6f7251') + version('2.0', sha256='778146206e5f420d0e3d30dc25eabc9bad2759bfaf6b4b355bb1f72c5bc9593f') + + def url_for_version(self, version): + url = "https://downloads.sourceforge.net/project/antimony/Antimony source/{0}/antimony_src_v{1}.tar.gz".format(version, version) + return url + + variant("qt", default=False, + description="Build the QT editor.") + variant("python", default=False, + description="Build python bindings.") + + depends_on('sbml~cpp') + depends_on('swig') + depends_on('qt', when="+qt") + depends_on('python', when="+python") + + def cmake_args(self): + spec = self.spec + args = [ + '-DWITH_SBML:BOOL=ON', + '-DWITH_COMP_SBML:BOOL=ON', + '-DWITH_LIBSBML_EXPAT:BOOL=OFF', + '-DWITH_LIBSBML_LIBXML:BOOL=ON', + '-DWITH_LIBSBML_XERCES:BOOL=OFF', + '-DLIBSBML_INSTALL_DIR:PATH=' + spec['sbml'].prefix, + '-DWITH_CELLML:BOOL=OFF', + '-DWITH_SBW:BOOL=OFF', + '-DWITH_SWIG:BOOL=ON', + ] + args.append(self.define_from_variant('WITH_PYTHON', 'python')) + args.append(self.define_from_variant('WITH_QTANTIMONY', "qt")) + return args From 4e39dc7174feb2c9c49b6b89a897348bd47ea253 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 11 Jun 2020 14:09:44 -0500 Subject: [PATCH 684/802] readline: fix linking to ncurses --- var/spack/repos/builtin/packages/readline/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py index 7a15595fa28..0db25205c2c 100644 --- a/var/spack/repos/builtin/packages/readline/package.py +++ b/var/spack/repos/builtin/packages/readline/package.py @@ -29,7 +29,8 @@ class Readline(AutotoolsPackage, GNUMirrorPackage): def build(self, spec, prefix): options = [ - 'SHLIB_LIBS=-L{0} -lncursesw'.format(spec['ncurses'].prefix.lib) + 'SHLIB_LIBS=-L{0} -lncursesw -ltinfo'.format( + spec['ncurses'].prefix.lib) ] make(*options) From 34fb4b30dc5b97de2efde4f32f45b3105c1f701d Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 12 Jun 2020 11:25:06 -0700 Subject: [PATCH 685/802] libffi 3.3: float128 ppc patch (#17043) Apply a patch to fix builds on Power7 and 8, wrongly requesting float128 support. Upstream patch: libffi/libffi#561 --- .../repos/builtin/packages/libffi/package.py | 2 + .../builtin/packages/libffi/powerpc-3.3.patch | 58 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libffi/powerpc-3.3.patch diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py index 0ee50aec07c..5e952497aa5 100644 --- a/var/spack/repos/builtin/packages/libffi/package.py +++ b/var/spack/repos/builtin/packages/libffi/package.py @@ -18,6 +18,8 @@ class Libffi(AutotoolsPackage, SourcewarePackage): version('3.2.1', sha256='d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37') patch('clang-powerpc-3.2.1.patch', when='@3.2.1%clang platform=linux') + # ref.: https://github.com/libffi/libffi/pull/561 + patch('powerpc-3.3.patch', when='@3.3') @property def headers(self): diff --git a/var/spack/repos/builtin/packages/libffi/powerpc-3.3.patch b/var/spack/repos/builtin/packages/libffi/powerpc-3.3.patch new file mode 100644 index 00000000000..4fd32b01028 --- /dev/null +++ b/var/spack/repos/builtin/packages/libffi/powerpc-3.3.patch @@ -0,0 +1,58 @@ +From de93adfb6f48100946bba2c3abad2a77a0cfde0b Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sun, 24 Nov 2019 09:52:01 +0100 +Subject: [PATCH] ffi_powerpc.h: fix build failure with powerpc7 + +This is a patch pulled down from the following: +https://github.com/buildroot/buildroot/blob/78926f610b1411b03464152472fd430012deb9ac/package/libffi/0004-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch + +This issue is being hit on OpenBMC code when pulling the latest +libffi tag and building on a P8 ppc64le machine. I verified this +patch fixes the issue we are seeing. + +Below is the original commit message: + +Sicne commit 73dd43afc8a447ba98ea02e9aad4c6898dc77fb0, build on powerpc7 +fails on: + +In file included from ../src/powerpc/ffi.c:33:0: +../src/powerpc/ffi_powerpc.h:61:9: error: '_Float128' is not supported on this target + typedef _Float128 float128; + ^~~~~~~~~ + +Fix this build failure by checking for __HAVE_FLOAT128 before using +_Float128, as _Float128 is enabled only on specific conditions, see +output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/floatn.h: + + /* Defined to 1 if the current compiler invocation provides a + floating-point type with the IEEE 754 binary128 format, and this glibc + includes corresponding *f128 interfaces for it. */ + #if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \ + && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH + # define __HAVE_FLOAT128 1 + #else + # define __HAVE_FLOAT128 0 + #endif + +Fixes: + - http://autobuild.buildroot.org/results/5c9dd8fb3b6a128882b6250f197c80232d8a3b53 + +Signed-off-by: Fabrice Fontaine +Signed-off-by: Andrew Geissler +--- + src/powerpc/ffi_powerpc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h +index 8e2f2f0e..960a5c42 100644 +--- a/src/powerpc/ffi_powerpc.h ++++ b/src/powerpc/ffi_powerpc.h +@@ -57,7 +57,7 @@ typedef union + double d; + } ffi_dblfl; + +-#if defined(__FLOAT128_TYPE__) ++#if defined(__FLOAT128_TYPE__) && defined(__HAVE_FLOAT128) + typedef _Float128 float128; + #elif defined(__FLOAT128__) + typedef __float128 float128; From 42e6cb769e7d2f30700ba4529c2061e8fed7fcb5 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 12 Jun 2020 11:28:05 -0700 Subject: [PATCH 686/802] Geant4 +Python: fix module load (#17046) Adding `extends('python')` makes sure that a ``` spack load -r geant4 +python python -c "import Geant4" ``` find the module. --- var/spack/repos/builtin/packages/geant4/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py index 4cfcc4395e7..b559557340b 100644 --- a/var/spack/repos/builtin/packages/geant4/package.py +++ b/var/spack/repos/builtin/packages/geant4/package.py @@ -56,6 +56,7 @@ class Geant4(CMakePackage): # Python, with boost requirement dealt with in cxxstd section depends_on('python@3:', when='+python') + extends('python', when='+python') conflicts('+python', when='@:10.6.1', msg='Geant4 <= 10.6.1 cannont be built with Python bindings') From c4756159f37ae9217377cdcb7718a229ec413736 Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Fri, 12 Jun 2020 13:37:34 -0500 Subject: [PATCH 687/802] New package: clinfo (#17042) --- .../repos/builtin/packages/clinfo/package.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 var/spack/repos/builtin/packages/clinfo/package.py diff --git a/var/spack/repos/builtin/packages/clinfo/package.py b/var/spack/repos/builtin/packages/clinfo/package.py new file mode 100644 index 00000000000..1fb78b42aa4 --- /dev/null +++ b/var/spack/repos/builtin/packages/clinfo/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * + + +class Clinfo(MakefilePackage): + """Print all known information about all available OpenCL platforms and + devices in the system.""" + + homepage = "https://github.com/Oblomov/clinfo" + url = "https://github.com/Oblomov/clinfo/archive/2.2.18.04.06.tar.gz" + + maintainers = ['matthiasdiener'] + + version('2.2.18.04.06', sha256='f77021a57b3afcdebc73107e2254b95780026a9df9aa4f8db6aff11c03f0ec6c') + + depends_on('opencl') + + def install(self, spec, prefix): + make('install', 'PREFIX={0}'.format(prefix)) From 08c21e4e74624daf11774d5f16b04f3d9544cbdc Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Fri, 12 Jun 2020 13:38:33 -0500 Subject: [PATCH 688/802] Buildcache: Fix bug in binary string replacement (#17075) * Fix bug in binary string replacement that results in padding being added multiple times * Update comment * Update comment again --- lib/spack/spack/relocate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py index 01a60db6baf..56e7c6632cd 100644 --- a/lib/spack/spack/relocate.py +++ b/lib/spack/spack/relocate.py @@ -846,7 +846,11 @@ def relocate_text_bin( for old_dep_prefix, new_dep_prefix in new_prefixes.items(): if len(new_dep_prefix) <= len(old_dep_prefix): _replace_prefix_bin(binary, old_dep_prefix, new_dep_prefix) - _replace_prefix_bin(binary, orig_spack, new_spack) + _replace_prefix_bin(binary, orig_install_prefix, new_install_prefix) + + # Note: Replacement of spack directory should not be done. This causes + # an incorrect replacement path in the case where the install root is a + # subdirectory of the spack directory. def is_relocatable(spec): From 804b6f24833862bb0110bf460c3ddbf7d22daab4 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 12 Jun 2020 20:39:40 +0200 Subject: [PATCH 689/802] libtree package: add version 1.2.0, 1.1.4, and 1.1.3 (#17035) --- var/spack/repos/builtin/packages/libtree/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/libtree/package.py b/var/spack/repos/builtin/packages/libtree/package.py index d4c2749daa8..10ca8db31db 100644 --- a/var/spack/repos/builtin/packages/libtree/package.py +++ b/var/spack/repos/builtin/packages/libtree/package.py @@ -15,6 +15,9 @@ class Libtree(CMakePackage): maintainers = ['haampie'] + version('1.2.0', sha256='4316a52aed7c8d2f7d2736c935bbda952204be92e56948110a143283764c427c') + version('1.1.4', sha256='cfafb24c8f5e0d356c82777c338d58730ca6f3cb76dfe8a6857ee3ad65bf8be7') + version('1.1.3', sha256='7baf5aaecd3a076bf1e7a1aa86979e7b841ab3f678ca8ac0e2a22bbbccf0dd06') version('1.1.2', sha256='31641c6bf6c2980ffa7b4c57392460434f97ba66fe51fe6346867430b33a0374') version('1.1.1', sha256='3e8543145a40a94e9e2ce9fed003d2bf68294e1fce9607028a286bc132e17dc4') version('1.1.0', sha256='6cf36fb9a4c8c3af01855527d4931110732bb2d1c19be9334c689f1fd1c78536') From cb20f0152c9be3934c679b0853ab919e7e0cb907 Mon Sep 17 00:00:00 2001 From: Harsh Bhatia Date: Fri, 12 Jun 2020 12:20:57 -0700 Subject: [PATCH 690/802] pygpu: fix linking with gpuarray (#17033) * add build_ext_args to link pygpu with gpuarray * libgpuarray: add version 0.7.6 --- .../builtin/packages/libgpuarray/package.py | 1 + .../repos/builtin/packages/py-pygpu/package.py | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libgpuarray/package.py b/var/spack/repos/builtin/packages/libgpuarray/package.py index edaebac7afc..84b0ad541e7 100644 --- a/var/spack/repos/builtin/packages/libgpuarray/package.py +++ b/var/spack/repos/builtin/packages/libgpuarray/package.py @@ -14,6 +14,7 @@ class Libgpuarray(CMakePackage): homepage = "http://deeplearning.net/software/libgpuarray/" url = "https://github.com/Theano/libgpuarray/archive/v0.6.1.tar.gz" + version('0.7.6', sha256='ad1c00dd47c3d36ee1708e5167377edbfcdb7226e837ef9c68b841afbb4a4f6a') version('0.7.5', sha256='39c4d2e743848be43c8819c736e089ae51b11aa446cc6ee05af945c2dfd63420') version('0.7.2', sha256='ef11ee6f8d62d53831277fd3dcab662aa770a5b5de2d30fe3018c4af959204da') version('0.7.1', sha256='4d0f9dd63b0595a8c04d8cee91b2619847c033b011c71d776caa784322382ed6') diff --git a/var/spack/repos/builtin/packages/py-pygpu/package.py b/var/spack/repos/builtin/packages/py-pygpu/package.py index 49dc42eede5..aea59399959 100644 --- a/var/spack/repos/builtin/packages/py-pygpu/package.py +++ b/var/spack/repos/builtin/packages/py-pygpu/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * +import os class PyPygpu(PythonPackage): @@ -12,6 +13,7 @@ class PyPygpu(PythonPackage): homepage = "http://deeplearning.net/software/libgpuarray/" url = "https://github.com/Theano/libgpuarray/archive/v0.6.1.tar.gz" + version('0.7.6', sha256='ad1c00dd47c3d36ee1708e5167377edbfcdb7226e837ef9c68b841afbb4a4f6a') version('0.7.5', sha256='39c4d2e743848be43c8819c736e089ae51b11aa446cc6ee05af945c2dfd63420') version('0.7.2', sha256='ef11ee6f8d62d53831277fd3dcab662aa770a5b5de2d30fe3018c4af959204da') version('0.7.1', sha256='4d0f9dd63b0595a8c04d8cee91b2619847c033b011c71d776caa784322382ed6') @@ -21,7 +23,9 @@ class PyPygpu(PythonPackage): version('0.6.1', sha256='b2466311e0e3bacdf7a586bba0263f6d232bf9f8d785e91ddb447653741e6ea5') version('0.6.0', sha256='a58a0624e894475a4955aaea25e82261c69b4d22c8f15ec07041a4ba176d35af') - depends_on('libgpuarray') + depends_on('libgpuarray@0.7.6', when='@0.7.6') + depends_on('libgpuarray@0.7.5', when='@0.7.5') + depends_on('libgpuarray') # default # not just build-time, requires pkg_resources depends_on('py-setuptools', type=('build', 'run')) depends_on('py-cython@0.25:', type=('build', 'run')) @@ -29,3 +33,13 @@ class PyPygpu(PythonPackage): depends_on('py-numpy', type=('build', 'run')) depends_on('py-mako', type=('build', 'run')) depends_on('check') + + phases = ['build_ext', 'install'] + + def build_ext_args(self, spec, prefix): + + _ = self.spec['libgpuarray'].prefix + include_flags = '-I{0}'.format(os.path.join(_, 'include')) + library_flags = '-L{0}'.format(os.path.join(_, 'lib')) + + return [include_flags, library_flags] From f44a93e4f7014d78cbfa75efb5303944375f8a5d Mon Sep 17 00:00:00 2001 From: Sinan Date: Fri, 12 Jun 2020 12:27:40 -0700 Subject: [PATCH 691/802] New package: alps (#17023) --- .../repos/builtin/packages/alps/mpi.patch | 13 +++++ .../repos/builtin/packages/alps/package.py | 50 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 var/spack/repos/builtin/packages/alps/mpi.patch create mode 100644 var/spack/repos/builtin/packages/alps/package.py diff --git a/var/spack/repos/builtin/packages/alps/mpi.patch b/var/spack/repos/builtin/packages/alps/mpi.patch new file mode 100644 index 00000000000..bd68181eb76 --- /dev/null +++ b/var/spack/repos/builtin/packages/alps/mpi.patch @@ -0,0 +1,13 @@ +diff --git a/alps/src/alps/CMakeLists.txt b/alps/src/alps/CMakeLists.txt +index ae73f13..0d1ba34 100644 +--- a/alps/src/alps/CMakeLists.txt ++++ b/alps/src/alps/CMakeLists.txt +@@ -93,7 +93,7 @@ if (Boost_FOUND) + set(ALPS_LINK_LIBS ${ALPS_LINK_LIBS} ${PYTHON_LIBRARY} ${PYTHON_EXTRA_LIBS}) + endif(PYTHONLIBS_FOUND) + if(MPI_FOUND) +- set(ALPS_LINK_LIBS ${ALPS_LINK_LIBS} ${MPI_LIBRARIES} ${MPI_EXTRA_LIBRARY}) ++ set(ALPS_LINK_LIBS ${ALPS_LINK_LIBS} ${MPI_LIBRARIES}) + endif(MPI_FOUND) + target_link_libraries(alps ${ALPS_LINK_LIBS}) + else (Boost_FOUND) diff --git a/var/spack/repos/builtin/packages/alps/package.py b/var/spack/repos/builtin/packages/alps/package.py new file mode 100644 index 00000000000..55df8729330 --- /dev/null +++ b/var/spack/repos/builtin/packages/alps/package.py @@ -0,0 +1,50 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Alps(CMakePackage): + """Algorithms for Physics Simulations + + Tags: Condensed Matter Physics, Computational Physics + """ + + homepage = "https://alps.comp-phys.org" + url = "http://alps.comp-phys.org/static/software/releases/alps-2.3.0-src.tar.gz" + + version('2.3.0', sha256='e64208d1e5acdd6f569277413c4867e1fa366cf4a224570eacbf1e9939fca2d2') + + # Refs for building from source and recipes + # http://alps.comp-phys.org/mediawiki/index.php/Building_ALPS_from_source + # https://github.com/easybuilders/easybuild-easyconfigs/tree/master/easybuild/easyconfigs/a/ALPS + # https://github.com/conda-forge/alps-feedstock/tree/master/recipe + + # Package failed to build with boost version >= 1.64 + depends_on('boost@:1.63.0 +chrono +date_time +filesystem +iostreams +mpi +numpy +program_options +python +regex +serialization +system +test +thread +timer') + depends_on('fftw') + depends_on('hdf5 ~mpi+hl') + depends_on('lapack') + # build fails for latest python@3.7 + depends_on('python@:3.6.99', type=('build', 'link', 'run')) + depends_on('py-numpy', type=('build', 'run')) + depends_on('py-scipy', type=('build', 'run')) + depends_on('py-matplotlib', type=('build', 'run')) + + # build fails with gcc@7: + conflicts('%gcc@7:') + + # remove a problematic build variable + patch('mpi.patch') + + extends('python') + + root_cmakelists_dir = 'alps' + + def cmake_args(self): + args = [] + args.append('Boost_ROOT_DIR=' + self.spec['boost'].prefix) + args.append("-DCMAKE_CXX_FLAGS={0}".format(self.compiler.cxx98_flag)) + return args From b90780d256f88ef081b11b3400155d155dcc76e0 Mon Sep 17 00:00:00 2001 From: John Jolly Date: Tue, 9 Jun 2020 12:21:23 -0600 Subject: [PATCH 692/802] cscope: Link tinfow instead of tinfo Whenever attempting to use any ncurses functionality within cscope, a page fault would result within the ncurses library. Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7fad3cf in termattrs_sp () from .../lib/libncursesw.so.6 (gdb) bt #0 0x00007ffff7fad3cf in termattrs_sp () from .../lib/libncursesw.so.6 #1 0x00007ffff7faa794 in _nc_setupscreen_sp () from .../lib/libncursesw.so.6 #2 0x00007ffff7fa614c in newterm_sp () from .../lib/libncursesw.so.6 #3 0x00007ffff7fa65b9 in newterm () from .../lib/libncursesw.so.6 #4 0x00007ffff7fa2970 in initscr () from .../lib/libncursesw.so.6 #5 0x0000000000403dc2 in main (argc=, argv=0x7fffffffcea8) at main.c:574 This is due to a conflict between libtinfo.so and libtinfow.so. Both are linked into cscope: $ ldd $(which cscope) /bin/bash: .../lib/libtinfo.so.6: no version information available (required by /bin/bash) linux-vdso.so.1 (0x00007fff5dbcb000) libncursesw.so.6 => .../lib/libncursesw.so.6 (0x00007f435cc69000) libtinfo.so.6 => .../lib/libtinfo.so.6 (0x00007f435cc2c000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f435ca29000) libtinfow.so.6 => .../lib/libtinfow.so.6 (0x00007f435c9e8000) /lib64/ld-linux-x86-64.so.2 (0x00007f435cca7000) Specifically linking libtinfow.so instead of libtinfo.so resolves the issue. All instances of '...' above represent the path to the installed ncurses for Spack. --- var/spack/repos/builtin/packages/cscope/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cscope/package.py b/var/spack/repos/builtin/packages/cscope/package.py index 2682ffea704..a829b1e1e51 100644 --- a/var/spack/repos/builtin/packages/cscope/package.py +++ b/var/spack/repos/builtin/packages/cscope/package.py @@ -21,7 +21,7 @@ class Cscope(AutotoolsPackage): depends_on('bison', type='build') depends_on('pkgconfig', type='build') - build_targets = ['CURSES_LIBS=-lncursesw -ltinfo'] + build_targets = ['CURSES_LIBS=-lncursesw -ltinfow'] def url_for_version(self, version): url = "https://sourceforge.net/projects/cscope/files/cscope/{0}{1}/cscope-{1}.tar.gz" From 0c1f1af571bce8b1bc0a89172714cac00e69d66b Mon Sep 17 00:00:00 2001 From: h-denpo <57649496+h-denpo@users.noreply.github.com> Date: Sat, 13 Jun 2020 04:31:04 +0900 Subject: [PATCH 693/802] New package: FrontFlow Blue (#16901) * New package: FrontFlow Blue Computational Fluid Dynamics Software for aeroacoustics * Modify Package ->MakefilePackage * Update var/spack/repos/builtin/packages/ffb/package.py Co-authored-by: Greg Becker * Update var/spack/repos/builtin/packages/ffb/package.py Co-authored-by: Greg Becker Co-authored-by: Greg Becker --- .../repos/builtin/packages/ffb/package.py | 151 ++++++++++++++++++ .../packages/ffb/revocap_refiner.patch | 24 +++ 2 files changed, 175 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ffb/package.py create mode 100644 var/spack/repos/builtin/packages/ffb/revocap_refiner.patch diff --git a/var/spack/repos/builtin/packages/ffb/package.py b/var/spack/repos/builtin/packages/ffb/package.py new file mode 100644 index 00000000000..e7c1272a134 --- /dev/null +++ b/var/spack/repos/builtin/packages/ffb/package.py @@ -0,0 +1,151 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os +from spack import * + + +class Ffb(MakefilePackage): + """Computational Fluid Dynamics Software for aeroacoustics""" + + homepage = "http://www.ciss.iis.u-tokyo.ac.jp/dl/index.php" + url = "file://{0}/FrontFlow_blue.8.1.tar.gz".format(os.getcwd()) + version('8.1', sha256='1ad008c909152b6c27668bafbad820da3e6ec3309c7e858ddb785f0a3d6e43ae') + + patch('revocap_refiner.patch') + + depends_on('mpi') + depends_on('blas') + depends_on('scalapack') + + parallel = False + + def flag_handler(self, name, flags): + opt_flag_found = any(f in self.compiler.opt_flags for f in flags) + if name == 'cflags': + if not opt_flag_found: + flags.append('-O3') + elif name == 'cxxflags': + if not opt_flag_found: + flags.append('-O2') + flags.append(self.compiler.cxx_pic_flag) + if name == 'fflags': + if not opt_flag_found: + flags.append('-O3') + flags.append('-mcmodel=large') + if name in ('cflags', 'cxxflags', 'fflags'): + return (None, flags, None) + else: + return (flags, None, flags) + + def edit(self, spec, prefix): + workdir = os.getcwd() + cflags = env['CFLAGS'] + cxxflags = env['CXXFLAGS'] + fflags = env['FFLAGS'] + + make = join_path('make', 'makefile') + m = FileFilter(make) + m.filter( + r'#LES3DHOME =', 'LES3DHOME= {0}\n'.format(workdir)) + make = join_path('make', 'OPTION') + m = FileFilter(make) + m.filter(r'CCOM\s*=.*$', 'CCOM = {0}'.format(spack_cc)) + m.filter(r'COPT\s*=.*$', 'COPT = {0}'.format(cflags)) + m.filter(r'FCOM\s*=.*$', 'FCOM = {0}\n'.format(spack_fc)) + m.filter(r'FOPT\s*=.*$', 'FOPT = {0}\n'.format(fflags)) + m.filter(r'INCDIR\s*=.*$', 'INCDIR = {0}\n' + .format(spec['mpi'].headers.directories[0])) + m.filter(r'LIBDIR\s*=.*$', 'LIBDIR = {0}\n' + .format(spec['mpi'].libs.directories[0])) + + srcdir = join_path('lib', 'src') + utildir = join_path(workdir, 'util') + with open(join_path('make', 'Makeall'), 'w') as m: + m.write('#!/bin/csh -f\n') + m.write('setenv LES3DHOME {0}\n'.format(workdir)) + m.write('cd {0}\n'.format(srcdir)) + m.write('./Makeall\n') + m.write('cd {0}\n'.format(utildir)) + m.write('./Makeall\n') + + makeall = join_path('lib', 'src', 'dd_mpi', 'Makeall') + dd_mpi_dir = join_path('lib', 'src', 'dd_mpi') + with open(makeall, 'w') as m: + m.write('#!/bin/csh -f\n') + m.write('setenv LES3DHOME {0}\n'.format(workdir)) + m.write('cd {0}\n'.format(dd_mpi_dir)) + m.write('make lib\n') + os.chmod(makeall, 0o755) + + makeall = join_path('.', 'Makeall.les') + les3d_dir = join_path('util', 'les3d.mpi') + les3c_dir = join_path('util', 'les3c.mpi') + les3ct_dir = join_path('util', 'les3ct.mpi') + les3x_dir = join_path('util', 'les3x.mpi') + with open(makeall, 'w') as m: + m.write('#!/bin/csh -f\n') + m.write('setenv LES3DHOME {0}\n'.format(workdir)) + m.write('cd {0}\n'.format(join_path(workdir, les3d_dir))) + m.write('make CCOM={0}'.format(spec['mpi'].mpicc)) + m.write(' FCOM={0}\n'.format(spec['mpi'].mpifc)) + m.write('cd {0}\n'.format(join_path(workdir, les3c_dir))) + m.write('make CCOM={0}'.format(spec['mpi'].mpicc)) + m.write(' FCOM={0}\n'.format(spec['mpi'].mpifc)) + m.write('cd {0}\n'.format(join_path(workdir, les3ct_dir))) + m.write('make CCOM={0}'.format(spec['mpi'].mpicc)) + m.write(' FCOM={0}\n'.format(spec['mpi'].mpifc)) + m.write('cd {0}\n'.format(join_path(workdir, les3x_dir))) + m.write('make CCOM={0}'.format(spec['mpi'].mpicc)) + m.write(' FCOM={0}\n'.format(spec['mpi'].mpifc)) + + for d in [les3c_dir, les3ct_dir, les3d_dir]: + editfile = join_path(d, 'FILES') + m = FileFilter(editfile) + m.filter(r'-lmpi_f77', '') + os.chmod(makeall, 0o755) + + editfile = join_path('lib', 'src', 'REVOCAP_Refiner-0.4.3', 'OPTIONS') + m = FileFilter(editfile) + m.filter(r'ARCH\s*=.*$', 'ARCH= $(shell arch)-linux') + m.filter(r'CC\s*=.*$', 'CC={0}'.format(spack_cc)) + m.filter(r'CFLAGS\s*=.*$', 'CFLAGS={0}'.format(cflags)) + m.filter(r'CXX\s*=.*$', 'CXX={0}'.format(spack_cxx)) + m.filter(r'CXXFLAGS\s*=.*$', + 'CXXFLAGS={0}'.format(cxxflags)) + m.filter(r'F90\s*=.*$', 'CC={0}'.format(spack_fc)) + m.filter(r'LD\s*=.*$', 'LD={0}'.format(spack_fc)) + m.filter(r'LIBPATH\s*=.*$', 'LIBPATH= ') + m.filter(r'FFLAGS\s*=.*$', 'FFLAGS={0}'.format(fflags)) + m.filter(r'LDFLAGS\s*=.*$', 'LDFLAGS={0}'.format(fflags)) + + editfile = join_path('lib', 'src', 'ParMetis-3.1', 'Makefile.in') + m = FileFilter(editfile) + m.filter(r'CC \s*=.*$', 'CC ={0}'.format(spack_cc)) + m.filter(r'INCDIR\s*=.*$', 'INCDIR = \n') + + editfile = join_path('util', 'xvx2gf', 'Makefile') + m = FileFilter(editfile) + m.filter( + r'#LES3DHOME =', 'LES3DHOME= {0}\n'.format(workdir)) + m.filter(r'g\+\+', (spack_cxx)) + + editfile = join_path('util', 'les3x.mpi', 'FILES') + m = FileFilter(editfile) + m.filter(r'LIBS = -lfort -lgf2 -ldd_mpi -lmpi_f77', + 'LIBS = -lfort -lgf2 -ldd_mpi') + + def build(self, spec, prefix): + for m in [join_path('make', 'Makeall'), + join_path('lib', 'src', 'dd_mpi', 'Makeall'), + join_path('.', 'Makeall.les')]: + Executable(m)() + + def install(self, spec, prefix): + install_tree('bin', prefix.bin) + install_tree('macro', prefix.macro) + + def setup_run_environment(self, env): + env.prepend_path('PATH', prefix.macro) diff --git a/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch b/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch new file mode 100644 index 00000000000..20886120cbd --- /dev/null +++ b/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch @@ -0,0 +1,24 @@ +diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h +--- FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2013-03-26 10:09:31.000000000 +0900 ++++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2020-05-29 16:35:09.690918296 +0900 +@@ -64,7 +64,7 @@ public: + numY = this->ynum; + numZ = this->znum; + }; +- void getSize(void) const{ ++ int getSize(void) const{ + return this->xnum * this->ynum * this->znum; + }; + +diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h +--- FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h 2013-03-26 10:09:31.000000000 +0900 ++++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h 2020-05-29 16:35:48.756606155 +0900 +@@ -13,7 +13,7 @@ + # # + ----------------------------------------------------------------------*/ + #pragma once +- ++#include + #ifndef PI + #define PI 3.1415926535897932384626 + #endif From 67b86623a229f4bc379dfc6d0ae773445eaf8d7c Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Fri, 12 Jun 2020 16:25:34 -0400 Subject: [PATCH 694/802] bazel: patch to allow py-tensorflow (and likely other bazel packages) to build. (#17013) bazel uses gcc's -MF option to write dependencies to a file. Post-compilation, bazel reads this file and makes some determinations. "Since gcc is given only relative paths on the command line, non-system include paths here should never be absolute. If they are, it's probably due to a non-hermetic #include, & we should stop the build with an error." Spack directly injects absolute paths, which appear in this file and cause bazel to fail the build despite the fact that compilation succeeded. This patch disables this failure mode by default, and allows for it to be turned back on by using the '~nodepfail' variant. --- .../builtin/packages/bazel/disabledepcheck.patch | 11 +++++++++++ .../builtin/packages/bazel/disabledepcheck_old.patch | 11 +++++++++++ var/spack/repos/builtin/packages/bazel/package.py | 5 +++++ 3 files changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/bazel/disabledepcheck.patch create mode 100644 var/spack/repos/builtin/packages/bazel/disabledepcheck_old.patch diff --git a/var/spack/repos/builtin/packages/bazel/disabledepcheck.patch b/var/spack/repos/builtin/packages/bazel/disabledepcheck.patch new file mode 100644 index 00000000000..c15d3bf64a1 --- /dev/null +++ b/var/spack/repos/builtin/packages/bazel/disabledepcheck.patch @@ -0,0 +1,11 @@ +--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java.orig 2020-03-25 08:54:37.914186251 -0400 ++++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java 2020-03-25 08:55:01.356250657 -0400 +@@ -148,7 +148,7 @@ + if (execPath.startsWith(execRoot)) { + execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path + } else { +- problems.add(execPathFragment.getPathString()); ++ // problems.add(execPathFragment.getPathString()); + continue; + } + } diff --git a/var/spack/repos/builtin/packages/bazel/disabledepcheck_old.patch b/var/spack/repos/builtin/packages/bazel/disabledepcheck_old.patch new file mode 100644 index 00000000000..dd23972d992 --- /dev/null +++ b/var/spack/repos/builtin/packages/bazel/disabledepcheck_old.patch @@ -0,0 +1,11 @@ +--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java.orig 2020-06-08 13:42:14.035342560 -0400 ++++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java 2020-06-08 13:42:25.149375458 -0400 +@@ -963,7 +963,7 @@ + // are, it's probably due to a non-hermetic #include, & we should stop + // the build with an error. + if (execPath.startsWith(execRoot)) { +- execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path ++ // execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path + } else { + problems.add(execPathFragment.getPathString()); + continue; diff --git a/var/spack/repos/builtin/packages/bazel/package.py b/var/spack/repos/builtin/packages/bazel/package.py index abe427c9603..a3bd59a8b1b 100644 --- a/var/spack/repos/builtin/packages/bazel/package.py +++ b/var/spack/repos/builtin/packages/bazel/package.py @@ -94,6 +94,8 @@ class Bazel(Package): version('0.3.1', sha256='218d0e28b4d1ee34585f2ac6b18d169c81404d93958815e73e60cc0368efcbb7') version('0.3.0', sha256='357fd8bdf86034b93902616f0844bd52e9304cccca22971ab7007588bf9d5fb3') + variant('nodepfail', default=True, description='Disable failing dependency checks due to injected absolute paths - required for most builds using bazel with spack') + # https://docs.bazel.build/versions/master/install-compile-source.html#bootstrap-bazel # Until https://github.com/spack/spack/issues/14058 is fixed, use jdk to build bazel # Strict dependency on java@8 as per @@ -128,6 +130,9 @@ class Bazel(Package): patch('compile-0.4.patch', when='@0.4:0.5') patch('compile-0.3.patch', when='@:0.3') + patch('disabledepcheck.patch', when='@0.3.2:+nodepfail') + patch('disabledepcheck_old.patch', when='@0.3.0:0.3.1+nodepfail') + phases = ['bootstrap', 'install'] def url_for_version(self, version): From ea8a0be465b0329cfb4a6b29e02da0dbb4650f6e Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Fri, 12 Jun 2020 14:05:12 -0700 Subject: [PATCH 695/802] add compilers to mpi setup_run_environment methods forall mpi implementations (#17015) --- .../builtin/packages/fujitsu-mpi/package.py | 5 +++++ .../builtin/packages/intel-mpi/package.py | 6 ++++++ .../packages/intel-parallel-studio/package.py | 6 ++++++ .../repos/builtin/packages/mpich/package.py | 7 ++++++- .../repos/builtin/packages/mpt/package.py | 13 +++++++++--- .../builtin/packages/mvapich2/package.py | 20 +++++++++++++------ .../repos/builtin/packages/openmpi/package.py | 8 +++++++- .../builtin/packages/spectrum-mpi/package.py | 19 ++++++++++++++++++ 8 files changed, 73 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py index 62da3aab01e..c0a882ec4c7 100644 --- a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py +++ b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py @@ -34,6 +34,11 @@ def setup_dependent_package(self, module, dependent_spec): self.spec.mpifc = self.prefix.bin.mpifrt def setup_dependent_build_environment(self, env, dependent_spec): + self.setup_run_environment(env) + + def setup_run_environment(self, env): + # Because MPI are both compilers and runtimes, we set up the compilers + # as part of run environment env.set('MPICC', self.prefix.bin.mpifcc) env.set('MPICXX', self.prefix.bin.mpiFCC) env.set('MPIF77', self.prefix.bin.mpifrt) diff --git a/var/spack/repos/builtin/packages/intel-mpi/package.py b/var/spack/repos/builtin/packages/intel-mpi/package.py index 15cb84150ef..52e93e66728 100644 --- a/var/spack/repos/builtin/packages/intel-mpi/package.py +++ b/var/spack/repos/builtin/packages/intel-mpi/package.py @@ -63,3 +63,9 @@ def setup_dependent_build_environment(self, *args): 'F90': spack_fc, 'FC': spack_fc, }) + + def setup_run_environment(self, env): + super(self, IntelMpi).setup_run_environment(env) + + for name, value in self.mpi_compiler.wrappers.items(): + env.set(name, value) diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index 410cd4045e4..f59aa2b7ea6 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -225,3 +225,9 @@ def setup_dependent_build_environment(self, *args): 'F90': spack_fc, 'FC': spack_fc, }) + + def setup_run_environment(self, env): + super(self, IntelParallelStudio).setup_run_environment(env) + + for name, value in self.mpi_compiler_wrappers.items(): + env.set(name, value) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 042c2c5b124..c9c7886a088 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -160,7 +160,9 @@ def setup_build_environment(self, env): if self.spec.satisfies('%gcc@10:'): env.set('FFLAGS', '-fallow-argument-mismatch') - def setup_dependent_build_environment(self, env, dependent_spec): + def setup_run_environment(self, env): + # Because MPI implementations provide compilers, they have to add to + # their run environments the code to make the compilers available. # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers. # Cray MPIs always have cray in the module name, e.g. "cray-mpich" if self.spec.external_module and 'cray' in self.spec.external_module: @@ -174,6 +176,9 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.set('MPIF77', join_path(self.prefix.bin, 'mpif77')) env.set('MPIF90', join_path(self.prefix.bin, 'mpif90')) + def setup_dependent_build_environment(self, env, dependent_spec): + self.setup_run_environment(env) + env.set('MPICH_CC', spack_cc) env.set('MPICH_CXX', spack_cxx) env.set('MPICH_F77', spack_f77) diff --git a/var/spack/repos/builtin/packages/mpt/package.py b/var/spack/repos/builtin/packages/mpt/package.py index 12f7202ebc6..45dfce6ba5b 100644 --- a/var/spack/repos/builtin/packages/mpt/package.py +++ b/var/spack/repos/builtin/packages/mpt/package.py @@ -39,13 +39,20 @@ def libs(self): ) def setup_dependent_build_environment(self, env, dependent_spec): + self.setup_run_environment(env) + + # use the Spack compiler wrappers under MPI + env.set('MPICC_CC', spack_cc) + env.set('MPICXX_CXX', spack_cxx) + env.set('MPIF90_F90', spack_fc) + + def setup_run_environment(self, env): + # Because MPI is both runtime and compiler, we have to setup the mpi + # compilers as part of the run environment. env.set('MPICC', self.prefix.bin.mpicc) env.set('MPICXX', self.prefix.bin.mpicxx) env.set('MPIF77', self.prefix.bin.mpif77) env.set('MPIF90', self.prefix.bin.mpif90) - env.set('MPICC_CC', spack_cc) - env.set('MPICXX_CXX', spack_cxx) - env.set('MPIF90_F90', spack_fc) def setup_dependent_package(self, module, dependent_spec): if 'platform=cray' in self.spec: diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 0fb3c36b289..dac9b69c496 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -208,7 +208,21 @@ def setup_run_environment(self, env): if 'process_managers=slurm' in self.spec: env.set('SLURM_MPI_TYPE', 'pmi2') + # Because MPI functions as a compiler, we need to treat it as one and + # add its compiler paths to the run environment. + self.setup_compiler_environment(env) + def setup_dependent_build_environment(self, env, dependent_spec): + self.setup_compiler_environment(env) + + # use the Spack compiler wrappers under MPI + env.set('MPICH_CC', spack_cc) + env.set('MPICH_CXX', spack_cxx) + env.set('MPICH_F77', spack_f77) + env.set('MPICH_F90', spack_fc) + env.set('MPICH_FC', spack_fc) + + def setup_compiler_environment(self, env): # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers. # Cray MPIs always have cray in the module name, e.g. "cray-mvapich" if self.spec.external_module and 'cray' in self.spec.external_module: @@ -222,12 +236,6 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.set('MPIF77', join_path(self.prefix.bin, 'mpif77')) env.set('MPIF90', join_path(self.prefix.bin, 'mpif90')) - env.set('MPICH_CC', spack_cc) - env.set('MPICH_CXX', spack_cxx) - env.set('MPICH_F77', spack_f77) - env.set('MPICH_F90', spack_fc) - env.set('MPICH_FC', spack_fc) - def setup_dependent_package(self, module, dependent_spec): # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers. # Cray MPIs always have cray in the module name, e.g. "cray-mvapich" diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index abe7b1d3ee2..b3dcac253e2 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -297,12 +297,18 @@ def libs(self): libraries, root=self.prefix, shared=True, recursive=True ) - def setup_dependent_build_environment(self, env, dependent_spec): + def setup_run_environment(self, env): + # Because MPI is both a runtime and a compiler, we have to setup the + # compiler components as part of the run environment. env.set('MPICC', join_path(self.prefix.bin, 'mpicc')) env.set('MPICXX', join_path(self.prefix.bin, 'mpic++')) env.set('MPIF77', join_path(self.prefix.bin, 'mpif77')) env.set('MPIF90', join_path(self.prefix.bin, 'mpif90')) + def setup_dependent_build_environment(self, env, dependent_spec): + self.setup_run_environment(env) + + # Use the spack compiler wrappers under MPI env.set('OMPI_CC', spack_cc) env.set('OMPI_CXX', spack_cxx) env.set('OMPI_FC', spack_fc) diff --git a/var/spack/repos/builtin/packages/spectrum-mpi/package.py b/var/spack/repos/builtin/packages/spectrum-mpi/package.py index 8cdd82e2ae1..8ec206adae3 100644 --- a/var/spack/repos/builtin/packages/spectrum-mpi/package.py +++ b/var/spack/repos/builtin/packages/spectrum-mpi/package.py @@ -56,3 +56,22 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.set('OMPI_F77', spack_f77) env.prepend_path('LD_LIBRARY_PATH', self.prefix.lib) + + def setup_run_environment(self, env): + # Because MPI functions as a compiler we need to setup the compilers + # in the run environment, like any compiler + if '%xl' in self.spec or '%xl_r' in self.spec: + env.set('MPICC', os.path.join(self.prefix.bin, 'mpixlc')) + env.set('MPICXX', os.path.join(self.prefix.bin, 'mpixlC')) + env.set('MPIF77', os.path.join(self.prefix.bin, 'mpixlf')) + env.set('MPIF90', os.path.join(self.prefix.bin, 'mpixlf')) + elif '%pgi' in self.spec: + env.set('MPICC', os.path.join(self.prefix.bin, 'mpipgicc')) + env.set('MPICXX', os.path.join(self.prefix.bin, 'mpipgic++')) + env.set('MPIF77', os.path.join(self.prefix.bin, 'mpipgifort')) + env.set('MPIF90', os.path.join(self.prefix.bin, 'mpipgifort')) + else: + env.set('MPICC', os.path.join(self.prefix.bin, 'mpicc')) + env.set('MPICXX', os.path.join(self.prefix.bin, 'mpic++')) + env.set('MPIF77', os.path.join(self.prefix.bin, 'mpif77')) + env.set('MPIF90', os.path.join(self.prefix.bin, 'mpif90')) From 416e94be7294ccfc3f8d9666c75f2790bb58089f Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Sat, 13 Jun 2020 03:06:15 +0200 Subject: [PATCH 696/802] xrootd: new versions (#17076) --- var/spack/repos/builtin/packages/xrootd/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/xrootd/package.py b/var/spack/repos/builtin/packages/xrootd/package.py index 24f966395d7..aed32e712b5 100644 --- a/var/spack/repos/builtin/packages/xrootd/package.py +++ b/var/spack/repos/builtin/packages/xrootd/package.py @@ -13,6 +13,8 @@ class Xrootd(CMakePackage): homepage = "http://xrootd.org" url = "http://xrootd.org/download/v4.6.0/xrootd-4.6.0.tar.gz" + version('4.12.3', sha256='6f2ca1accc8d49d605706bb556777c753860bf46d845b1ee11393a5cb5987f15') + version('4.12.2', sha256='29f7bc3ea51b9d5d310eabd177152245d4160223325933c67f938ed5120f67bb') version('4.12.1', sha256='7350d9196a26d17719b839fd242849e3995692fda25f242e67ac6ec907218d13') version('4.12.0', sha256='69ef4732256d9a88127de4bfdf96bbf73348e0c70ce1d756264871a0ffadd2fc') version('4.11.3', sha256='8e7a64fd55dfb452b6d5f76a9a97c493593943227b377623a3032da9197c7f65') From 2b58b3a1bfc5c30f8640601f3bfd2db8b723eb3a Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 12 Jun 2020 18:12:35 -0700 Subject: [PATCH 697/802] replace 'no' with 'none' as possible value of 'threads' variant (#17063) --- .../repos/builtin/packages/libflame/package.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/libflame/package.py b/var/spack/repos/builtin/packages/libflame/package.py index 1a8de4b47a4..7d7a9837d34 100644 --- a/var/spack/repos/builtin/packages/libflame/package.py +++ b/var/spack/repos/builtin/packages/libflame/package.py @@ -30,9 +30,9 @@ class Libflame(AutotoolsPackage): ' to their corresponding native C implementations' ' in libflame.') - variant('threads', default='no', + variant('threads', default='none', description='Multithreading support', - values=('pthreads', 'openmp', 'no'), + values=('pthreads', 'openmp', 'none'), multi=False) variant('static', default=True, @@ -70,6 +70,12 @@ def flag_handler(self, name, flags): flags.append('-std=gnu99') return (flags, None, None) + def enable_or_disable_threads(self, variant, options): + opt_val = self.spec.variants['threads'].value + if variant_val == 'none': + opt_val = 'no' + return ['--enable-multithreading={0}'.format(opt_val)] + def configure_args(self): # Libflame has a secondary dependency on BLAS, # but doesn't know which library name to expect: @@ -96,10 +102,9 @@ def configure_args(self): else: config_args.append("--disable-debug") - config_args.append('--enable-multithreading=' - + self.spec.variants['threads'].value) + config_args.extend(self.enable_or_disable('threads')) - if 'no' != self.spec.variants['threads'].value: + if 'none' != self.spec.variants['threads'].value: config_args.append("--enable-supermatrix") else: config_args.append("--disable-supermatrix") From 405303638819fbc8a16714a91ed36e344131dee0 Mon Sep 17 00:00:00 2001 From: darmac Date: Sat, 13 Jun 2020 09:18:38 +0800 Subject: [PATCH 698/802] fix depends issue and support for aarch64 (#17045) --- .../repos/builtin/packages/mysql/package.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/mysql/package.py b/var/spack/repos/builtin/packages/mysql/package.py index 7501d57cbd0..80b49865b6f 100644 --- a/var/spack/repos/builtin/packages/mysql/package.py +++ b/var/spack/repos/builtin/packages/mysql/package.py @@ -22,6 +22,7 @@ class Mysql(CMakePackage): version('8.0.13', sha256='d85eb7f98b6aa3e2c6fe38263bf40b22acb444a4ce1f4668473e9e59fb98d62e') version('8.0.12', sha256='69f16e20834dbc60cb28d6df7351deda323330b9de685d22415f135bcedd1b20') version('8.0.11', sha256='3bde3e30d5d4afcedfc6db9eed5c984237ac7db9480a9cc3bddc026d50700bf9') + version('5.7.27', sha256='f8b65872a358d6f5957de86715c0a3ef733b60451dad8d64a8fd1a92bf091bba') version('5.7.26', sha256='5f01d579a20199e06fcbc28f0801c3cb545a54a2863ed8634f17fe526480b9f1') version('5.7.25', sha256='53751c6243806103114567c1a8b6a3ec27f23c0e132f377a13ce1eb56c63723f') version('5.7.24', sha256='05bf0c92c6a97cf85b67fff1ac83ca7b3467aea2bf306374d727fa4f18431f87') @@ -77,11 +78,16 @@ class Mysql(CMakePackage): # Each version of MySQL requires a specific version of boost # See BOOST_PACKAGE_NAME in cmake/boost.cmake - # 8.0.16+ - depends_on('boost@1.69.0 cxxstd=98', type='build', when='@8.0.16: cxxstd=98') - depends_on('boost@1.69.0 cxxstd=11', type='build', when='@8.0.16: cxxstd=11') - depends_on('boost@1.69.0 cxxstd=14', type='build', when='@8.0.16: cxxstd=14') - depends_on('boost@1.69.0 cxxstd=17', type='build', when='@8.0.16: cxxstd=17') + # 8.0.19+ + depends_on('boost@1.70.0 cxxstd=98', type='build', when='@8.0.19: cxxstd=98') + depends_on('boost@1.70.0 cxxstd=11', type='build', when='@8.0.19: cxxstd=11') + depends_on('boost@1.70.0 cxxstd=11', type='build', when='@8.0.19: cxxstd=14') + depends_on('boost@1.70.0 cxxstd=17', type='build', when='@8.0.19: cxxstd=17') + # 8.0.16--8.0.18 + depends_on('boost@1.69.0 cxxstd=98', type='build', when='@8.0.16:8.0.18 cxxstd=98') + depends_on('boost@1.69.0 cxxstd=11', type='build', when='@8.0.16:8.0.18 cxxstd=11') + depends_on('boost@1.69.0 cxxstd=14', type='build', when='@8.0.16:8.0.18 cxxstd=14') + depends_on('boost@1.69.0 cxxstd=17', type='build', when='@8.0.16:8.0.18 cxxstd=17') # 8.0.14--8.0.15 depends_on('boost@1.68.0 cxxstd=98', type='build', when='@8.0.14:8.0.15 cxxstd=98') depends_on('boost@1.68.0 cxxstd=11', type='build', when='@8.0.14:8.0.15 cxxstd=11') @@ -103,6 +109,7 @@ class Mysql(CMakePackage): depends_on('boost@1.59.0 cxxstd=14', when='@5.7.0:5.7.999 cxxstd=14') depends_on('boost@1.59.0 cxxstd=17', when='@5.7.0:5.7.999 cxxstd=17') + depends_on('rpcsvc-proto') depends_on('ncurses') depends_on('openssl') depends_on('libtirpc', when='@5.7.0:') From a69a213b9b5dad7c5853e964edc77adfc05768c8 Mon Sep 17 00:00:00 2001 From: Ross Miller Date: Fri, 12 Jun 2020 21:19:28 -0400 Subject: [PATCH 699/802] New recipe for building the Log4C package (#17038) * New recipe for building the Log4C package * Update Copyright notice --- .../repos/builtin/packages/log4c/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/log4c/package.py diff --git a/var/spack/repos/builtin/packages/log4c/package.py b/var/spack/repos/builtin/packages/log4c/package.py new file mode 100644 index 00000000000..afc9da054a2 --- /dev/null +++ b/var/spack/repos/builtin/packages/log4c/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Log4c(AutotoolsPackage): + """Library for writing log messages from C programs""" + + homepage = "http://log4c.sourceforge.net/" + url = "https://downloads.sourceforge.net/project/log4c/log4c/1.2.4/log4c-1.2.4.tar.gz" + + version('1.2.4', sha256='5991020192f52cc40fa852fbf6bbf5bd5db5d5d00aa9905c67f6f0eadeed48ea') + + depends_on('expat@1.95.1:') From 50a50875f9d3165885683aa9a463e9bc5f56c600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=A5=E7=BE=8E=E7=8C=9E=E7=8C=81?= Date: Sat, 13 Jun 2020 09:36:24 +0800 Subject: [PATCH 700/802] py-healpy: a new package. (#17001) * py-healpy: a new package. * Use internal libraries within py-healpy. * Fix python dependencies. * Fix python dependency. --- .../builtin/packages/py-healpy/package.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-healpy/package.py diff --git a/var/spack/repos/builtin/packages/py-healpy/package.py b/var/spack/repos/builtin/packages/py-healpy/package.py new file mode 100644 index 00000000000..d1781d13a17 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-healpy/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyHealpy(PythonPackage): + """healpy is a Python package to handle pixelated data on the sphere.""" + + homepage = "https://healpy.readthedocs.io/" + url = "https://pypi.python.org/packages/source/h/healpy/healpy-1.13.0.tar.gz" + + version('1.13.0', sha256='d0ae02791c2404002a09c643e9e50bc58e3d258f702c736dc1f39ce1e6526f73') + version('1.7.4', sha256='3cca7ed7786ffcca70e2f39f58844667ffb8521180ac890d4da651b459f51442') + + depends_on('python', type=('build', 'run')) + depends_on('py-setuptools@3.2:', type='build') + depends_on('py-numpy@1.13:', type=('build', 'run')) + depends_on('py-scipy', type=('build', 'run')) + depends_on('py-astropy', type=('build', 'run')) + depends_on('py-matplotlib', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) From 82f84fb61b5914a3f9d0cff60b8fb1943643cf8a Mon Sep 17 00:00:00 2001 From: victorusu Date: Sat, 13 Jun 2020 03:38:17 +0200 Subject: [PATCH 701/802] Reframe 3.0 (#17005) * Add pygelf Python package * Update ReFrame package version * Address styling remarks * Update var/spack/repos/builtin/packages/reframe/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/reframe/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/reframe/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/reframe/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/reframe/package.py Co-authored-by: Adam J. Stewart * Address PR remarks * Remove setuptools runtime dependency * Address PR remarks * Address PR remarks Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/reframe/package.py | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/reframe/package.py b/var/spack/repos/builtin/packages/reframe/package.py index 14a307e6e44..ff7581f4c08 100644 --- a/var/spack/repos/builtin/packages/reframe/package.py +++ b/var/spack/repos/builtin/packages/reframe/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * +import shutil class Reframe(Package): @@ -22,13 +23,40 @@ class Reframe(Package): maintainers = ['victorusu', 'vkarak'] version('master', branch='master') + version('3.0', sha256='c4fe84a92d961546e4d0e33ca3476ba0d4cebc908eb4e33897f646bd1fd5205b') version('2.21', sha256='f35d4fda2f9672c87d3ef664d9a2d6eb0c01c88218a31772a6645c32c8934c4d') version('2.20', sha256='310c18d705858bbe6bd9a2dc4d382b254c1f093b0671d72363f2111e8c162ba4') version('2.17.3', sha256='dc8dfb2ccb9a966303879b7cdcd188c47063e9b7999cbd5d6255223b066bf357') version('2.17.2', sha256='092241cdc15918040aacb922c806aecb59c5bdc3ff7db034a4f355d39aecc101') version('2.17.1', sha256='0b0d32a892607840a7d668f5dcea6f03f7022a26b23e5042a0faf5b8c41cb146') - depends_on('python@3.5:', type=('run')) + variant("docs", default=False, + description="Build ReFrame's man page documentation") + variant("gelf", default=False, + description="Add graylog handler support") + + depends_on('python@3.5:', when='@2.0:2.999', type='run') + depends_on('python@3.6:', when='@3.0:', type='run') + depends_on('py-jsonschema', type='run') + depends_on('py-setuptools', type='build') + depends_on("py-pygelf", when="+gelf", type="run") + depends_on("py-sphinx", when="+docs", type="build") + depends_on("py-sphinx-rtd-theme", when="+docs", type="build") def install(self, spec, prefix): + if spec.version >= Version('3.0'): + if "+docs" in spec: + with working_dir("docs"): + make("man") + make("html") + with working_dir("man"): + mkdir('man1') + shutil.move('reframe.1', 'man1') + mkdir('man8') + shutil.move('reframe.settings.8', 'man8') install_tree(self.stage.source_path, self.prefix) + + def setup_run_environment(self, env): + if spec.version >= Version('3.0'): + if "+docs" in spec: + env.prepend_path('MANPATH', self.prefix.docs.man) From b9cf50d571271be6572339669ac4b507caf9b845 Mon Sep 17 00:00:00 2001 From: Sinan Date: Fri, 12 Jun 2020 19:23:55 -0700 Subject: [PATCH 702/802] New package: ocl-icd (#17078) * new package: ocl-icd * flake8 Co-authored-by: Sinan81 --- .../repos/builtin/packages/ocl-icd/package.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ocl-icd/package.py diff --git a/var/spack/repos/builtin/packages/ocl-icd/package.py b/var/spack/repos/builtin/packages/ocl-icd/package.py new file mode 100644 index 00000000000..fa49bab56a7 --- /dev/null +++ b/var/spack/repos/builtin/packages/ocl-icd/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class OclIcd(AutotoolsPackage): + """This package aims at creating an Open Source alternative to vendor specific +OpenCL ICD loaders.""" + + homepage = "https://github.com/OCL-dev/ocl-icd" + url = "https://github.com/OCL-dev/ocl-icd/archive/v2.2.12.tar.gz" + + version('2.2.12', sha256='17500e5788304eef5b52dbe784cec197bdae64e05eecf38317840d2d05484272') + version('2.2.11', sha256='c1865ef7701b8201ebc6930ed3ac757c7e5cb30f3aa4c1e742a6bc022f4f2292') + version('2.2.10', sha256='d0459fa1421e8d86aaf0a4df092185ea63bc4e1a7682d3af261ae5d3fae063c7') + version('2.2.9', sha256='88da749bc2bd75149f0bb6e72eb4a9d74401a54f4508bc730f13cc03c57a17ed') + version('2.2.8', sha256='8a8a405c7d659b905757a358dc467f4aa3d7e4dff1d1624779065764d962a246') + version('2.2.7', sha256='b8e68435904e1a95661c385f24d6924ed28f416985c6db5a3c7448698ad5fea2') + version('2.2.6', sha256='4567cae92f58c1d6ecfc771c456fa95f206d8a5c7c5d6c9010ec688a9fd83750') + version('2.2.5', sha256='50bf51f4544f83e69a5a2f564732a2adca63fbe9511430aba12f8d6f3a53ae59') + version('2.2.4', sha256='92853137ffff393cc74f829357fdd80ac46a82b46c970e80195db86164cca316') + version('2.2.3', sha256='46b8355d90f8cc240555e4e077f223c47b950abeadf3e1af52d6e68d2efc2ff3') + + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') From 58332d028e58f568d2080318c374c6087ec9881d Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Sat, 13 Jun 2020 06:31:24 -0700 Subject: [PATCH 703/802] clang: add 'version_argument', remove redundant method (#17071) --- lib/spack/spack/compilers/clang.py | 22 ++-------------------- lib/spack/spack/test/compilers/basics.py | 1 + 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index f5c39889ec8..846c3609dc8 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -50,6 +50,8 @@ class Clang(Compiler): # Subclasses use possible names of Fortran 90 compiler fc_names = ['flang', 'gfortran', 'xlf90_r'] + version_argument = '--version' + @property def debug_flags(self): return ['-gcodeview', '-gdwarf-2', '-gdwarf-3', '-gdwarf-4', @@ -201,26 +203,6 @@ def fc_pic_flag(self): required_libs = ['libclang'] - @classmethod - @llnl.util.lang.memoized - def default_version(cls, comp): - """The ``--version`` option works for clang compilers. - On most platforms, output looks like this:: - - clang version 3.1 (trunk 149096) - Target: x86_64-unknown-linux-gnu - Thread model: posix - - On macOS, it looks like this:: - - Apple LLVM version 7.0.2 (clang-700.1.81) - Target: x86_64-apple-darwin15.2.0 - Thread model: posix - """ - compiler = Executable(comp) - output = compiler('--version', output=str, error=str) - return cls.extract_version_from_output(output) - @classmethod @llnl.util.lang.memoized def extract_version_from_output(cls, output): diff --git a/lib/spack/spack/test/compilers/basics.py b/lib/spack/spack/test/compilers/basics.py index 3e43cd4e84b..faf18e38715 100644 --- a/lib/spack/spack/test/compilers/basics.py +++ b/lib/spack/spack/test/compilers/basics.py @@ -389,6 +389,7 @@ def test_clang_flags(): supported_flag_test("fc_pic_flag", "-fPIC", "clang@2.0.0-apple") # non-Apple Clang. + supported_flag_test("version_argument", "--version", "clang@foo.bar") supported_flag_test("openmp_flag", "-fopenmp", "clang@3.3") unsupported_flag_test("cxx11_flag", "clang@3.2") supported_flag_test("cxx11_flag", "-std=c++11", "clang@3.3") From 59e4caad1d618956c8b56d3b62389adc23309bfa Mon Sep 17 00:00:00 2001 From: Sinan Date: Sat, 13 Jun 2020 07:00:46 -0700 Subject: [PATCH 704/802] add dependency for icd variant, or else build fails (#17079) Co-authored-by: Sinan81 --- var/spack/repos/builtin/packages/pocl/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/pocl/package.py b/var/spack/repos/builtin/packages/pocl/package.py index da707344f5d..121b240e288 100644 --- a/var/spack/repos/builtin/packages/pocl/package.py +++ b/var/spack/repos/builtin/packages/pocl/package.py @@ -71,6 +71,8 @@ class Pocl(CMakePackage): variant("icd", default=False, description="Support a system-wide ICD loader") + depends_on('ocl-icd', when='+icd') + def url_for_version(self, version): if version >= Version('1.0'): url = "https://github.com/pocl/pocl/archive/v{0}.tar.gz" From aa50c2c7d05ff8b42b22f814e593ae235235eb75 Mon Sep 17 00:00:00 2001 From: "Mark W. Krentel" Date: Sat, 13 Jun 2020 09:01:42 -0500 Subject: [PATCH 705/802] hpctoolkit: add version 2020.06.12 (#17081) Add versions 2020.06.12 and develop. Switch default for variant papi to true. --- var/spack/repos/builtin/packages/hpctoolkit/package.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py index 0bc737eb82e..9de2184d92f 100644 --- a/var/spack/repos/builtin/packages/hpctoolkit/package.py +++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py @@ -18,7 +18,9 @@ class Hpctoolkit(AutotoolsPackage): git = "https://github.com/HPCToolkit/hpctoolkit.git" maintainers = ['mwkrentel'] - version('master', branch='master') + version('develop', branch='develop') + version('master', branch='master') + version('2020.06.12', commit='ac6ae1156e77d35596fea743ed8ae768f7222f19') version('2020.03.01', commit='94ede4e6fa1e05e6f080be8dc388240ea027f769') version('2019.12.28', commit='b4e1877ff96069fd8ed0fdf0e36283a5b4b62240') version('2019.08.14', commit='6ea44ed3f93ede2d0a48937f288a2d41188a277c') @@ -44,7 +46,7 @@ class Hpctoolkit(AutotoolsPackage): # We can't build with both PAPI and perfmon for risk of segfault # from mismatched header files (unless PAPI installs the perfmon # headers). - variant('papi', default=False, + variant('papi', default=True, description='Use PAPI instead of perfmon for access to ' 'the hardware performance counters.') @@ -60,7 +62,7 @@ class Hpctoolkit(AutotoolsPackage): ' +graph +regex +shared +multithreaded visibility=global' ) - depends_on('binutils+libiberty~nls', type='link', when='@master') + depends_on('binutils+libiberty~nls', type='link', when='@2020.04.00:') depends_on('binutils@:2.33.1+libiberty~nls', type='link', when='@:2020.03.99') depends_on('boost' + boost_libs) depends_on('bzip2+shared', type='link') From 1501de59ed74802f48e32b0657fc6c95997b264a Mon Sep 17 00:00:00 2001 From: Sinan Date: Sun, 14 Jun 2020 06:36:10 -0700 Subject: [PATCH 706/802] Package/py-lmfit: add new version (#16975) * save edits * tidy up * Update var/spack/repos/builtin/packages/py-lmfit/package.py Co-authored-by: Adam J. Stewart * add python version constraints Co-authored-by: Sinan81 Co-authored-by: Adam J. Stewart Co-authored-by: Sinan81 --- .../repos/builtin/packages/py-lmfit/package.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-lmfit/package.py b/var/spack/repos/builtin/packages/py-lmfit/package.py index 4c798622b02..9f70b89aa03 100644 --- a/var/spack/repos/builtin/packages/py-lmfit/package.py +++ b/var/spack/repos/builtin/packages/py-lmfit/package.py @@ -12,8 +12,17 @@ class PyLmfit(PythonPackage): homepage = "http://lmfit.github.io/lmfit-py/" url = "https://pypi.io/packages/source/l/lmfit/lmfit-0.9.5.tar.gz" - version('0.9.5', sha256='eebc3c34ed9f3e51bdd927559a5482548c423ad5a0690c6fdcc414bfb5be6667') + version('1.0.1', sha256='d249eb756899360f4d2a544c9458f47fc8f765ac22c09e099530585fd64e286e') + version('0.9.15', sha256='cd7bdf47c09a3d49f30dff9a1c7f778973d15d1e1b5dc642f14c22f6630eaf2f') + version('0.9.5', sha256='eebc3c34ed9f3e51bdd927559a5482548c423ad5a0690c6fdcc414bfb5be6667') - depends_on('py-numpy@1.5:', type=('build', 'run')) - depends_on('py-scipy@0.14:', type=('build', 'run')) - depends_on('py-setuptools', type='build') + depends_on('python@3.5:', type=('build', 'run'), when='@1:') + depends_on('python@2.7:2.8,3.5:', type=('build', 'run'), when='@0.9.15') + depends_on('py-asteval@0.9.16', type=('build', 'run'), when='@0.9.15:') + depends_on('py-numpy@1.5:', type=('build', 'run'), when='@0.9.5:') + depends_on('py-numpy@1.16:', type=('build', 'run'), when='@0.9.15:') + depends_on('py-scipy@0.14:', type=('build', 'run'), when='@0.9.5') + depends_on('py-scipy@1.2:', type=('build', 'run'), when='@0.9.15:') + depends_on('py-setuptools', type='build') + depends_on('py-six@1.11:', type=('build', 'run'), when='@0.9.15') + depends_on('py-uncertainties@3.0.1:', type=('build', 'run'), when='@0.9.15:') From 6c2e14dfcaf3a2edec0ab36f0d60fd6bdb9c0688 Mon Sep 17 00:00:00 2001 From: darmac Date: Mon, 15 Jun 2020 21:56:29 +0800 Subject: [PATCH 707/802] grafana: added new package at v6.7.3 (#16788) --- .../repos/builtin/packages/grafana/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/grafana/package.py diff --git a/var/spack/repos/builtin/packages/grafana/package.py b/var/spack/repos/builtin/packages/grafana/package.py new file mode 100644 index 00000000000..c323b942525 --- /dev/null +++ b/var/spack/repos/builtin/packages/grafana/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Grafana(Package): + """The tool for beautiful monitoring and metric analytics & dashboards + for Graphite, InfluxDB & Prometheus & More""" + + homepage = "https://grafana.com" + url = "https://github.com/grafana/grafana/archive/v6.7.3.tar.gz" + + version('6.7.3', sha256='2477b70bfc8770ab844ee683f72b5efe8a47324b9779663d8e5259ffb9ddb8d8') + version('6.7.2', sha256='dc81cdb77c1c0ae99ae3302a0ef8b3d577f4a717208a90df65da8fcb282122fc') + version('6.7.1', sha256='5750d286273069a195679d5586e810b0ca8cdd08ee07dcdd9b52cfaac8c62b89') + version('6.7.0', sha256='7f4e3f0d42b8188a334e97062c3bf63ff43af273095ba10147b299e3c1c5a7b7') + version('6.6.2', sha256='e11e5971d08e45e277b55e060c0ce3cf25ca0ba144367c53b4836f2d133ed9b8') + + depends_on('go', type='build') + + def install(self, spec, prefix): + go = which('go') + go('run', 'build.go', 'build') + install_tree('bin', prefix.bin) From 5fc88a7c65a2ab1255e2524a6a000c16129aee67 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 15 Jun 2020 20:24:56 +0200 Subject: [PATCH 708/802] Skip failing test on MacOS (#17072) * Skip failing test on MacOS * Update setup-python action and unpin coverage --- .github/workflows/macos_unit_tests.yaml | 4 ++-- lib/spack/spack/test/llnl/util/lock.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos_unit_tests.yaml b/.github/workflows/macos_unit_tests.yaml index da970edc7ac..71e59a7b143 100644 --- a/.github/workflows/macos_unit_tests.yaml +++ b/.github/workflows/macos_unit_tests.yaml @@ -20,13 +20,13 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install Python packages run: | pip install --upgrade pip six setuptools - pip install --upgrade codecov coverage==4.5.4 + pip install --upgrade codecov coverage pip install --upgrade flake8 pep8-naming - name: Setup Homebrew packages run: | diff --git a/lib/spack/spack/test/llnl/util/lock.py b/lib/spack/spack/test/llnl/util/lock.py index b2b7cf85acc..a959ea0c73a 100644 --- a/lib/spack/spack/test/llnl/util/lock.py +++ b/lib/spack/spack/test/llnl/util/lock.py @@ -1143,6 +1143,8 @@ def read(): assert vals['read'] == 1 +@pytest.mark.skipif('macos' in os.environ.get('GITHUB_WORKFLOW', ''), + reason="Skip failing test for GA on MacOS") def test_lock_debug_output(lock_path): host = socket.getfqdn() From eb26b4666fffd33625e69d7ebd6a42d6fc93c0b7 Mon Sep 17 00:00:00 2001 From: Itaru Kitayama Date: Tue, 16 Jun 2020 05:21:35 +0900 Subject: [PATCH 709/802] Add 4.5 release to cubelib (#17090) --- var/spack/repos/builtin/packages/cubelib/package.py | 1 + var/spack/repos/builtin/packages/cubew/package.py | 1 + 2 files changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/cubelib/package.py b/var/spack/repos/builtin/packages/cubelib/package.py index 42b756648d8..7d6181c7c12 100644 --- a/var/spack/repos/builtin/packages/cubelib/package.py +++ b/var/spack/repos/builtin/packages/cubelib/package.py @@ -12,6 +12,7 @@ class Cubelib(AutotoolsPackage): homepage = "http://www.scalasca.org/software/cube-4.x/download.html" url = "http://apps.fz-juelich.de/scalasca/releases/cube/4.4/dist/cubelib-4.4.tar.gz" + version('4.5', sha256='98f66837b4a834b1aacbcd4480a242d7a8c4a1b8dd44e02e836b8c7a4f0ffd98') version('4.4.4', sha256='adb8216ee3b7701383884417374e7ff946edb30e56640307c65465187dca7512') version('4.4.3', sha256='bcd4fa81a5ba37194e590a5d7c3e6c44b448f5e156a175837b77c21206847a8d') version('4.4.2', sha256='843335c7d238493f1b4cb8e07555ccfe99a3fa521bf162e9d8eaa6733aa1f949') diff --git a/var/spack/repos/builtin/packages/cubew/package.py b/var/spack/repos/builtin/packages/cubew/package.py index d761f102f3b..c21310601b9 100644 --- a/var/spack/repos/builtin/packages/cubew/package.py +++ b/var/spack/repos/builtin/packages/cubew/package.py @@ -12,6 +12,7 @@ class Cubew(AutotoolsPackage): homepage = "http://www.scalasca.org/software/cube-4.x/download.html" url = "http://apps.fz-juelich.de/scalasca/releases/cube/4.4/dist/cubew-4.4.tar.gz" + version('4.5', sha256='16bd8fd864197a74ca65f7325761ad75d73d555072326e95e1338cff39f28a5c') version('4.4.3', sha256='93fff6cc1e8b0780f0171ef5302a2e1a257f99b6383fbfc1b9b82f925ceff501') version('4.4.2', sha256='31a71e9a05e6523de2b86b4026821bbb75fb411eb5b18ae38b27c1f44158014a') version('4.4.1', sha256='c09e3f5a3533ebedee2cc7dfaacd7bac4680c14c3fa540669466583a23f04b67') From 24ff34335bc0051abb9e843d53bc68872267301e Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Mon, 15 Jun 2020 15:50:56 -0500 Subject: [PATCH 710/802] dateutils: add version 0.4.7 (#17106) --- var/spack/repos/builtin/packages/dateutils/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/dateutils/package.py b/var/spack/repos/builtin/packages/dateutils/package.py index 39e616876b7..89277319424 100644 --- a/var/spack/repos/builtin/packages/dateutils/package.py +++ b/var/spack/repos/builtin/packages/dateutils/package.py @@ -13,6 +13,7 @@ class Dateutils(AutotoolsPackage): homepage = "http://www.fresse.org/dateutils/" url = "https://github.com/hroptatyr/dateutils/releases/download/v0.4.6/dateutils-0.4.6.tar.xz" + version('0.4.7', sha256='49725457f5bef45ea424baade8999a6e54496e357f64280474ff7134a54f599a') version('0.4.6', sha256='26a071317ae5710f226a3e6ba9a54d3764cd9efe3965aecc18e75372088757cd') version('0.4.5', sha256='16d6a0fe7b7d49ddbb303f33538dd7304a0d4af5a0369bcbf275db6a5060cbde') From e5066664ab6f89464a90efbf85121663dbcd2132 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 15 Jun 2020 17:10:49 -0700 Subject: [PATCH 711/802] README: Update LLNL release number to Apache-2.0/MIT version (#17109) The release number in the README had not been updated since we did the relicense to Apache-2.0 OR MIT in v0.12.0. LLNL-CODE-811652 is Spack's new LLNL release number. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a55828808d5..a2d704e6c24 100644 --- a/README.md +++ b/README.md @@ -122,4 +122,4 @@ See [LICENSE-MIT](https://github.com/spack/spack/blob/develop/LICENSE-MIT), SPDX-License-Identifier: (Apache-2.0 OR MIT) -LLNL-CODE-647188 +LLNL-CODE-811652 From 01d9063bb1f411b9d57b528119e0b080b3a6e6b2 Mon Sep 17 00:00:00 2001 From: h-denpo <57649496+h-denpo@users.noreply.github.com> Date: Tue, 16 Jun 2020 12:29:35 +0900 Subject: [PATCH 712/802] ffb: prevent the architecture to be always "x86_64" (#17093) --- var/spack/repos/builtin/packages/ffb/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/ffb/package.py b/var/spack/repos/builtin/packages/ffb/package.py index e7c1272a134..d9de2b9862c 100644 --- a/var/spack/repos/builtin/packages/ffb/package.py +++ b/var/spack/repos/builtin/packages/ffb/package.py @@ -107,6 +107,10 @@ def edit(self, spec, prefix): m.filter(r'-lmpi_f77', '') os.chmod(makeall, 0o755) + editfile = join_path('lib', 'src', 'Makeall') + m = FileFilter(editfile) + m.filter(r'x86_64-linux', '{0}-linux'.format(spec.target.family)) + editfile = join_path('lib', 'src', 'REVOCAP_Refiner-0.4.3', 'OPTIONS') m = FileFilter(editfile) m.filter(r'ARCH\s*=.*$', 'ARCH= $(shell arch)-linux') From cb028aaf12df15127339fa752108fc860a5c3dbf Mon Sep 17 00:00:00 2001 From: David Beckingsale Date: Mon, 15 Jun 2020 20:35:23 -0700 Subject: [PATCH 713/802] Update master to main for RAJA and Umpire (#17107) --- var/spack/repos/builtin/packages/raja/package.py | 2 +- var/spack/repos/builtin/packages/umpire/package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index de9652dbc1e..b7a62180568 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -13,7 +13,7 @@ class Raja(CMakePackage, CudaPackage): git = "https://github.com/LLNL/RAJA.git" version('develop', branch='develop', submodules='True') - version('master', branch='master', submodules='True') + version('main', branch='main', submodules='True') version('0.11.0', tag='v0.11.0', submodules="True") version('0.10.1', tag='v0.10.1', submodules="True") version('0.10.0', tag='v0.10.0', submodules="True") diff --git a/var/spack/repos/builtin/packages/umpire/package.py b/var/spack/repos/builtin/packages/umpire/package.py index fb6b779d1b3..928d8aa80cb 100644 --- a/var/spack/repos/builtin/packages/umpire/package.py +++ b/var/spack/repos/builtin/packages/umpire/package.py @@ -15,7 +15,7 @@ class Umpire(CMakePackage, CudaPackage): git = 'https://github.com/LLNL/Umpire.git' version('develop', branch='develop', submodules='True') - version('master', branch='master', submodules='True') + version('main', branch='main', submodules='True') version('2.1.0', tag='v2.1.0', submodules='True') version('2.0.0', tag='v2.0.0', submodules='True') version('1.1.0', tag='v1.1.0', submodules='True') From 32558525f6324b75f30cdc415ef0b996b47bed76 Mon Sep 17 00:00:00 2001 From: Miroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com> Date: Mon, 15 Jun 2020 23:44:47 -0400 Subject: [PATCH 714/802] heffte: added v1.0 (#17102) --- .../repos/builtin/packages/heffte/package.py | 42 ++++++++++++++----- .../builtin/packages/heffte/threads10.patch | 13 ++++++ 2 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 var/spack/repos/builtin/packages/heffte/threads10.patch diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py index 4a3fec0f339..45f9b1ee8c7 100644 --- a/var/spack/repos/builtin/packages/heffte/package.py +++ b/var/spack/repos/builtin/packages/heffte/package.py @@ -10,23 +10,43 @@ class Heffte(CMakePackage): """Highly Efficient FFT for Exascale""" homepage = "https://bitbucket.org/icl/heffte" - url = "https://bitbucket.org/icl/heffte/get/v0.1.tar.gz" + url = "https://bitbucket.org/icl/heffte/get/v1.0.tar.gz" git = "https://bitbucket.org/icl/heffte.git" - version('master', branch='master') + maintainers = ['mkstoyanov'] + + version('develop', branch='master') + version('1.0', sha256='0902479fb5b1bad01438ca0a72efd577a3529c3d8bad0028f3c18d3a4935ca74') version('0.2', sha256='4e76ae60982b316c2e873b2e5735669b22620fefa1fc82f325cdb6989bec78d1') version('0.1', sha256='d279a03298d2dc76574b1ae1031acb4ea964348cf359273d1afa4668b5bfe748') + patch('threads10.patch', when='@1.0') + + variant('shared', default=True, description='Builds with shared libraries') + variant('fftw', default=False, description='Builds with support for FFTW backend') + variant('mkl', default=False, description='Builds with support for MKL backend') variant('cuda', default=False, description='Builds with support for GPUs via CUDA') - depends_on('fftw') - depends_on('mpi') - depends_on('cuda', when="+cuda") + conflicts('~fftw', when='~mkl~cuda') # requires at least one backend + conflicts('+fftw', when='+mkl') # old API supports at most one CPU backend + conflicts('openmpi~cuda', when='+cuda') # +cuda requires CUDA enabled OpenMPI + + depends_on('mpi', type=('build', 'run')) + + depends_on('fftw@3.3.8:', when="+fftw", type=('build', 'run')) + depends_on('intel@16.0:', when="+mkl", type=('build', 'run')) + depends_on('cuda@8.0:', when="+cuda", type=('build', 'run')) def cmake_args(self): - args = ['-DBUILD_SHARED=ON'] - if '+cuda' in self.spec: - args.append('-DBUILD_GPU=ON') - else: - args.append('-DBUILD_GPU=OFF') - return args + return [ + '-DBUILD_SHARED_LIBS={0:1s}'.format( + 'ON' if '+shared' in self.spec else 'OFF'), + '-DBUILD_GPU={0:1s}'.format( + 'ON' if ('+cuda' in self.spec and + '+fftw' in self.spec) else 'OFF'), + '-DHeffte_ENABLE_CUDA={0:1s}'.format( + 'ON' if '+cuda' in self.spec else 'OFF'), + '-DHeffte_ENABLE_FFTW={0:1s}'.format( + 'ON' if '+fftw' in self.spec else 'OFF'), + '-DHeffte_ENABLE_MKL={0:1s}'.format( + 'ON' if '+mkl' in self.spec else 'OFF'), ] diff --git a/var/spack/repos/builtin/packages/heffte/threads10.patch b/var/spack/repos/builtin/packages/heffte/threads10.patch new file mode 100644 index 00000000000..41d55d9bb80 --- /dev/null +++ b/var/spack/repos/builtin/packages/heffte/threads10.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/HeffteConfig.cmake b/cmake/HeffteConfig.cmake +index bd67de9..ca06086 100644 +--- a/cmake/HeffteConfig.cmake ++++ b/cmake/HeffteConfig.cmake +@@ -19,6 +19,8 @@ if (NOT TARGET MPI::MPI_CXX) + find_package(MPI REQUIRED) + endif() + ++find_package(Threads) ++ + if ("@BUILD_SHARED_LIBS@") + set(Heffte_SHARED_FOUND "ON") + else() From 70be1038fdc70c36ee0b92e8580d0768eb9e177e Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 16 Jun 2020 11:59:31 +0800 Subject: [PATCH 715/802] memtester: added new package at v4.3.0 (#17097) --- .../builtin/packages/memtester/package.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 var/spack/repos/builtin/packages/memtester/package.py diff --git a/var/spack/repos/builtin/packages/memtester/package.py b/var/spack/repos/builtin/packages/memtester/package.py new file mode 100644 index 00000000000..7821d1b15df --- /dev/null +++ b/var/spack/repos/builtin/packages/memtester/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Memtester(MakefilePackage): + """A userspace utility for testing the memory subsystem for faults.""" + + homepage = "http://pyropus.ca/software/memtester/" + url = "http://pyropus.ca/software/memtester/old-versions/memtester-4.3.0.tar.gz" + + version('4.3.0', sha256='f9dfe2fd737c38fad6535bbab327da9a21f7ce4ea6f18c7b3339adef6bf5fd88') + version('4.2.2', sha256='a494569d58d642c796332a1b7f3b4b86845b52da66c15c96fbeecd74e48dae8e') + version('4.2.1', sha256='3433e1c757e56457610f5a97bf1a2d612c609290eba5183dd273e070134a21d2') + version('4.2.0', sha256='cb9d5437a0c429d18500bddef93084bb2fead0d5ccfedfd00ee28ff118e52695') + version('4.1.3', sha256='ac56f0b6d6d6e58bcf2a3fa7f2c9b29894f5177871f21115a1906c535106acf6') + + def edit(self, spec, prefix): + makefile = FileFilter("Makefile") + makefile.filter("INSTALLPATH\t= /usr/local", + "INSTALLPATH\t= {0}".format(self.prefix)) From d1aa54115c2af1e86cecc558806ae4a3127122e3 Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 16 Jun 2020 12:00:53 +0800 Subject: [PATCH 716/802] cyrus-sasl: added new package at 2.1.27 (#17096) --- .../builtin/packages/cyrus-sasl/package.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cyrus-sasl/package.py diff --git a/var/spack/repos/builtin/packages/cyrus-sasl/package.py b/var/spack/repos/builtin/packages/cyrus-sasl/package.py new file mode 100644 index 00000000000..98848ccff98 --- /dev/null +++ b/var/spack/repos/builtin/packages/cyrus-sasl/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class CyrusSasl(AutotoolsPackage): + """This is the Cyrus SASL API implementation. It can be used on the + client or server side to provide authentication and authorization + services.""" + + homepage = "https://github.com/cyrusimap/cyrus-sasl" + url = "https://github.com/cyrusimap/cyrus-sasl/archive/cyrus-sasl-2.1.27.tar.gz" + + version('2.1.27', sha256='b564d773803dc4cff42d2bdc04c80f2b105897a724c247817d4e4a99dd6b9976') + version('2.1.26', sha256='7c14d1b5bd1434adf2dd79f70538617e6aa2a7bde447454b90b84ac5c4d034ba') + version('2.1.25', sha256='8bfd4fa4def54c760e5061f2a74c278384c3b9807f02c4b07dab68b5894cc7c1') + version('2.1.24', sha256='1df15c492f7ecb90be49531a347b3df21b041c2e0325dcc4fc5a6e98384c40dd') + version('2.1.23', sha256='b1ec43f62d68446a6a5879925c63d94e26089c5a46cd83e061dd685d014c7d1f') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') From 6f07f8ae3efe28bb62376a0cf8f51b7effc56c98 Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 16 Jun 2020 12:08:45 +0800 Subject: [PATCH 717/802] netdata: added new package at v1.22.1 (#17094) --- .../repos/builtin/packages/netdata/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/netdata/package.py diff --git a/var/spack/repos/builtin/packages/netdata/package.py b/var/spack/repos/builtin/packages/netdata/package.py new file mode 100644 index 00000000000..830e2334522 --- /dev/null +++ b/var/spack/repos/builtin/packages/netdata/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Netdata(AutotoolsPackage): + """Real-time performance monitoring, done right!""" + + homepage = "https://www.netdata.cloud/" + url = "https://github.com/netdata/netdata/archive/v1.22.1.tar.gz" + + version('1.22.1', sha256='6efd785eab82f98892b4b4017cadfa4ce1688985915499bc75f2f888765a3446') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('libuv') + depends_on('libuuid') From 06c06a5665334ee9038ecd8cab03d75ec70a6d71 Mon Sep 17 00:00:00 2001 From: Sinan Date: Mon, 15 Jun 2020 21:15:50 -0700 Subject: [PATCH 718/802] arrayfire: added new package at v3.7.0 (#15598) Co-authored-by: Sinan81 Co-authored-by: Sinan81 --- .../builtin/packages/arrayfire/package.py | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 var/spack/repos/builtin/packages/arrayfire/package.py diff --git a/var/spack/repos/builtin/packages/arrayfire/package.py b/var/spack/repos/builtin/packages/arrayfire/package.py new file mode 100644 index 00000000000..983bd7e775e --- /dev/null +++ b/var/spack/repos/builtin/packages/arrayfire/package.py @@ -0,0 +1,46 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Arrayfire(CMakePackage, CudaPackage): + """ArrayFire is a high performance software library for parallel computing + with an easy-to-use API. Its array based function set makes parallel + programming more accessible.""" + + homepage = "http://arrayfire.org/docs/index.htm" + git = "https://github.com/arrayfire/arrayfire.git" + + version('master', submodules=True) + version('3.7.0', submodules=True, tag='v3.7.0') + + variant('cuda', default=False, description='Enable Cuda backend') + variant('forge', default=False, description='Enable graphics library') + variant('opencl', default=False, description='Enable OpenCL backend') + + depends_on('boost@1.65:') + depends_on('fftw') + depends_on('blas') + depends_on('cuda@7.5:', when='+cuda') + depends_on('opencl +icd', when='+opencl') + # TODO add more opencl backends: + # currently only Cuda backend is enabled + # https://github.com/arrayfire/arrayfire/wiki/Build-Instructions-for-Linux#opencl-backend-dependencies + + depends_on('fontconfig', when='+forge') + depends_on('glfw@3.1.4:', when='+forge') + + def cmake_args(self): + args = [] + args.extend([ + '-DAF_BUILD_CUDA={0}'.format( + 'ON' if '+cuda' in self.spec else 'OFF'), + '-DAF_BUILD_FORGE={0}'.format( + 'ON' if '+forge' in self.spec else 'OFF'), + '-DAF_BUILD_OPENCL={0}'.format( + 'ON' if '+opencl' in self.spec else 'OFF'), + ]) + return args From e8fc7871da15ee8050950d5cf436e0cca338b7a6 Mon Sep 17 00:00:00 2001 From: Kai Torben Ohlhus Date: Tue, 16 Jun 2020 13:22:48 +0900 Subject: [PATCH 719/802] openblas: added v0.3.10. (#17086) [OpenBLAS 0.3.10](https://github.com/xianyi/OpenBLAS/releases/tag/v0.3.10) was released. --- var/spack/repos/builtin/packages/openblas/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index da2b461d396..46cca3afe3c 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -18,6 +18,7 @@ class Openblas(MakefilePackage): git = 'https://github.com/xianyi/OpenBLAS.git' version('develop', branch='develop') + version('0.3.10', sha256='0484d275f87e9b8641ff2eecaa9df2830cbe276ac79ad80494822721de6e1693') version('0.3.9', sha256='17d4677264dfbc4433e97076220adc79b050e4f8a083ea3f853a53af253bc380') version('0.3.8', sha256='8f86ade36f0dbed9ac90eb62575137388359d97d8f93093b38abe166ad7ef3a8') version('0.3.7', sha256='bde136122cef3dd6efe2de1c6f65c10955bbb0cc01a520c2342f5287c28f9379') From f54c9ae305aa1e3627ee9af1b75e763d284aa1ae Mon Sep 17 00:00:00 2001 From: "Jose E. Roman" Date: Tue, 16 Jun 2020 06:25:30 +0200 Subject: [PATCH 720/802] SLEPc: added v3.13.3 (#17085) --- var/spack/repos/builtin/packages/slepc/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py index 13b88188407..869cceaa59d 100644 --- a/var/spack/repos/builtin/packages/slepc/package.py +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -18,6 +18,7 @@ class Slepc(Package): maintainers = ['joseeroman', 'balay'] version('master', branch='master') + version('3.13.3', sha256='23d179c22b4b2f22d29fa0ac0a62f5355a964d3bc245a667e9332347c5aa8f81') version('3.13.2', sha256='04cb8306cb5d4d990509710d7f8ae949bdc2c7eb850930b8d0b0b5ca99f6c70d') version('3.13.1', sha256='f4a5ede4ebdee5e15153ce31c1421209c7b794bd94be1430018615fb0838b879') version('3.13.0', sha256='f1f3c2d13a1a6914e7bf4746d38761e107ea866f50927b639e4ad5918dd1e53b') From 0111f2932f88ddf27fb1eb5584f73d21f5a36fba Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Tue, 16 Jun 2020 07:44:04 +0200 Subject: [PATCH 721/802] pcre2: add version 10.35; JIT support (#17037) --- var/spack/repos/builtin/packages/pcre2/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/pcre2/package.py b/var/spack/repos/builtin/packages/pcre2/package.py index eaa5928ae27..2b19f9cb7b9 100644 --- a/var/spack/repos/builtin/packages/pcre2/package.py +++ b/var/spack/repos/builtin/packages/pcre2/package.py @@ -14,11 +14,14 @@ class Pcre2(AutotoolsPackage): homepage = "http://www.pcre.org""" url = "https://ftp.pcre.org/pub/pcre/pcre2-10.31.tar.bz2" + version('10.35', sha256='9ccba8e02b0ce78046cdfb52e5c177f0f445e421059e43becca4359c669d4613') version('10.31', sha256='e07d538704aa65e477b6a392b32ff9fc5edf75ab9a40ddfc876186c4ff4d68ac') version('10.20', sha256='332e287101c9e9567d1ed55391b338b32f1f72c5b5ee7cc81ef2274a53ad487a') variant('multibyte', default=True, description='Enable support for 16 and 32 bit characters.') + variant('jit', default=False, + description='enable Just-In-Time compiling support') def configure_args(self): args = [] @@ -27,6 +30,9 @@ def configure_args(self): args.append('--enable-pcre2-16') args.append('--enable-pcre2-32') + if '+jit' in self.spec: + args.append('--enable-jit') + return args @property From d4f0a8f70b9ccfbf4ea20d08e34261e52a773e6f Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Tue, 16 Jun 2020 01:46:35 -0400 Subject: [PATCH 722/802] [py-torchvision] added dependency of ffmpeg (#17032) * [py-torchvision] added dependency of ffmpeg * [py-torchvision] needs ffmpeg >= 3.1. See: https://github.com/pytorch/vision/issues/1597 * [py-torchvision] ffmpeg dependency is only for py-torchvision versions >= 0.4.2. --- var/spack/repos/builtin/packages/py-torchvision/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index 9d4c3a0efaf..2105ec19880 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -42,3 +42,5 @@ class PyTorchvision(PythonPackage): # Many of the datasets require additional dependencies to use. # These can be installed after the fact. depends_on('py-scipy', type='test') + + depends_on('ffmpeg@3.1:', when='@0.4.2:') From 7e322b31845b2e56358abe5fd241526b20ae534c Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Tue, 16 Jun 2020 01:57:00 -0400 Subject: [PATCH 723/802] CUDA: remove preexisting log file before install (#17018) cuda: 10.1 and onward, installers will crash if /tmp/cuda-installer.log exists Try to help if user owns the file, otherwise try to provide useful info. Clean up the file post-install to try to avoid the whole issue. --- var/spack/repos/builtin/packages/cuda/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index 13675fb7744..ce1fdf69b9b 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -8,6 +8,7 @@ from llnl.util.filesystem import LibraryList import os import platform +import llnl.util.tty as tty # FIXME Remove hack for polymorphic versions # This package uses a ugly hack to be able to dispatch, given the same @@ -85,6 +86,14 @@ def setup_run_environment(self, env): env.set('CUDA_HOME', self.prefix) def install(self, spec, prefix): + if os.path.exists('/tmp/cuda-installer.log'): + try: + os.remove('/tmp/cuda-installer.log') + except OSError: + if spec.satisfies('@10.1:'): + tty.die("The cuda installer will segfault due to the " + "presence of /tmp/cuda-installer.log " + "please remove the file and try again ") runfile = glob(join_path(self.stage.source_path, 'cuda*_linux*'))[0] chmod = which('chmod') chmod('+x', runfile) @@ -110,6 +119,10 @@ def install(self, spec, prefix): arguments.append('--toolkitpath=%s' % prefix) # Where to install runfile(*arguments) + try: + os.remove('/tmp/cuda-installer.log') + except OSError: + pass @property def libs(self): From a492187973fe55600d0c18159b3f374a079a23db Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Tue, 16 Jun 2020 08:05:46 +0200 Subject: [PATCH 724/802] hdf5: fix libtool files (#17009) --- .../repos/builtin/packages/hdf5/package.py | 14 ++++++++++- .../repos/builtin/packages/libaec/package.py | 23 +++++++++++++++++++ .../repos/builtin/packages/libszip/package.py | 16 +++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 57032141498..c81ffb74dcd 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -243,7 +243,19 @@ def configure_args(self): extra_args.append('--with-default-api-version=' + api) if '+szip' in self.spec: - extra_args.append('--with-szlib=%s' % self.spec['szip'].prefix) + szip_spec = self.spec['szip'] + # The configure script of HDF5 accepts a comma-separated tuple of + # two paths: the first one points to the directory with include + # files, the second one points to the directory with library files. + # If the second path is not specified, the configure script assumes + # that it equals to prefix/lib. However, the correct directory + # might be prefix/lib64. It is not a problem when the building is + # done with Spack's compiler wrapper but it makes the Libtool + # files (*.la) invalid, which makes it problematic to use the + # installed library outside of Spack environment. + extra_args.append('--with-szlib=%s,%s' % + (szip_spec.headers.directories[0], + szip_spec.libs.directories[0])) else: extra_args.append('--without-szlib') diff --git a/var/spack/repos/builtin/packages/libaec/package.py b/var/spack/repos/builtin/packages/libaec/package.py index 5f12c653f1a..3ea9833b62c 100644 --- a/var/spack/repos/builtin/packages/libaec/package.py +++ b/var/spack/repos/builtin/packages/libaec/package.py @@ -22,3 +22,26 @@ class Libaec(CMakePackage): version('1.0.2', sha256='b9e5bbbc8bf9cbfd3b9b4ce38b3311f2c88d3d99f476edb35590eb0006aa1fc5') version('1.0.1', sha256='3668eb4ed36724441e488a7aadc197426afef4b1e8bd139af6d3e36023906459') version('1.0.0', sha256='849f08b08ddaaffe543d06d0ced5e4ee3e526b13a67c5f422d126b1c9cf1b546') + + @property + def libs(self): + query = self.spec.last_query + + libraries = ['libaec'] + + if 'szip' == query.name or 'szip' in query.extra_parameters: + libraries.insert(0, 'libsz') + + shared = 'static' not in query.extra_parameters + + libs = find_libraries( + libraries, root=self.prefix, shared=shared, recursive=True + ) + + if not libs: + msg = 'Unable to recursively locate {0} {1} libraries in {2}' + raise spack.error.NoLibrariesError( + msg.format('shared' if shared else 'static', + self.spec.name, + self.spec.prefix)) + return libs diff --git a/var/spack/repos/builtin/packages/libszip/package.py b/var/spack/repos/builtin/packages/libszip/package.py index 00a2b9b5bcb..b72e2ba2765 100644 --- a/var/spack/repos/builtin/packages/libszip/package.py +++ b/var/spack/repos/builtin/packages/libszip/package.py @@ -24,6 +24,22 @@ class Libszip(AutotoolsPackage): version('2.1.1', sha256='21ee958b4f2d4be2c9cabfa5e1a94877043609ce86fde5f286f105f7ff84d412') version('2.1', sha256='a816d95d5662e8279625abdbea7d0e62157d7d1f028020b1075500bf483ed5ef') + @property + def libs(self): + shared = 'static' not in self.spec.last_query.extra_parameters + + libs = find_libraries( + 'libsz', root=self.prefix, shared=shared, recursive=True + ) + + if not libs: + msg = 'Unable to recursively locate {0} {1} libraries in {2}' + raise spack.error.NoLibrariesError( + msg.format('shared' if shared else 'static', + self.spec.name, + self.spec.prefix)) + return libs + def configure_args(self): return [ '--enable-production', From 8882dc0d96fe589ef7e20bc21a67f77c9bc8e595 Mon Sep 17 00:00:00 2001 From: John Jolly Date: Sat, 6 Jun 2020 00:20:58 -0600 Subject: [PATCH 725/802] chill: Update dependency versions Specified Python to be v2.7 only, as Python3 support is not currently implemented in chill. Update chill dependency versions for the following libraries to the specific versions: * rose: v0.9.13.0 * bison: v3.4.2 Both rose and iegenlib are build time dependencies, but are also run time dependencies. Added 'run' to the build type for both dependencies. --- var/spack/repos/builtin/packages/chill/package.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/chill/package.py b/var/spack/repos/builtin/packages/chill/package.py index d33ab4a9591..96afa55379b 100644 --- a/var/spack/repos/builtin/packages/chill/package.py +++ b/var/spack/repos/builtin/packages/chill/package.py @@ -19,15 +19,16 @@ class Chill(AutotoolsPackage): version('0.3', sha256='574b622368a6bfaadbe9c1fa02fabefdc6c006069246f67d299f943b7e1d8aa3') depends_on('boost@1.66.0 cxxstd=11', type='build') - depends_on('rose@0.9.10.0 +cxx11', type='build') + depends_on('rose@0.9.13.0: +cxx11', type=('build', 'run')) depends_on('autoconf', type='build') depends_on('automake@1.14:', type='build') depends_on('libtool', type='build') depends_on('m4', type='build') - depends_on('iegenlib', type='build') - depends_on('bison@3.4', type='build') + depends_on('iegenlib', type=('build', 'run')) + depends_on('bison@3.4.2:', type='build') depends_on('flex', type='build') - depends_on('python') + # Does not currrently work with Python3 + depends_on('python@2.7:2.8') build_directory = 'spack-build' From 9f73e60ba9d3775ef4dda9c815412f28ed80b518 Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 16 Jun 2020 14:28:44 +0800 Subject: [PATCH 726/802] Add new package: lzop (#17098) --- .../repos/builtin/packages/lzop/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/lzop/package.py diff --git a/var/spack/repos/builtin/packages/lzop/package.py b/var/spack/repos/builtin/packages/lzop/package.py new file mode 100644 index 00000000000..9a7096e01bb --- /dev/null +++ b/var/spack/repos/builtin/packages/lzop/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Lzop(CMakePackage): + """lzop is a file compressor which is very similar to gzip. lzop uses + the LZO data compression library for compression services, and its main + advantages over gzip are much higher compression and decompression speed + (at the cost of some compression ratio).""" + + homepage = "https://www.lzop.org" + url = "https://www.lzop.org/download/lzop-1.03.tar.gz" + + version('1.04', sha256='7e72b62a8a60aff5200a047eea0773a8fb205caf7acbe1774d95147f305a2f41') + version('1.03', sha256='c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9') + version('1.01', sha256='28acd94d933befbc3af986abcfe833173fb7563b66533fdb4ac592f38bb944c7') + + depends_on('pkgconfig', type='build') + depends_on('lzo') From e28561241bb63b1661105b76e4ab91bc8d62027d Mon Sep 17 00:00:00 2001 From: vvolkl Date: Tue, 16 Jun 2020 08:31:41 +0200 Subject: [PATCH 727/802] ROOT: set LD_LIBRARY_PATH when ~rpath (#16899) Allow Spack to build with ROOT as an external dependency by setting LD_LIBRARY_PATH: given that the external package was not built by Spack, dependents would not be able to locate libraries using RPATHs when running ROOT binaries. --- var/spack/repos/builtin/packages/root/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index b1591f455e3..0e590e30ae5 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -492,12 +492,16 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.prepend_path('PATH', self.prefix.bin) env.append_path('CMAKE_MODULE_PATH', '{0}/cmake' .format(self.prefix)) + if "+rpath" not in self.spec: + env.prepend_path('LD_LIBRARY_PATH', self.prefix.lib) def setup_dependent_run_environment(self, env, dependent_spec): env.set('ROOTSYS', self.prefix) env.set('ROOT_VERSION', 'v{0}'.format(self.version.up_to(1))) env.prepend_path('PYTHONPATH', self.prefix.lib) env.prepend_path('PATH', self.prefix.bin) + if "+rpath" not in self.spec: + env.prepend_path('LD_LIBRARY_PATH', self.prefix.lib) def _process_opts(self, *opt_lists): """Process all provided boolean option lists into CMake arguments. From 0f484380f5ceb86913ed671e1e380df260c82fab Mon Sep 17 00:00:00 2001 From: victorusu Date: Tue, 16 Jun 2020 13:49:47 +0200 Subject: [PATCH 728/802] reframe: fix package bugs with v3.0 (#17104) Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/reframe/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/reframe/package.py b/var/spack/repos/builtin/packages/reframe/package.py index ff7581f4c08..00e200d3ec2 100644 --- a/var/spack/repos/builtin/packages/reframe/package.py +++ b/var/spack/repos/builtin/packages/reframe/package.py @@ -23,7 +23,7 @@ class Reframe(Package): maintainers = ['victorusu', 'vkarak'] version('master', branch='master') - version('3.0', sha256='c4fe84a92d961546e4d0e33ca3476ba0d4cebc908eb4e33897f646bd1fd5205b') + version('3.0', sha256='fb76b4513c03b84f5b3bbbc988f7747e5b58f04c983b3935bab1f2e81adccb82') version('2.21', sha256='f35d4fda2f9672c87d3ef664d9a2d6eb0c01c88218a31772a6645c32c8934c4d') version('2.20', sha256='310c18d705858bbe6bd9a2dc4d382b254c1f093b0671d72363f2111e8c162ba4') version('2.17.3', sha256='dc8dfb2ccb9a966303879b7cdcd188c47063e9b7999cbd5d6255223b066bf357') @@ -57,6 +57,6 @@ def install(self, spec, prefix): install_tree(self.stage.source_path, self.prefix) def setup_run_environment(self, env): - if spec.version >= Version('3.0'): - if "+docs" in spec: + if self.spec.version >= Version('3.0'): + if "+docs" in self.spec: env.prepend_path('MANPATH', self.prefix.docs.man) From 4b48f70393a20ef65f5e1394226d3829997431c5 Mon Sep 17 00:00:00 2001 From: "Tomoki, Karatsu" <49965247+t-karatsu@users.noreply.github.com> Date: Tue, 16 Jun 2020 21:51:29 +0900 Subject: [PATCH 729/802] gobject-introspection: build sequentially when using the Fujitsu compiler. (#17092) --- .../repos/builtin/packages/gobject-introspection/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/gobject-introspection/package.py b/var/spack/repos/builtin/packages/gobject-introspection/package.py index 294d1ba46e7..20823fd77fe 100644 --- a/var/spack/repos/builtin/packages/gobject-introspection/package.py +++ b/var/spack/repos/builtin/packages/gobject-introspection/package.py @@ -73,3 +73,7 @@ def install(self, spec, prefix): def setup_build_environment(self, env): env.set('SPACK_SBANG', "%s/bin/sbang" % spack_root) + + @property + def parallel(self): + return not self.spec.satisfies('%fj') From 0095c4c25c459b5d7d25ce0462eed753b4036166 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 16 Jun 2020 10:45:36 -0700 Subject: [PATCH 730/802] python: fix distutils for python modules (e.g. matplotlib) with C and C++ source files (#16856) * python: adding a distutils fix to improve build compatibility for C++ extension modules (e.g. py-matplotlib) * python: added C/C++ distutils patches for python@3.6:3.8 --- .../repos/builtin/packages/python/package.py | 14 + .../python/python-2.7-distutils-C++.patch | 260 ++++++++++++++++++ .../python/python-3.6-distutils-C++.patch | 241 ++++++++++++++++ .../python/python-3.7+-distutils-C++.patch | 257 +++++++++++++++++ 4 files changed, 772 insertions(+) create mode 100644 var/spack/repos/builtin/packages/python/python-2.7-distutils-C++.patch create mode 100644 var/spack/repos/builtin/packages/python/python-3.6-distutils-C++.patch create mode 100644 var/spack/repos/builtin/packages/python/python-3.7+-distutils-C++.patch diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 2311f6ad39a..7a143695a38 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -157,6 +157,20 @@ class Python(AutotoolsPackage): # a Mac. depends_on('libuuid', when='+uuid') + # Python needs to be patched to build extensions w/ mixed C/C++ code: + # https://github.com/NixOS/nixpkgs/pull/19585/files + # https://bugs.python.org/issue1222585 + # + # NOTE: This patch puts Spack's default Python installation out of + # sync with standard Python installs. If you're using such an + # installation as an external and encountering build issues with mixed + # C/C++ modules, consider installing a Spack-managed Python with + # this patch instead. For more information, see: + # https://github.com/spack/spack/pull/16856 + patch('python-2.7-distutils-C++.patch', when='@2.7') + patch('python-3.6-distutils-C++.patch', when='@3.6') + patch('python-3.7+-distutils-C++.patch', when='@3.7:3.8') + patch('tkinter.patch', when='@:2.8,3.3:3.7 platform=darwin') # Ensure that distutils chooses correct compiler option for RPATH on cray: diff --git a/var/spack/repos/builtin/packages/python/python-2.7-distutils-C++.patch b/var/spack/repos/builtin/packages/python/python-2.7-distutils-C++.patch new file mode 100644 index 00000000000..d6710066d53 --- /dev/null +++ b/var/spack/repos/builtin/packages/python/python-2.7-distutils-C++.patch @@ -0,0 +1,260 @@ +--- a/Lib/distutils/cygwinccompiler.py ++++ b/Lib/distutils/cygwinccompiler.py +@@ -117,8 +117,10 @@ + # dllwrap 2.10.90 is buggy + if self.ld_version >= "2.10.90": + self.linker_dll = "gcc" ++ self.linker_dll_cxx = "g++" + else: + self.linker_dll = "dllwrap" ++ self.linker_dll_cxx = "dllwrap" + + # ld_version >= "2.13" support -shared so use it instead of + # -mdll -static +@@ -132,9 +134,13 @@ + self.set_executables(compiler='gcc -mcygwin -O -Wall', + compiler_so='gcc -mcygwin -mdll -O -Wall', + compiler_cxx='g++ -mcygwin -O -Wall', ++ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', + linker_exe='gcc -mcygwin', + linker_so=('%s -mcygwin %s' % +- (self.linker_dll, shared_option))) ++ (self.linker_dll, shared_option)), ++ linker_exe_cxx='g++ -mcygwin', ++ linker_so_cxx=('%s -mcygwin %s' % ++ (self.linker_dll_cxx, shared_option))) + + # cygwin and mingw32 need different sets of libraries + if self.gcc_version == "2.91.57": +@@ -160,8 +166,12 @@ + raise CompileError, msg + else: # for other files use the C-compiler + try: +- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg + +@@ -327,9 +337,14 @@ + self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin, + compiler_so='gcc%s -mdll -O -Wall' % no_cygwin, + compiler_cxx='g++%s -O -Wall' % no_cygwin, ++ compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin, + linker_exe='gcc%s' % no_cygwin, + linker_so='%s%s %s %s' + % (self.linker_dll, no_cygwin, ++ shared_option, entry_point), ++ linker_exe_cxx='g++%s' % no_cygwin, ++ linker_so_cxx='%s%s %s %s' ++ % (self.linker_dll_cxx, no_cygwin, + shared_option, entry_point)) + # Maybe we should also append -mthreads, but then the finished + # dlls need another dll (mingwm10.dll see Mingw32 docs) +--- a/Lib/distutils/emxccompiler.py ++++ b/Lib/distutils/emxccompiler.py +@@ -65,8 +65,12 @@ + # XXX optimization, warnings etc. should be customizable. + self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', + compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', ++ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', ++ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', + linker_exe='gcc -Zomf -Zmt -Zcrtdll', +- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll') ++ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll', ++ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll', ++ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll') + + # want the gcc library statically linked (so that we don't have + # to distribute a version dependent on the compiler we have) +@@ -83,8 +87,12 @@ + raise CompileError, msg + else: # for other files use the C-compiler + try: +- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg + +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -170,10 +170,12 @@ + _osx_support.customize_compiler(_config_vars) + _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' + +- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ +- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', +- 'CCSHARED', 'LDSHARED', 'SO', 'AR', +- 'ARFLAGS') ++ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \ ++ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'SO', 'AR', 'ARFLAGS') ++ ++ cflags = '' ++ cxxflags = '' + + if 'CC' in os.environ: + newcc = os.environ['CC'] +@@ -188,19 +190,27 @@ + cxx = os.environ['CXX'] + if 'LDSHARED' in os.environ: + ldshared = os.environ['LDSHARED'] ++ if 'LDCXXSHARED' in os.environ: ++ ldcxxshared = os.environ['LDCXXSHARED'] + if 'CPP' in os.environ: + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if 'LDFLAGS' in os.environ: + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] + if 'CFLAGS' in os.environ: +- cflags = opt + ' ' + os.environ['CFLAGS'] ++ cflags = os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] ++ if 'CXXFLAGS' in os.environ: ++ cxxflags = os.environ['CXXFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] + if 'CPPFLAGS' in os.environ: + cpp = cpp + ' ' + os.environ['CPPFLAGS'] + cflags = cflags + ' ' + os.environ['CPPFLAGS'] ++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: +@@ -209,13 +219,17 @@ + archiver = ar + ' ' + ar_flags + + cc_cmd = cc + ' ' + cflags ++ cxx_cmd = cxx + ' ' + cxxflags + compiler.set_executables( + preprocessor=cpp, + compiler=cc_cmd, + compiler_so=cc_cmd + ' ' + ccshared, +- compiler_cxx=cxx, ++ compiler_cxx=cxx_cmd, ++ compiler_so_cxx=cxx_cmd + ' ' + ccshared, + linker_so=ldshared, + linker_exe=cc, ++ linker_so_cxx=ldcxxshared, ++ linker_exe_cxx=cxx, + archiver=archiver) + + compiler.shared_lib_extension = so_ext +--- a/Lib/distutils/unixccompiler.py ++++ b/Lib/distutils/unixccompiler.py +@@ -55,14 +55,17 @@ + # are pretty generic; they will probably have to be set by an outsider + # (eg. using information discovered by the sysconfig about building + # Python extensions). +- executables = {'preprocessor' : None, +- 'compiler' : ["cc"], +- 'compiler_so' : ["cc"], +- 'compiler_cxx' : ["cc"], +- 'linker_so' : ["cc", "-shared"], +- 'linker_exe' : ["cc"], +- 'archiver' : ["ar", "-cr"], +- 'ranlib' : None, ++ executables = {'preprocessor' : None, ++ 'compiler' : ["cc"], ++ 'compiler_so' : ["cc"], ++ 'compiler_cxx' : ["c++"], ++ 'compiler_so_cxx' : ["c++"], ++ 'linker_so' : ["cc", "-shared"], ++ 'linker_exe' : ["cc"], ++ 'linker_so_cxx' : ["c++", "-shared"], ++ 'linker_exe_cxx' : ["c++"], ++ 'archiver' : ["ar", "-cr"], ++ 'ranlib' : None, + } + + if sys.platform[:6] == "darwin": +@@ -112,12 +115,19 @@ + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + compiler_so = self.compiler_so ++ compiler_so_cxx = self.compiler_so_cxx + if sys.platform == 'darwin': + compiler_so = _osx_support.compiler_fixup(compiler_so, + cc_args + extra_postargs) ++ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, ++ cc_args + extra_postargs) + try: +- self.spawn(compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg + +@@ -174,23 +184,16 @@ + ld_args.extend(extra_postargs) + self.mkpath(os.path.dirname(output_filename)) + try: +- if target_desc == CCompiler.EXECUTABLE: +- linker = self.linker_exe[:] ++ if target_lang == "c++": ++ if target_desc == CCompiler.EXECUTABLE: ++ linker = self.linker_exe_cxx[:] ++ else: ++ linker = self.linker_so_cxx[:] + else: +- linker = self.linker_so[:] +- if target_lang == "c++" and self.compiler_cxx: +- # skip over environment variable settings if /usr/bin/env +- # is used to set up the linker's environment. +- # This is needed on OSX. Note: this assumes that the +- # normal and C++ compiler have the same environment +- # settings. +- i = 0 +- if os.path.basename(linker[0]) == "env": +- i = 1 +- while '=' in linker[i]: +- i = i + 1 +- +- linker[i] = self.compiler_cxx[i] ++ if target_desc == CCompiler.EXECUTABLE: ++ linker = self.linker_exe[:] ++ else: ++ linker = self.linker_so[:] + + if sys.platform == 'darwin': + linker = _osx_support.compiler_fixup(linker, ld_args) +--- a/Lib/_osx_support.py ++++ b/Lib/_osx_support.py +@@ -14,13 +14,13 @@ + # configuration variables that may contain universal build flags, + # like "-arch" or "-isdkroot", that may need customization for + # the user environment +-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', +- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', +- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', +- 'PY_CORE_CFLAGS') ++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', ++ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', ++ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS') + + # configuration variables that may contain compiler calls +-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') ++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') + + # prefix added to original configuration variable names + _INITPRE = '_OSX_SUPPORT_INITIAL_' diff --git a/var/spack/repos/builtin/packages/python/python-3.6-distutils-C++.patch b/var/spack/repos/builtin/packages/python/python-3.6-distutils-C++.patch new file mode 100644 index 00000000000..5728fad6f77 --- /dev/null +++ b/var/spack/repos/builtin/packages/python/python-3.6-distutils-C++.patch @@ -0,0 +1,241 @@ +--- a/Lib/_osx_support.py ++++ b/Lib/_osx_support.py +@@ -14,13 +14,13 @@ __all__ = [ + # configuration variables that may contain universal build flags, + # like "-arch" or "-isdkroot", that may need customization for + # the user environment +-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', +- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', +- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', +- 'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS') ++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', ++ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', ++ 'PY_CPPFLAGS', 'PY_CORE_LDFLAGS', 'PY_CORE_CFLAGS') + + # configuration variables that may contain compiler calls +-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') ++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') + + # prefix added to original configuration variable names + _INITPRE = '_OSX_SUPPORT_INITIAL_' +--- a/Lib/distutils/cygwinccompiler.py ++++ b/Lib/distutils/cygwinccompiler.py +@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler): + # dllwrap 2.10.90 is buggy + if self.ld_version >= "2.10.90": + self.linker_dll = "gcc" ++ self.linker_dll_cxx = "g++" + else: + self.linker_dll = "dllwrap" ++ self.linker_dll_cxx = "dllwrap" + + # ld_version >= "2.13" support -shared so use it instead of + # -mdll -static +@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler): + self.set_executables(compiler='gcc -mcygwin -O -Wall', + compiler_so='gcc -mcygwin -mdll -O -Wall', + compiler_cxx='g++ -mcygwin -O -Wall', ++ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', + linker_exe='gcc -mcygwin', + linker_so=('%s -mcygwin %s' % +- (self.linker_dll, shared_option))) ++ (self.linker_dll, shared_option)), ++ linker_exe_cxx='g++ -mcygwin', ++ linker_so_cxx=('%s -mcygwin %s' % ++ (self.linker_dll_cxx, shared_option))) + + # cygwin and mingw32 need different sets of libraries + if self.gcc_version == "2.91.57": +@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler): + raise CompileError(msg) + else: # for other files use the C-compiler + try: +- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + +@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler): + self.set_executables(compiler='gcc -O -Wall', + compiler_so='gcc -mdll -O -Wall', + compiler_cxx='g++ -O -Wall', ++ compiler_so_cxx='g++ -mdll -O -Wall', + linker_exe='gcc', + linker_so='%s %s %s' + % (self.linker_dll, shared_option, ++ entry_point), ++ linker_exe_cxx='g++', ++ linker_so_cxx='%s %s %s' ++ % (self.linker_dll_cxx, shared_option, + entry_point)) + # Maybe we should also append -mthreads, but then the finished + # dlls need another dll (mingwm10.dll see Mingw32 docs) +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -170,9 +170,11 @@ def customize_compiler(compiler): + _osx_support.customize_compiler(_config_vars) + _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' + +- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ +- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', +- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') ++ (cc, cxx, cflags, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ ++ get_config_vars('CC', 'CXX', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') ++ ++ cxxflags = cflags + + if 'CC' in os.environ: + newcc = os.environ['CC'] +@@ -187,19 +189,27 @@ def customize_compiler(compiler): + cxx = os.environ['CXX'] + if 'LDSHARED' in os.environ: + ldshared = os.environ['LDSHARED'] ++ if 'LDCXXSHARED' in os.environ: ++ ldcxxshared = os.environ['LDCXXSHARED'] + if 'CPP' in os.environ: + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if 'LDFLAGS' in os.environ: + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] + if 'CFLAGS' in os.environ: +- cflags = opt + ' ' + os.environ['CFLAGS'] ++ cflags = os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] ++ if 'CXXFLAGS' in os.environ: ++ cxxflags = os.environ['CXXFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] + if 'CPPFLAGS' in os.environ: + cpp = cpp + ' ' + os.environ['CPPFLAGS'] + cflags = cflags + ' ' + os.environ['CPPFLAGS'] ++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: +@@ -208,13 +218,17 @@ def customize_compiler(compiler): + archiver = ar + ' ' + ar_flags + + cc_cmd = cc + ' ' + cflags ++ cxx_cmd = cxx + ' ' + cxxflags + compiler.set_executables( + preprocessor=cpp, + compiler=cc_cmd, + compiler_so=cc_cmd + ' ' + ccshared, +- compiler_cxx=cxx, ++ compiler_cxx=cxx_cmd, ++ compiler_so_cxx=cxx_cmd + ' ' + ccshared, + linker_so=ldshared, + linker_exe=cc, ++ linker_so_cxx=ldcxxshared, ++ linker_exe_cxx=cxx, + archiver=archiver) + + compiler.shared_lib_extension = shlib_suffix +--- a/Lib/distutils/unixccompiler.py ++++ b/Lib/distutils/unixccompiler.py +@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler): + # are pretty generic; they will probably have to be set by an outsider + # (eg. using information discovered by the sysconfig about building + # Python extensions). +- executables = {'preprocessor' : None, +- 'compiler' : ["cc"], +- 'compiler_so' : ["cc"], +- 'compiler_cxx' : ["cc"], +- 'linker_so' : ["cc", "-shared"], +- 'linker_exe' : ["cc"], +- 'archiver' : ["ar", "-cr"], +- 'ranlib' : None, ++ executables = {'preprocessor' : None, ++ 'compiler' : ["cc"], ++ 'compiler_so' : ["cc"], ++ 'compiler_cxx' : ["c++"], ++ 'compiler_so_cxx' : ["c++"], ++ 'linker_so' : ["cc", "-shared"], ++ 'linker_exe' : ["cc"], ++ 'linker_so_cxx' : ["c++", "-shared"], ++ 'linker_exe_cxx' : ["c++"], ++ 'archiver' : ["ar", "-cr"], ++ 'ranlib' : None, + } + + if sys.platform[:6] == "darwin": +@@ -110,12 +113,19 @@ class UnixCCompiler(CCompiler): + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + compiler_so = self.compiler_so ++ compiler_so_cxx = self.compiler_so_cxx + if sys.platform == 'darwin': + compiler_so = _osx_support.compiler_fixup(compiler_so, + cc_args + extra_postargs) ++ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, ++ cc_args + extra_postargs) + try: +- self.spawn(compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + +@@ -173,22 +183,16 @@ class UnixCCompiler(CCompiler): + ld_args.extend(extra_postargs) + self.mkpath(os.path.dirname(output_filename)) + try: +- if target_desc == CCompiler.EXECUTABLE: +- linker = self.linker_exe[:] ++ if target_lang == "c++": ++ if target_desc == CCompiler.EXECUTABLE: ++ linker = self.linker_exe_cxx[:] ++ else: ++ linker = self.linker_so_cxx[:] + else: +- linker = self.linker_so[:] +- if target_lang == "c++" and self.compiler_cxx: +- # skip over environment variable settings if /usr/bin/env +- # is used to set up the linker's environment. +- # This is needed on OSX. Note: this assumes that the +- # normal and C++ compiler have the same environment +- # settings. +- i = 0 +- if os.path.basename(linker[0]) == "env": +- i = 1 +- while '=' in linker[i]: +- i += 1 +- linker[i] = self.compiler_cxx[i] ++ if target_desc == CCompiler.EXECUTABLE: ++ linker = self.linker_exe[:] ++ else: ++ linker = self.linker_so[:] + + if sys.platform == 'darwin': + linker = _osx_support.compiler_fixup(linker, ld_args) +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -584,10 +584,10 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o + *\ -s*|s*) quiet="-q";; \ + *) quiet="";; \ + esac; \ +- echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ ++ echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ +- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ ++ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + diff --git a/var/spack/repos/builtin/packages/python/python-3.7+-distutils-C++.patch b/var/spack/repos/builtin/packages/python/python-3.7+-distutils-C++.patch new file mode 100644 index 00000000000..02daf0a11bf --- /dev/null +++ b/var/spack/repos/builtin/packages/python/python-3.7+-distutils-C++.patch @@ -0,0 +1,257 @@ +diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py +index db6674e..ccbe09a 100644 +--- a/Lib/_osx_support.py ++++ b/Lib/_osx_support.py +@@ -14,13 +14,13 @@ __all__ = [ + # configuration variables that may contain universal build flags, + # like "-arch" or "-isdkroot", that may need customization for + # the user environment +-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', +- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', +- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', +- 'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS') ++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', ++ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', ++ 'PY_CPPFLAGS', 'PY_CORE_LDFLAGS', 'PY_CORE_CFLAGS') + + # configuration variables that may contain compiler calls +-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') ++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') + + # prefix added to original configuration variable names + _INITPRE = '_OSX_SUPPORT_INITIAL_' +diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py +index 6c5d777..640fa2d 100644 +--- a/Lib/distutils/cygwinccompiler.py ++++ b/Lib/distutils/cygwinccompiler.py +@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler): + # dllwrap 2.10.90 is buggy + if self.ld_version >= "2.10.90": + self.linker_dll = "gcc" ++ self.linker_dll_cxx = "g++" + else: + self.linker_dll = "dllwrap" ++ self.linker_dll_cxx = "dllwrap" + + # ld_version >= "2.13" support -shared so use it instead of + # -mdll -static +@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler): + self.set_executables(compiler='gcc -mcygwin -O -Wall', + compiler_so='gcc -mcygwin -mdll -O -Wall', + compiler_cxx='g++ -mcygwin -O -Wall', ++ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', + linker_exe='gcc -mcygwin', + linker_so=('%s -mcygwin %s' % +- (self.linker_dll, shared_option))) ++ (self.linker_dll, shared_option)), ++ linker_exe_cxx='g++ -mcygwin', ++ linker_so_cxx=('%s -mcygwin %s' % ++ (self.linker_dll_cxx, shared_option))) + + # cygwin and mingw32 need different sets of libraries + if self.gcc_version == "2.91.57": +@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler): + raise CompileError(msg) + else: # for other files use the C-compiler + try: +- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + +@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler): + self.set_executables(compiler='gcc -O -Wall', + compiler_so='gcc -mdll -O -Wall', + compiler_cxx='g++ -O -Wall', ++ compiler_so_cxx='g++ -mdll -O -Wall', + linker_exe='gcc', + linker_so='%s %s %s' + % (self.linker_dll, shared_option, ++ entry_point), ++ linker_exe_cxx='g++', ++ linker_so_cxx='%s %s %s' ++ % (self.linker_dll_cxx, shared_option, + entry_point)) + # Maybe we should also append -mthreads, but then the finished + # dlls need another dll (mingwm10.dll see Mingw32 docs) +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 0a034ee..ecf4759 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -188,9 +188,11 @@ def customize_compiler(compiler): + _osx_support.customize_compiler(_config_vars) + _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' + +- (cc, cxx, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ +- get_config_vars('CC', 'CXX', 'CFLAGS', +- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') ++ (cc, cxx, cflags, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ ++ get_config_vars('CC', 'CXX', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') ++ ++ cxxflags = cflags + + if 'CC' in os.environ: + newcc = os.environ['CC'] +@@ -205,19 +207,27 @@ def customize_compiler(compiler): + cxx = os.environ['CXX'] + if 'LDSHARED' in os.environ: + ldshared = os.environ['LDSHARED'] ++ if 'LDCXXSHARED' in os.environ: ++ ldcxxshared = os.environ['LDCXXSHARED'] + if 'CPP' in os.environ: + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if 'LDFLAGS' in os.environ: + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] + if 'CFLAGS' in os.environ: + cflags = cflags + ' ' + os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] ++ if 'CXXFLAGS' in os.environ: ++ cxxflags = cxxflags + ' ' + os.environ['CXXFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] + if 'CPPFLAGS' in os.environ: + cpp = cpp + ' ' + os.environ['CPPFLAGS'] + cflags = cflags + ' ' + os.environ['CPPFLAGS'] ++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: +@@ -226,13 +236,17 @@ def customize_compiler(compiler): + archiver = ar + ' ' + ar_flags + + cc_cmd = cc + ' ' + cflags ++ cxx_cmd = cxx + ' ' + cxxflags + compiler.set_executables( + preprocessor=cpp, + compiler=cc_cmd, + compiler_so=cc_cmd + ' ' + ccshared, +- compiler_cxx=cxx, ++ compiler_cxx=cxx_cmd, ++ compiler_so_cxx=cxx_cmd + ' ' + ccshared, + linker_so=ldshared, + linker_exe=cc, ++ linker_so_cxx=ldcxxshared, ++ linker_exe_cxx=cxx, + archiver=archiver) + + compiler.shared_lib_extension = shlib_suffix +diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py +index d10a78d..7e88781 100644 +--- a/Lib/distutils/unixccompiler.py ++++ b/Lib/distutils/unixccompiler.py +@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler): + # are pretty generic; they will probably have to be set by an outsider + # (eg. using information discovered by the sysconfig about building + # Python extensions). +- executables = {'preprocessor' : None, +- 'compiler' : ["cc"], +- 'compiler_so' : ["cc"], +- 'compiler_cxx' : ["cc"], +- 'linker_so' : ["cc", "-shared"], +- 'linker_exe' : ["cc"], +- 'archiver' : ["ar", "-cr"], +- 'ranlib' : None, ++ executables = {'preprocessor' : None, ++ 'compiler' : ["cc"], ++ 'compiler_so' : ["cc"], ++ 'compiler_cxx' : ["c++"], ++ 'compiler_so_cxx' : ["c++"], ++ 'linker_so' : ["cc", "-shared"], ++ 'linker_exe' : ["cc"], ++ 'linker_so_cxx' : ["c++", "-shared"], ++ 'linker_exe_cxx' : ["c++"], ++ 'archiver' : ["ar", "-cr"], ++ 'ranlib' : None, + } + + if sys.platform[:6] == "darwin": +@@ -110,12 +113,19 @@ class UnixCCompiler(CCompiler): + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + compiler_so = self.compiler_so ++ compiler_so_cxx = self.compiler_so_cxx + if sys.platform == 'darwin': + compiler_so = _osx_support.compiler_fixup(compiler_so, + cc_args + extra_postargs) ++ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, ++ cc_args + extra_postargs) + try: +- self.spawn(compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + +@@ -173,30 +183,16 @@ class UnixCCompiler(CCompiler): + ld_args.extend(extra_postargs) + self.mkpath(os.path.dirname(output_filename)) + try: +- if target_desc == CCompiler.EXECUTABLE: +- linker = self.linker_exe[:] ++ if target_lang == "c++": ++ if target_desc == CCompiler.EXECUTABLE: ++ linker = self.linker_exe_cxx[:] ++ else: ++ linker = self.linker_so_cxx[:] + else: +- linker = self.linker_so[:] +- if target_lang == "c++" and self.compiler_cxx: +- # skip over environment variable settings if /usr/bin/env +- # is used to set up the linker's environment. +- # This is needed on OSX. Note: this assumes that the +- # normal and C++ compiler have the same environment +- # settings. +- i = 0 +- if os.path.basename(linker[0]) == "env": +- i = 1 +- while '=' in linker[i]: +- i += 1 +- +- if os.path.basename(linker[i]) == 'ld_so_aix': +- # AIX platforms prefix the compiler with the ld_so_aix +- # script, so we need to adjust our linker index +- offset = 1 ++ if target_desc == CCompiler.EXECUTABLE: ++ linker = self.linker_exe[:] + else: +- offset = 0 +- +- linker[i+offset] = self.compiler_cxx[i] ++ linker = self.linker_so[:] + + if sys.platform == 'darwin': + linker = _osx_support.compiler_fixup(linker, ld_args) +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 35ca1a8..cfa79df 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -618,10 +618,10 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o + *\ -s*|s*) quiet="-q";; \ + *) quiet="";; \ + esac; \ +- echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ ++ echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ +- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ ++ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + From e816b66c94410103e3f208f50b63d674599e27c2 Mon Sep 17 00:00:00 2001 From: Omar Padron Date: Tue, 16 Jun 2020 14:11:13 -0400 Subject: [PATCH 731/802] fix docker image entrypoints (#17105) Also removes extraneous prompt and ssh handling logic. --- share/spack/docker/centos-6.dockerfile | 74 +++++---- share/spack/docker/centos-7.dockerfile | 74 +++++---- share/spack/docker/entrypoint.bash | 172 ++++++++++++++++----- share/spack/docker/handle-prompt.sh | 173 ---------------------- share/spack/docker/handle-ssh.sh | 50 ------- share/spack/docker/ubuntu-1604.dockerfile | 87 +++++------ share/spack/docker/ubuntu-1804.dockerfile | 87 +++++------ 7 files changed, 275 insertions(+), 442 deletions(-) delete mode 100644 share/spack/docker/handle-prompt.sh delete mode 100644 share/spack/docker/handle-ssh.sh diff --git a/share/spack/docker/centos-6.dockerfile b/share/spack/docker/centos-6.dockerfile index 72aa934f99a..fe919f3c885 100644 --- a/share/spack/docker/centos-6.dockerfile +++ b/share/spack/docker/centos-6.dockerfile @@ -16,46 +16,42 @@ COPY share $SPACK_ROOT/share COPY var $SPACK_ROOT/var RUN mkdir -p $SPACK_ROOT/opt/spack -RUN yum update -y \ - && yum install -y epel-release \ - && yum update -y \ +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + +RUN yum update -y \ + && yum install -y epel-release \ + && yum update -y \ && yum --enablerepo epel groupinstall -y "Development Tools" \ - && yum --enablerepo epel install -y \ - curl findutils gcc-c++ gcc \ - gcc-gfortran git gnupg2 hostname \ - iproute Lmod make patch \ - openssh-server python python-pip tcl \ - unzip which \ - && pip install boto3 \ - && rm -rf /var/cache/yum \ + && yum --enablerepo epel install -y \ + curl \ + findutils \ + gcc-c++ \ + gcc \ + gcc-gfortran \ + git \ + gnupg2 \ + hostname \ + iproute \ + Lmod \ + make \ + patch \ + python \ + python-pip \ + tcl \ + unzip \ + which \ + && pip install boto3 \ + && rm -rf /var/cache/yum \ && yum clean all -RUN ( echo ". /usr/share/lmod/lmod/init/bash" \ - && echo ". \$SPACK_ROOT/share/spack/setup-env.sh" \ - && echo "if [ \"\$CURRENTLY_BUILDING_DOCKER_IMAGE\" '!=' '1' ]" \ - && echo "then" \ - && echo " . \$SPACK_ROOT/share/spack/spack-completion.bash" \ - && echo "fi" ) \ - >> /etc/profile.d/spack.sh \ - && ( echo "f=\"\$SPACK_ROOT/share/spack/docker/handle-ssh.sh\"" \ - && echo "if [ -f \"\$f\" ]" \ - && echo "then" \ - && echo " . \"\$f\"" \ - && echo "else" \ - && cat $SPACK_ROOT/share/spack/docker/handle-ssh.sh \ - && echo "fi" ) \ - >> /etc/profile.d/handle-ssh.sh \ - && ( echo "f=\"\$SPACK_ROOT/share/spack/docker/handle-prompt.sh\"" \ - && echo "if [ -f \"\$f\" ]" \ - && echo "then" \ - && echo " . \"\$f\"" \ - && echo "else" \ - && cat $SPACK_ROOT/share/spack/docker/handle-prompt.sh \ - && echo "fi" ) \ - >> /etc/profile.d/handle-prompt.sh \ - && mkdir -p /root/.spack \ - && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ - /root/.spack/modules.yaml \ +RUN mkdir -p /root/.spack \ + && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ + /root/.spack/modules.yaml \ && rm -rf /root/*.* /run/nologin $SPACK_ROOT/.git # [WORKAROUND] @@ -66,10 +62,10 @@ RUN [ -f ~/.profile ] \ || true WORKDIR /root -SHELL ["/bin/bash", "-l", "-c"] +SHELL ["docker-shell"] # TODO: add a command to Spack that (re)creates the package cache RUN spack spec hdf5+mpi ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"] -CMD ["docker-shell"] +CMD ["interactive-shell"] diff --git a/share/spack/docker/centos-7.dockerfile b/share/spack/docker/centos-7.dockerfile index 6aa969fef82..67affa1af9f 100644 --- a/share/spack/docker/centos-7.dockerfile +++ b/share/spack/docker/centos-7.dockerfile @@ -16,46 +16,42 @@ COPY share $SPACK_ROOT/share COPY var $SPACK_ROOT/var RUN mkdir -p $SPACK_ROOT/opt/spack -RUN yum update -y \ - && yum install -y epel-release \ - && yum update -y \ +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + +RUN yum update -y \ + && yum install -y epel-release \ + && yum update -y \ && yum --enablerepo epel groupinstall -y "Development Tools" \ - && yum --enablerepo epel install -y \ - curl findutils gcc-c++ gcc \ - gcc-gfortran git gnupg2 hostname \ - iproute Lmod make patch \ - openssh-server python python-pip tcl \ - unzip which \ - && pip install boto3 \ - && rm -rf /var/cache/yum \ + && yum --enablerepo epel install -y \ + curl \ + findutils \ + gcc-c++ \ + gcc \ + gcc-gfortran \ + git \ + gnupg2 \ + hostname \ + iproute \ + Lmod \ + make \ + patch \ + python \ + python-pip \ + tcl \ + unzip \ + which \ + && pip install boto3 \ + && rm -rf /var/cache/yum \ && yum clean all -RUN ( echo ". /usr/share/lmod/lmod/init/bash" \ - && echo ". \$SPACK_ROOT/share/spack/setup-env.sh" \ - && echo "if [ \"\$CURRENTLY_BUILDING_DOCKER_IMAGE\" '!=' '1' ]" \ - && echo "then" \ - && echo " . \$SPACK_ROOT/share/spack/spack-completion.bash" \ - && echo "fi" ) \ - >> /etc/profile.d/spack.sh \ - && ( echo "f=\"\$SPACK_ROOT/share/spack/docker/handle-ssh.sh\"" \ - && echo "if [ -f \"\$f\" ]" \ - && echo "then" \ - && echo " . \"\$f\"" \ - && echo "else" \ - && cat $SPACK_ROOT/share/spack/docker/handle-ssh.sh \ - && echo "fi" ) \ - >> /etc/profile.d/handle-ssh.sh \ - && ( echo "f=\"\$SPACK_ROOT/share/spack/docker/handle-prompt.sh\"" \ - && echo "if [ -f \"\$f\" ]" \ - && echo "then" \ - && echo " . \"\$f\"" \ - && echo "else" \ - && cat $SPACK_ROOT/share/spack/docker/handle-prompt.sh \ - && echo "fi" ) \ - >> /etc/profile.d/handle-prompt.sh \ - && mkdir -p /root/.spack \ - && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ - /root/.spack/modules.yaml \ +RUN mkdir -p /root/.spack \ + && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ + /root/.spack/modules.yaml \ && rm -rf /root/*.* /run/nologin $SPACK_ROOT/.git # [WORKAROUND] @@ -66,10 +62,10 @@ RUN [ -f ~/.profile ] \ || true WORKDIR /root -SHELL ["/bin/bash", "-l", "-c"] +SHELL ["docker-shell"] # TODO: add a command to Spack that (re)creates the package cache RUN spack spec hdf5+mpi ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"] -CMD ["docker-shell"] +CMD ["interactive-shell"] diff --git a/share/spack/docker/entrypoint.bash b/share/spack/docker/entrypoint.bash index 775747d904d..fbd7baf2bcd 100755 --- a/share/spack/docker/entrypoint.bash +++ b/share/spack/docker/entrypoint.bash @@ -1,45 +1,143 @@ -#! /usr/bin/env bash -e +#! /usr/bin/env bash # # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -unset CURRENTLY_BUILDING_DOCKER_IMAGE +mode=oneshot -if [ "$1" '=' 'docker-shell' ] ; then - if [ -t 0 ] ; then - exec bash -il - else - ( - echo -n "It looks like you're trying to run an intractive shell" - echo -n " session, but either no psuedo-TTY is allocateed for this" - echo -n " container's STDIN, or it is closed." - echo - - echo -n "Make sure you run docker with the --interactive and --tty" - echo -n " options." - echo - ) >&2 - - exit 1 - fi -else - exec 3>&1 - exec 4>&2 - - exec 1>&- - exec 2>&- - - source /etc/profile.d/spack.sh - source /etc/profile.d/handle-ssh.sh - - exec 1>&3 - exec 2>&4 - - exec 3>&- - exec 4>&- - - spack "$@" - exit $? +if [ "$( basename "$0" )" '=' 'spack-env' ] ; then + mode=spackenv +elif [ "$( basename "$0" )" '=' 'docker-shell' ] ; then + mode=dockershell +elif [ "$( basename "$0" )" '=' 'interactive-shell' ] ; then + mode=interactiveshell +elif [ "$1" '=' 'docker-shell' ] ; then + mode=dockershell + shift +elif [ "$1" '=' 'interactive-shell' ] ; then + mode=interactiveshell + shift fi + +case "$mode" in + "spackenv") + # Scenario 1: Run as if the image had no ENTRYPOINT + # + # Necessary for use cases where the command to run and all + # arguments must be accepted in the CMD portion. (e.g.: Gitlab CI + # Runners) + # + # Roughly equivalent to + # docker run ... --entrypoint spack-env ... sh -c "..." + # + # The shell script runs with spack pre-loaded and ready to use. + . $SPACK_ROOT/share/spack/setup-env.sh + unset CURRENTLY_BUILDING_DOCKER_IMAGE + exec "$@" + ;; + + "dockershell") + # Scenario 2: Accept shell code from a RUN command in a + # Dockerfile + # + # For new Docker images that start FROM this image as its base. + # Prepared so that subsequent RUN commands can take advantage of + # Spack without having to manually (re)initialize. + # + # Example: + # FROM spack/centos7 + # COPY spack.yaml . + # RUN spack install # <- Spack is loaded and ready to use. + # # No manual initialization necessary. + . $SPACK_ROOT/share/spack/setup-env.sh + exec bash -c "$*" + ;; + + "interactiveshell") + # Scenario 3: Run an interactive shell session with Spack + # preloaded. + # + # Create a container meant for an interactive shell session. + # Additional checks are performed to ensure that stdin is a tty + # and additional shell completion files are sourced. The user is + # presented with a shell prompt from which they may issue Spack + # commands. + # + # This is the default behavior when running with no CMD or + # ENTRYPOINT overrides: + # docker run -it spack/centos7 + if [ -t 0 ] ; then + . $SPACK_ROOT/share/spack/setup-env.sh + . $SPACK_ROOT/share/spack/spack-completion.bash + unset CURRENTLY_BUILDING_DOCKER_IMAGE + exec bash -i + else + ( + echo -n "It looks like you're trying to run an" + echo -n " intractive shell session, but either no" + echo -n " psuedo-TTY is allocated for this container's" + echo " STDIN, or it is closed." + echo + + echo -n "Make sure you run docker with the --interactive" + echo -n " and --tty options." + echo + ) >&2 + + exit 1 + fi + ;; + + "oneshot") + # Scenario 4: Run a one-shot Spack command from the host command + # line. + # + # Triggered by providing arguments to `docker run`. Arguments + # are passed along to the container's underlying spack + # installation, allowing users to use the image as if it were + # spack, itself. Pass volume mount information to `docker run` + # to persist the effects of running in this mode. + # + # This is the default behavior when running with a CMD override. + # + # Examples: + # # concretize the same spec on different OSes + # docker run --rm spack/ubuntu-xenial spec zlib + # docker run --rm spack/centos7 spec zlib + # + # # a "wetter" dry-run; + # # install a package and then throw away the results. + # docker run --rm spack/centos7 install libiconv + # docker run --rm spack/centos7 find libiconv + # ==> No package matches the query: libiconv + # + # # use docker volumes to persist changes + # docker run --rm -v ...:/spack spack/centos7 install ... + # docker run --rm -v ...:/spack spack/centos7 install ... + # docker run --rm -v ...:/spack spack/centos7 install ... + exec 3>&1 + exec 4>&2 + + exec 1>&- + exec 2>&- + + . $SPACK_ROOT/share/spack/setup-env.sh + unset CURRENTLY_BUILDING_DOCKER_IMAGE + + exec 1>&3 + exec 2>&4 + + exec 3>&- + exec 4>&- + + spack "$@" + exit $? + ;; + + *) + echo "INTERNAL ERROR - UNRECOGNIZED MODE: $mode" >&2 + exit 1 + ;; +esac diff --git a/share/spack/docker/handle-prompt.sh b/share/spack/docker/handle-prompt.sh deleted file mode 100644 index a01047463e2..00000000000 --- a/share/spack/docker/handle-prompt.sh +++ /dev/null @@ -1,173 +0,0 @@ -# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -if [ "$CURRENTLY_BUILDING_DOCKER_IMAGE" '!=' '1' ] ; then - -if [ x$SPACK_PROMPT '!=' x0 ] ; then - -__tmp="`mktemp -d`" - -__trylock() { - local dir - dir="$__tmp/$1.lock" - mkdir "$dir" &>/dev/null - return $? -} - -__queue_init() { - local r - local w - - mkdir "$__tmp/$1.read.lock" ; r=$? - mkdir "$__tmp/$1.write.lock" ; w=$? - - if [ "$r" '=' '0' -a "$w" '=' '0' ] ; then - return 0 - else - return 1 - fi -} - -__queue_try_read() { - __trylock "$1.read" - return $? -} - -__queue_try_write() { - __trylock "$1.write" - return $? -} - -__queue_make_readable() { - rm -r "$__tmp/$1.read.lock" &>/dev/null - return $? -} - -__queue_make_writable() { - rm -r "$__tmp/$1.write.lock" &>/dev/null - return $? -} - -__read() { - cat "$__tmp/$1" 2> /dev/null - return $? -} - -__write() { - cat > "$__tmp/$1" 2> /dev/null - return $? -} - -__revparse_head() { - head="`git -C "$SPACK_ROOT" rev-parse $@ HEAD 2>/dev/null`" - result="$?" - if [ "$result" '!=' '0' ] ; then - head="`git --git-dir="$SPACK_ROOT"/.git \\ - --work-tree="$SPACK_ROOT" rev-parse $@ HEAD 2>/dev/null`" - result="$?" - fi - - echo "$head" - return $result -} - -__git_head() { - head="`__revparse_head --abbrev-ref`" - if [ "$?" '=' '0' ] ; then - if [ "$head" '=' 'HEAD' ] ; then - head="`__revparse_head | cut -c1-8`..." - fi - - echo "$head" - fi -} - -__update_prompt() { - local prompt - prompt='' - linux_distro="$DOCKERFILE_DISTRO" - if [ -n "$linux_distro" ] ; then - linux_distro='\[\e[1;34m\][\[\e[0;34m\]'"$linux_distro"'\[\e[1;34m\]]' - if [ -n "$prompt" ] ; then - prompt="$prompt " - fi - prompt="$prompt$linux_distro" - fi - - git_head="`__git_head`" - - if [ -n "$git_head" ] ; then - git_head='\[\e[1;32m\](\[\e[0;32m\]'"$git_head"'\[\e[1;32m\])' - if [ -n "$prompt" ] ; then - prompt="$prompt " - fi - prompt="$prompt$git_head" - fi - - if [ -n "$prompt" ] ; then - prompt="$prompt " - fi - prompt="$prompt"'\[\e[0;m\]\W: ' - echo "$prompt" | __write prompt -} - -set -m -( - __queue_init query - __queue_init prompt - - __update_prompt - __queue_make_readable prompt - - __queue_make_writable query - - while sleep 0.010 ; do - last_q_time='' - - while sleep 0.010 ; do - q_time="`date +%s%N`" - if __queue_try_read query ; then - last_q_time="$q_time" - __queue_make_writable query - fi - - if [ -n "$last_q_time" -a \ - "$(( (q_time - last_q_time)/10000000 > 100 ))" '=' '1' ] ; then - break - fi - done - - __update_prompt - __queue_make_readable prompt - done -) &>/dev/null & -set +m - -__update_prompt_main_first_call=1 -__update_prompt_main() { - if [ "$__update_prompt_main_first_call" '=' '1' ] ; then - while sleep 0.001 ; do - if __queue_try_read prompt ; then - PS1="`__read prompt`" - break - fi - done - __update_prompt_main_first_call=0 - else - if __queue_try_read prompt ; then - PS1="`__read prompt`" - fi - fi - - if __queue_try_write query ; then - __queue_make_readable query - fi -} - -PROMPT_COMMAND=__update_prompt_main - -fi # [ x$SPACK_PROMPT '!=' x0 ] - -fi # [ "$CURRENTLY_BUILDING_DOCKER_IMAGE" '!=' '1' ] diff --git a/share/spack/docker/handle-ssh.sh b/share/spack/docker/handle-ssh.sh deleted file mode 100644 index 18e5ae259d8..00000000000 --- a/share/spack/docker/handle-ssh.sh +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -if [ "$CURRENTLY_BUILDING_DOCKER_IMAGE" '!=' '1' ] ; then - -uid="`id -u`" -if [ "$uid" '=' '0' ] ; then - key_types="dsa ecdsa rsa" - if [ "$DOCKERFILE_BASE" '!=' 'centos:6' ] ; then - key_types="${key_types} ed25519" - fi - - for key_type in $key_types ; do - private_key_file="/etc/ssh/ssh_host_${key_type}_key" - public_key_file="$private_key_file.pub" - - if [ '!' -f "$private_key_file" ] ; then - ssh-keygen \ - -q -t "$key_type" -N "" -f "$private_key_file" - chmod 600 "$private_key_file" - chmod 644 "$public_key_file" - fi - done - - mkdir -p /var/run/sshd - - pgrep -u 0 -U 0 sshd &> /dev/null - if [ '!' "$?" '=' '0' ] ; then - nohup /usr/sbin/sshd -f /etc/ssh/sshd_config < /dev/null &> /dev/null - fi -fi - -if [ '!' -f "$HOME/.ssh/id_rsa" ] ; then - ssh-keygen \ - -t rsa -C "spack.developer@docker.host" -N "" -f "$HOME/.ssh/id_rsa" - cat "$HOME/.ssh/id_rsa.pub" >> "$HOME/.ssh/authorized_keys" - chmod 600 "$HOME/.ssh/authorized_keys" - - docker_ip="`ip address show dev eth0 | - grep inet | - cut -d' ' -f 6 | - cut -d/ -f 1`" - - ssh-keyscan -t rsa 127.0.0.1 localhost "$docker_ip" "`hostname`" \ - > "$HOME/.ssh/known_hosts" 2> /dev/null -fi - -fi # [ "$CURRENTLY_BUILDING_DOCKER_IMAGE" '!=' '1' ] diff --git a/share/spack/docker/ubuntu-1604.dockerfile b/share/spack/docker/ubuntu-1604.dockerfile index e7a6783d24c..7891c5a2614 100644 --- a/share/spack/docker/ubuntu-1604.dockerfile +++ b/share/spack/docker/ubuntu-1604.dockerfile @@ -16,29 +16,35 @@ COPY share $SPACK_ROOT/share COPY var $SPACK_ROOT/var RUN mkdir -p $SPACK_ROOT/opt/spack -RUN apt-get -yqq update \ - && apt-get -yqq install --no-install-recommends \ - build-essential \ - ca-certificates \ - curl \ - file \ - g++ \ - gcc \ - gfortran \ - git \ - gnupg2 \ - iproute2 \ - lmod \ - locales \ - lua-posix \ - make \ - openssh-server \ - python3 \ - python3-pip \ - tcl \ - unzip \ - && locale-gen en_US.UTF-8 \ - && pip3 install boto3 \ +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + +RUN apt-get -yqq update \ + && apt-get -yqq install --no-install-recommends \ + build-essential \ + ca-certificates \ + curl \ + file \ + g++ \ + gcc \ + gfortran \ + git \ + gnupg2 \ + iproute2 \ + lmod \ + locales \ + lua-posix \ + make \ + python3 \ + python3-pip \ + tcl \ + unzip \ + && locale-gen en_US.UTF-8 \ + && pip3 install boto3 \ && rm -rf /var/lib/apt/lists/* # Add LANG default to en_US.UTF-8 @@ -46,33 +52,10 @@ ENV LANGUAGE en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LC_ALL en_US.UTF-8 -RUN ( echo ". /usr/share/lmod/lmod/init/bash" \ - && echo ". \$SPACK_ROOT/share/spack/setup-env.sh" \ - && echo "if [ \"\$CURRENTLY_BUILDING_DOCKER_IMAGE\" '!=' '1' ]" \ - && echo "then" \ - && echo " . \$SPACK_ROOT/share/spack/spack-completion.bash" \ - && echo "fi" ) \ - >> /etc/profile.d/spack.sh \ - && ( echo "f=\"\$SPACK_ROOT/share/spack/docker/handle-ssh.sh\"" \ - && echo "if [ -f \"\$f\" ]" \ - && echo "then" \ - && echo " . \"\$f\"" \ - && echo "else" \ - && cat $SPACK_ROOT/share/spack/docker/handle-ssh.sh \ - && echo "fi" ) \ - >> /etc/profile.d/handle-ssh.sh \ - && ( echo "f=\"\$SPACK_ROOT/share/spack/docker/handle-prompt.sh\"" \ - && echo "if [ -f \"\$f\" ]" \ - && echo "then" \ - && echo " . \"\$f\"" \ - && echo "else" \ - && cat $SPACK_ROOT/share/spack/docker/handle-prompt.sh \ - && echo "fi" ) \ - >> /etc/profile.d/handle-prompt.sh \ - && mkdir -p /root/.spack \ - && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ - /root/.spack/modules.yaml \ - && rm -rf /root/*.* $SPACK_ROOT/.git +RUN mkdir -p /root/.spack \ + && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ + /root/.spack/modules.yaml \ + && rm -rf /root/*.* /run/nologin $SPACK_ROOT/.git # [WORKAROUND] # https://superuser.com/questions/1241548/ @@ -82,10 +65,10 @@ RUN [ -f ~/.profile ] \ || true WORKDIR /root -SHELL ["/bin/bash", "-l", "-c"] +SHELL ["docker-shell"] # TODO: add a command to Spack that (re)creates the package cache RUN spack spec hdf5+mpi ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"] -CMD ["docker-shell"] +CMD ["interactive-shell"] diff --git a/share/spack/docker/ubuntu-1804.dockerfile b/share/spack/docker/ubuntu-1804.dockerfile index 5950908e1ee..c0793314760 100644 --- a/share/spack/docker/ubuntu-1804.dockerfile +++ b/share/spack/docker/ubuntu-1804.dockerfile @@ -16,29 +16,35 @@ COPY share $SPACK_ROOT/share COPY var $SPACK_ROOT/var RUN mkdir -p $SPACK_ROOT/opt/spack -RUN apt-get -yqq update \ - && apt-get -yqq install --no-install-recommends \ - build-essential \ - ca-certificates \ - curl \ - file \ - g++ \ - gcc \ - gfortran \ - git \ - gnupg2 \ - iproute2 \ - lmod \ - locales \ - lua-posix \ - make \ - openssh-server \ - python3 \ - python3-pip \ - tcl \ - unzip \ - && locale-gen en_US.UTF-8 \ - && pip3 install boto3 \ +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + +RUN apt-get -yqq update \ + && apt-get -yqq install --no-install-recommends \ + build-essential \ + ca-certificates \ + curl \ + file \ + g++ \ + gcc \ + gfortran \ + git \ + gnupg2 \ + iproute2 \ + lmod \ + locales \ + lua-posix \ + make \ + python3 \ + python3-pip \ + tcl \ + unzip \ + && locale-gen en_US.UTF-8 \ + && pip3 install boto3 \ && rm -rf /var/lib/apt/lists/* # Add LANG default to en_US.UTF-8 @@ -46,33 +52,10 @@ ENV LANGUAGE en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LC_ALL en_US.UTF-8 -RUN ( echo ". /usr/share/lmod/lmod/init/bash" \ - && echo ". \$SPACK_ROOT/share/spack/setup-env.sh" \ - && echo "if [ \"\$CURRENTLY_BUILDING_DOCKER_IMAGE\" '!=' '1' ]" \ - && echo "then" \ - && echo " . \$SPACK_ROOT/share/spack/spack-completion.bash" \ - && echo "fi" ) \ - >> /etc/profile.d/spack.sh \ - && ( echo "f=\"\$SPACK_ROOT/share/spack/docker/handle-ssh.sh\"" \ - && echo "if [ -f \"\$f\" ]" \ - && echo "then" \ - && echo " . \"\$f\"" \ - && echo "else" \ - && cat $SPACK_ROOT/share/spack/docker/handle-ssh.sh \ - && echo "fi" ) \ - >> /etc/profile.d/handle-ssh.sh \ - && ( echo "f=\"\$SPACK_ROOT/share/spack/docker/handle-prompt.sh\"" \ - && echo "if [ -f \"\$f\" ]" \ - && echo "then" \ - && echo " . \"\$f\"" \ - && echo "else" \ - && cat $SPACK_ROOT/share/spack/docker/handle-prompt.sh \ - && echo "fi" ) \ - >> /etc/profile.d/handle-prompt.sh \ - && mkdir -p /root/.spack \ - && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ - /root/.spack/modules.yaml \ - && rm -rf /root/*.* $SPACK_ROOT/.git +RUN mkdir -p /root/.spack \ + && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ + /root/.spack/modules.yaml \ + && rm -rf /root/*.* /run/nologin $SPACK_ROOT/.git # [WORKAROUND] # https://superuser.com/questions/1241548/ @@ -86,10 +69,10 @@ RUN [ -f ~/.profile ] \ RUN ln -s posix_c.so /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so WORKDIR /root -SHELL ["/bin/bash", "-l", "-c"] +SHELL ["docker-shell"] # TODO: add a command to Spack that (re)creates the package cache RUN spack spec hdf5+mpi ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"] -CMD ["docker-shell"] +CMD ["interactive-shell"] From dc31afe67d5b684ce7ab7d49088d895f28c78410 Mon Sep 17 00:00:00 2001 From: psakievich Date: Tue, 16 Jun 2020 12:27:33 -0600 Subject: [PATCH 732/802] Yaml spec parsing corner case (#17101) * Catch yaml filename corner case in spec parser * improved regex and remove redundant error checking Co-authored-by: Gregory Becker --- lib/spack/spack/spec.py | 9 ++------- lib/spack/spack/test/spec_syntax.py | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 03f334597a7..b09d72003e6 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3945,7 +3945,8 @@ def __init__(self): # Filenames match before identifiers, so no initial filename # component is parsed as a spec (e.g., in subdir/spec.yaml) - (r'[/\w.-]+\.yaml[^\b]*', lambda scanner, v: self.token(FILE, v)), + (r'[/\w.-]*/[/\w/-]+\.yaml[^\b]*', + lambda scanner, v: self.token(FILE, v)), # Hash match after filename. No valid filename can be a hash # (files end w/.yaml), but a hash can match a filename prefix. @@ -4096,11 +4097,6 @@ def spec_from_file(self): """ path = self.token.value - # don't treat builtin.yaml, builtin.yaml-cpp, etc. as filenames - if re.match(spec_id_re + '$', path): - self.push_tokens([spack.parse.Token(ID, self.token.value)]) - return None - # Special case where someone omits a space after a filename. Consider: # # libdwarf^/some/path/to/libelf.yamllibdwarf ^../../libelf.yaml @@ -4112,7 +4108,6 @@ def spec_from_file(self): raise SpecFilenameError( "Spec filename must end in .yaml: '{0}'".format(path)) - # if we get here, we're *finally* interpreting path as a filename if not os.path.exists(path): raise NoSuchSpecFileError("No such spec file: '{0}'".format(path)) diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index 688c89022cb..c9a2100b09e 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -188,6 +188,32 @@ def test_full_specs(self): " ^_openmpi@1.2:1.4,1.6%intel@12.1~qt_4 debug=2" " ^stackwalker@8.1_1e arch=test-redhat6-x86") + def test_yaml_specs(self): + self.check_parse( + "yaml-cpp@0.1.8%intel@12.1" + " ^boost@3.1.4") + tempspec = r"builtin.yaml-cpp%gcc" + self.check_parse( + tempspec.strip("builtin."), + spec=tempspec) + tempspec = r"testrepo.yaml-cpp%gcc" + self.check_parse( + tempspec.strip("testrepo."), + spec=tempspec) + tempspec = r"builtin.yaml-cpp@0.1.8%gcc" + self.check_parse( + tempspec.strip("builtin."), + spec=tempspec) + tempspec = r"builtin.yaml-cpp@0.1.8%gcc@7.2.0" + self.check_parse( + tempspec.strip("builtin."), + spec=tempspec) + tempspec = r"builtin.yaml-cpp@0.1.8%gcc@7.2.0" \ + r" ^boost@3.1.4" + self.check_parse( + tempspec.strip("builtin."), + spec=tempspec) + def test_canonicalize(self): self.check_parse( "mvapich_foo" From 4a948060cfd4db3df4be44748d13d5736bf83f05 Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Tue, 16 Jun 2020 14:33:35 -0400 Subject: [PATCH 733/802] VTK: add version 9.0.0; update Python dependency constraints (#17019) In Python 3.8, the reserved "tp_print" slot was changed from a function pointer to a number, which broke the Python wrapping code in vtk@8 (causing "cannot convert 'std::nullptr_t' to 'Py_ssize_t'" errors in various places). This is fixed in vtk@9.0.0. This patch: 1) adds vtk@9.0.0 2) updates depends_on constraints to only use python@3.8: for vtk@9: vtk@:8 depends on python@2, and vtk@8.0.1:8.9.9 depends on python@:3.7 3) Adds CMake flag VTK_PYTHON_VERSION=3 when using python@3 with vtk@9 --- .../repos/builtin/packages/vtk/package.py | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index 87fce79af29..e99f779fede 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -15,11 +15,12 @@ class Vtk(CMakePackage): processing and visualization. """ homepage = "http://www.vtk.org" - url = "http://www.vtk.org/files/release/8.0/VTK-8.0.1.tar.gz" + url = "https://www.vtk.org/files/release/9.0/VTK-9.0.0.tar.gz" list_url = "http://www.vtk.org/download/" maintainers = ['chuckatkins', 'danlipsa'] + version('9.0.0', sha256='15def4e6f84d72f82386617fe595ec124dda3cbd13ea19a0dcd91583197d8715') version('8.2.0', sha256='34c3dc775261be5e45a8049155f7228b6bd668106c72a3c435d95730d17d57bb') version('8.1.2', sha256='0995fb36857dd76ccfb8bb07350c214d9f9099e80b1e66b4a8909311f24ff0db') version('8.1.1', sha256='71a09b4340f0a9c58559fe946dc745ab68a866cf20636a41d97b6046cb736324') @@ -44,11 +45,18 @@ class Vtk(CMakePackage): # At the moment, we cannot build with both osmesa and qt, but as of # VTK 8.1, that should change conflicts('+osmesa', when='+qt') - conflicts('^python@3:', when='@:8.0') extends('python', when='+python') - depends_on('python@2.7:', when='+python', type=('build', 'run')) + # Acceptable python versions depend on vtk version + # We need vtk at least 8.0.1 for python@3, + # and at least 9.0 for python@3.8 + depends_on('python@2.7:2.9', when='@:8.0 +python', type=('build', 'run')) + depends_on('python@2.7:3.7.9', when='@8.0.1:8.9 +python', + type=('build', 'run')) + depends_on('python@2.7:', when='@9.0: +python', type=('build', 'run')) + + # We need mpi4py if buidling python wrappers and using MPI depends_on('py-mpi4py', when='+python+mpi', type='run') # python3.7 compatibility patch backported from upstream @@ -164,6 +172,8 @@ def cmake_args(self): ]) if '+mpi' in spec: cmake_args.append('-DVTK_USE_SYSTEM_MPI4PY:BOOL=ON') + if spec.satisfies('@9.0.0: ^python@3:'): + cmake_args.append('-DVTK_PYTHON_VERSION=3') else: cmake_args.append('-DVTK_WRAP_PYTHON=OFF') @@ -273,8 +283,8 @@ def cmake_args(self): # in March 2014 (see # https://public.kitware.com/pipermail/vtkusers/2014-March/083368.html) if (self.spec.satisfies('%clang') and - self.compiler.is_apple and - self.compiler.version >= Version('5.1.0')): + self.compiler.is_apple and + self.compiler.version >= Version('5.1.0')): cmake_args.extend(['-DVTK_REQUIRED_OBJCXX_FLAGS=']) # A bug in tao pegtl causes build failures with intel compilers From ff816f76b3fe765fd1f1d86ef2e9b1772fdfb7a4 Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Tue, 16 Jun 2020 15:35:49 -0400 Subject: [PATCH 734/802] ruby: add version 2.7.1 (#17112) --- var/spack/repos/builtin/packages/ruby/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py index c4f2a7dcc9b..0a67b9baa7a 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -15,6 +15,7 @@ class Ruby(AutotoolsPackage): list_url = "http://cache.ruby-lang.org/pub/ruby/" list_depth = 1 + version('2.7.1', sha256='d418483bdd0000576c1370571121a6eb24582116db0b7bb2005e90e250eae418') version('2.6.2', sha256='a0405d2bf2c2d2f332033b70dff354d224a864ab0edd462b7a413420453b49ab') version('2.5.3', sha256='9828d03852c37c20fa333a0264f2490f07338576734d910ee3fd538c9520846c') version('2.2.0', sha256='7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc') From 4652b217cfc2edc4a39833ea61790b7cd5ba6b05 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Tue, 16 Jun 2020 15:34:18 -0700 Subject: [PATCH 735/802] pango: add libffi, glib, and other dependencies (#12384) --- var/spack/repos/builtin/packages/pango/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/pango/package.py b/var/spack/repos/builtin/packages/pango/package.py index 52874160fc4..7d7ef787cec 100644 --- a/var/spack/repos/builtin/packages/pango/package.py +++ b/var/spack/repos/builtin/packages/pango/package.py @@ -23,7 +23,7 @@ class Pango(AutotoolsPackage): variant('X', default=False, description="Enable an X toolkit") - depends_on("pkgconfig", type="build") + depends_on("pkgconfig@0.9.0:", type="build") depends_on("harfbuzz") depends_on("cairo+ft+fc") depends_on("cairo~X", when='~X') @@ -31,6 +31,14 @@ class Pango(AutotoolsPackage): depends_on("libxft", when='+X') depends_on("glib") depends_on('gobject-introspection') + depends_on('fontconfig') + depends_on('freetype@2:') + depends_on('libffi') + + depends_on('harfbuzz@1.2.3:', when='@1.41.0') + depends_on('libxft@2.0.0:', when='@1.41.0 +X') + depends_on('glib@2.33.12:', when='@1.41.0') + depends_on('fontconfig@2.11.91:', when='@1.41.0') def url_for_version(self, version): url = "http://ftp.gnome.org/pub/GNOME/sources/pango/{0}/pango-{1}.tar.xz" From 896a14af820bd9ebde8488d7fa89d6032a40e3eb Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 16 Jun 2020 15:53:34 -0700 Subject: [PATCH 736/802] Doc: E4S Build Cache Link (#16986) Link to the E4S build cache in the according section of the docs. --- lib/spack/docs/binary_caches.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/spack/docs/binary_caches.rst b/lib/spack/docs/binary_caches.rst index 614ad2864c8..6e8c91c9431 100644 --- a/lib/spack/docs/binary_caches.rst +++ b/lib/spack/docs/binary_caches.rst @@ -57,6 +57,12 @@ Build caches are installed via: $ spack buildcache install +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +List of popular build caches +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* `Extreme-scale Scientific Software Stack (E4S) `_: `build cache `_ + ---------- Relocation From 84e117b4976c58c713ba8525e701c628043722d0 Mon Sep 17 00:00:00 2001 From: takanori-ihara <62980219+takanori-ihara@users.noreply.github.com> Date: Wed, 17 Jun 2020 11:59:20 +0900 Subject: [PATCH 737/802] Add compiler option to use with Fujitsu compiler (#17067) * Add compiler option to use with Fujitsu compiler * Fix flake8 error * remove 1-1_fcc_tf_patch.patch * fix flake8 error --- var/spack/repos/builtin/packages/linsys-v/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/linsys-v/package.py b/var/spack/repos/builtin/packages/linsys-v/package.py index cc8e94c26bb..545a2a8bec9 100644 --- a/var/spack/repos/builtin/packages/linsys-v/package.py +++ b/var/spack/repos/builtin/packages/linsys-v/package.py @@ -50,7 +50,9 @@ def patch(self): ) makefile.filter( r"^CFLAGS\s+=\s-Kfast,openmp", - "CFLAGS=-Ofast {0}".format(self.compiler.openmp_flag), + "CFLAGS=-Ofast -fstrict-aliasing {0}".format( + self.compiler.openmp_flag + ), ) makefile.filter( r"^LIBS\s+=\s-SCALAPACK\s-SSL2BLAMP", From b0c73c3325ac26fdc7aae4cd17e74260eee1087d Mon Sep 17 00:00:00 2001 From: takanori-ihara <62980219+takanori-ihara@users.noreply.github.com> Date: Wed, 17 Jun 2020 12:18:04 +0900 Subject: [PATCH 738/802] bazel: Update for use with Fujitsu compiler (#16860) * bazel: Update for use with Fujitsu compiler * bazel: Fix for use with Fujitsu compiler * bazel: Fix flake8 error * bazel: add conflicts setting for use with Fujitsu compiler * fix flake8 error * fix flake8 error --- .../repos/builtin/packages/bazel/package.py | 14 +++++++ .../packages/bazel/patch_for_fcc.patch | 37 +++++++++++++++++++ .../packages/bazel/patch_for_fcc2.patch | 11 ++++++ 3 files changed, 62 insertions(+) create mode 100644 var/spack/repos/builtin/packages/bazel/patch_for_fcc.patch create mode 100644 var/spack/repos/builtin/packages/bazel/patch_for_fcc2.patch diff --git a/var/spack/repos/builtin/packages/bazel/package.py b/var/spack/repos/builtin/packages/bazel/package.py index a3bd59a8b1b..27f2da0597d 100644 --- a/var/spack/repos/builtin/packages/bazel/package.py +++ b/var/spack/repos/builtin/packages/bazel/package.py @@ -130,6 +130,16 @@ class Bazel(Package): patch('compile-0.4.patch', when='@0.4:0.5') patch('compile-0.3.patch', when='@:0.3') + # for fcc + patch('patch_for_fcc.patch', when='@0.29.1:%fj') + patch('patch_for_fcc2.patch', when='@0.25:%fj') + conflicts( + '%fj', + when='@:0.24.1', + msg='Fujitsu Compiler cannot build 0.24.1 or less, ' + 'please use a newer release.' + ) + patch('disabledepcheck.patch', when='@0.3.2:+nodepfail') patch('disabledepcheck_old.patch', when='@0.3.0:0.3.1+nodepfail') @@ -201,3 +211,7 @@ def test(self): def setup_dependent_package(self, module, dependent_spec): module.bazel = Executable('bazel') + + @property + def parallel(self): + return not self.spec.satisfies('%fj') diff --git a/var/spack/repos/builtin/packages/bazel/patch_for_fcc.patch b/var/spack/repos/builtin/packages/bazel/patch_for_fcc.patch new file mode 100644 index 00000000000..d90448b0bae --- /dev/null +++ b/var/spack/repos/builtin/packages/bazel/patch_for_fcc.patch @@ -0,0 +1,37 @@ +diff --git a/src/main/cpp/blaze_util_posix.cc b/src/main/cpp/blaze_util_posix.cc +index 87ba899180..1c967ee818 100644 +--- a/src/main/cpp/blaze_util_posix.cc ++++ b/src/main/cpp/blaze_util_posix.cc +@@ -565,7 +565,8 @@ static int setlk(int fd, struct flock *lock) { + // Prefer OFD locks if available. POSIX locks can be lost "accidentally" + // due to any close() on the lock file, and are not reliably preserved + // across execve() on Linux, which we need for --batch mode. +- if (fcntl(fd, F_OFD_SETLK, lock) == 0) return 0; ++ //if (fcntl(fd, F_OFD_SETLK, lock) == 0) return 0; ++ if (fcntl(fd, F_SETLK, lock) == 0) return 0; + if (errno != EINVAL) { + if (errno != EACCES && errno != EAGAIN) { + BAZEL_DIE(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR) +diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl +index ccb18a431a..0c5c8fd6f0 100644 +--- a/tools/cpp/unix_cc_configure.bzl ++++ b/tools/cpp/unix_cc_configure.bzl +@@ -379,7 +379,8 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools): + "", + False, + ), ":") +- gold_linker_path = _find_gold_linker_path(repository_ctx, cc) ++ #gold_linker_path = _find_gold_linker_path(repository_ctx, cc) ++ gold_linker_path = None + cc_path = repository_ctx.path(cc) + if not str(cc_path).startswith(str(repository_ctx.path(".")) + "/"): + # cc is outside the repository, set -B +@@ -468,7 +469,7 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools): + # Security hardening requires optimization. + # We need to undef it as some distributions now have it enabled by default. + "-U_FORTIFY_SOURCE", +- "-fstack-protector", ++ #"-fstack-protector", + # All warnings are enabled. Maybe enable -Werror as well? + "-Wall", + # Enable a few more warnings that aren't part of -Wall. diff --git a/var/spack/repos/builtin/packages/bazel/patch_for_fcc2.patch b/var/spack/repos/builtin/packages/bazel/patch_for_fcc2.patch new file mode 100644 index 00000000000..709e5ee0202 --- /dev/null +++ b/var/spack/repos/builtin/packages/bazel/patch_for_fcc2.patch @@ -0,0 +1,11 @@ +--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java ++++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java +@@ -185,7 +185,7 @@ public class BazelRuleClassProvider { + + Map spackEnv = System.getenv(); + for (String envName : spackEnv.keySet()) { +- if (envName.startsWith("SPACK_")) { ++ if ((envName.startsWith("SPACK_")) || (envName.equals("fcc_ENV")) || (envName.equals("FCC_ENV"))) { + env.put(envName, spackEnv.get(envName)); + } + } From 6e467d13a4992791ccab196b02873778f5f46a51 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Wed, 17 Jun 2020 12:24:38 +0900 Subject: [PATCH 739/802] mxnet: avoid GNU parallel shuffle without openmp. (#17095) --- var/spack/repos/builtin/packages/mxnet/package.py | 1 + .../builtin/packages/mxnet/parallell_shuffle.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mxnet/parallell_shuffle.patch diff --git a/var/spack/repos/builtin/packages/mxnet/package.py b/var/spack/repos/builtin/packages/mxnet/package.py index 2ff65265a7b..8ef5035c077 100644 --- a/var/spack/repos/builtin/packages/mxnet/package.py +++ b/var/spack/repos/builtin/packages/mxnet/package.py @@ -46,6 +46,7 @@ class Mxnet(MakefilePackage): patch('makefile.patch', when='@0.10:0.11') patch('makefile.opencv.patch', when='@1.6.0') + patch('parallell_shuffle.patch', when='@1.6.0') def build(self, spec, prefix): # copy template configuration file diff --git a/var/spack/repos/builtin/packages/mxnet/parallell_shuffle.patch b/var/spack/repos/builtin/packages/mxnet/parallell_shuffle.patch new file mode 100644 index 00000000000..eb286cde57a --- /dev/null +++ b/var/spack/repos/builtin/packages/mxnet/parallell_shuffle.patch @@ -0,0 +1,13 @@ +--- a/src/operator/random/shuffle_op.cc 2020-01-31 08:45:22.000000000 +0900 ++++ b/src/operator/random/shuffle_op.cc 2020-06-15 11:34:32.000000000 +0900 +@@ -22,8 +22,8 @@ + * \file shuffle_op.cc + * \brief Operator to shuffle elements of an NDArray + */ +-#if !defined (__ANDROID__) && ((__GNUC__ > 4 &&\ +- !defined(__clang__major__)) || (__clang_major__ > 4 && __linux__)) ++#if ((__GNUC__ > 4 && !defined(__clang__major__)) || (__clang_major__ > 4 && __linux__)) && \ ++ defined(_OPENMP) && !defined(__ANDROID__) + #define USE_GNU_PARALLEL_SHUFFLE + #endif + From 8e6f0c353cc40970051326ea9540beabb388baca Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 16 Jun 2020 22:35:03 -0500 Subject: [PATCH 740/802] Add patch for older versions of py-tensorflow (#17122) Versions of py-tensorflow between versions 1.1 and 1.14 need a patch to avoid an import error on the cloud package even if built without support for the cloud package. --- .../packages/py-tensorflow/contrib_cloud_1.1.patch | 14 ++++++++++++++ .../py-tensorflow/contrib_cloud_1.10.patch | 14 ++++++++++++++ .../packages/py-tensorflow/contrib_cloud_1.4.patch | 14 ++++++++++++++ .../packages/py-tensorflow/contrib_cloud_1.9.patch | 14 ++++++++++++++ .../builtin/packages/py-tensorflow/package.py | 8 ++++++++ 5 files changed, 64 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.1.patch create mode 100644 var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.10.patch create mode 100644 var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.4.patch create mode 100644 var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.9.patch diff --git a/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.1.patch b/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.1.patch new file mode 100644 index 00000000000..8813edf3659 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.1.patch @@ -0,0 +1,14 @@ +--- a/tensorflow/contrib/__init__.py 2020-05-05 17:52:57.716350118 -0500 ++++ b/tensorflow/contrib/__init__.py 2020-05-05 17:56:55.665192882 -0500 +@@ -20,7 +20,10 @@ + + # Add projects here, they will show up under tf.contrib. + from tensorflow.contrib import bayesflow +-from tensorflow.contrib import cloud ++try: ++ from tensorflow.contrib import cloud ++except ImportError: ++ pass + from tensorflow.contrib import compiler + from tensorflow.contrib import copy_graph + from tensorflow.contrib import crf diff --git a/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.10.patch b/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.10.patch new file mode 100644 index 00000000000..e76defff499 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.10.patch @@ -0,0 +1,14 @@ +--- a/tensorflow/contrib/__init__.py 2020-05-05 18:14:30.701463150 -0500 ++++ b/tensorflow/contrib/__init__.py 2020-05-05 18:15:12.392435370 -0500 +@@ -26,7 +26,10 @@ + from tensorflow.contrib import bayesflow + from tensorflow.contrib import checkpoint + if os.name != "nt": +- from tensorflow.contrib import cloud ++ try: ++ from tensorflow.contrib import cloud ++ except ImportError: ++ pass + from tensorflow.contrib import cluster_resolver + from tensorflow.contrib import coder + from tensorflow.contrib import compiler diff --git a/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.4.patch b/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.4.patch new file mode 100644 index 00000000000..a65417233ed --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.4.patch @@ -0,0 +1,14 @@ +--- a/tensorflow/contrib/__init__.py 2020-05-05 18:08:09.361724827 -0500 ++++ b/tensorflow/contrib/__init__.py 2020-05-05 18:08:46.345699058 -0500 +@@ -20,7 +20,10 @@ + + # Add projects here, they will show up under tf.contrib. + from tensorflow.contrib import bayesflow +-from tensorflow.contrib import cloud ++try: ++ from tensorflow.contrib import cloud ++except ImportError: ++ pass + from tensorflow.contrib import cluster_resolver + from tensorflow.contrib import compiler + from tensorflow.contrib import copy_graph diff --git a/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.9.patch b/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.9.patch new file mode 100644 index 00000000000..2a0ac1f7137 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tensorflow/contrib_cloud_1.9.patch @@ -0,0 +1,14 @@ +--- a/tensorflow/contrib/__init__.py 2020-05-05 18:11:33.660582455 -0500 ++++ b/tensorflow/contrib/__init__.py 2020-05-05 18:12:32.570541708 -0500 +@@ -25,7 +25,10 @@ + from tensorflow.contrib import batching + from tensorflow.contrib import bayesflow + from tensorflow.contrib import checkpoint +-from tensorflow.contrib import cloud ++try: ++ from tensorflow.contrib import cloud ++except ImportError: ++ pass + from tensorflow.contrib import cluster_resolver + from tensorflow.contrib import coder + from tensorflow.contrib import compiler diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 6bdc7e69be3..3b2c0ac0621 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -255,6 +255,14 @@ class PyTensorflow(Package, CudaPackage): # Allows 2.0.* releases to build with '--config=nogcp' patch('0001-Remove-contrib-cloud-bigtable-and-storage-ops-kernel.patch', when='@2.0.0:2.0.1') + # do not import contrib.cloud if not available + patch('https://github.com/tensorflow/tensorflow/commit/ed62ac8203999513dfae03498e871ea35eb60cc4.patch', + sha256='c37d14622a86b164e2411ea45a04f756ac61b2044d251f19ab17733c508e5305', when='@1.14.0') + # import_contrib_cloud patch for older versions + patch('contrib_cloud_1.10.patch', when='@1.10:1.13') + patch('contrib_cloud_1.9.patch', when='@1.9') + patch('contrib_cloud_1.4.patch', when='@1.4:1.8') + patch('contrib_cloud_1.1.patch', when='@1.1:1.3') phases = ['configure', 'build', 'install'] From fd8971feecbb03ff076e20c47372866533612ea0 Mon Sep 17 00:00:00 2001 From: h-denpo <57649496+h-denpo@users.noreply.github.com> Date: Wed, 17 Jun 2020 12:36:08 +0900 Subject: [PATCH 741/802] Modified for Fujitsu compiler. (#17124) --- .../builtin/packages/ffb/fj_compiler.patch | 10 +++++ .../repos/builtin/packages/ffb/package.py | 13 +++++++ .../packages/ffb/revocap_refiner.patch | 38 +++++++++++++------ 3 files changed, 49 insertions(+), 12 deletions(-) create mode 100644 var/spack/repos/builtin/packages/ffb/fj_compiler.patch diff --git a/var/spack/repos/builtin/packages/ffb/fj_compiler.patch b/var/spack/repos/builtin/packages/ffb/fj_compiler.patch new file mode 100644 index 00000000000..2f733ced38f --- /dev/null +++ b/var/spack/repos/builtin/packages/ffb/fj_compiler.patch @@ -0,0 +1,10 @@ +--- FFB8.org/util/xvx2gf/XVX.h 2013-03-26 10:09:49.000000000 +0900 ++++ FFB8.new/util/xvx2gf/XVX.h 2020-06-16 16:00:06.408500236 +0900 +@@ -5,6 +5,7 @@ + #include + #include + #include ++#include + + #define MAX_LEVEL 32 + diff --git a/var/spack/repos/builtin/packages/ffb/package.py b/var/spack/repos/builtin/packages/ffb/package.py index d9de2b9862c..c7d10955832 100644 --- a/var/spack/repos/builtin/packages/ffb/package.py +++ b/var/spack/repos/builtin/packages/ffb/package.py @@ -15,6 +15,7 @@ class Ffb(MakefilePackage): version('8.1', sha256='1ad008c909152b6c27668bafbad820da3e6ec3309c7e858ddb785f0a3d6e43ae') patch('revocap_refiner.patch') + patch('fj_compiler.patch', when='%fj') depends_on('mpi') depends_on('blas') @@ -52,6 +53,7 @@ def edit(self, spec, prefix): r'#LES3DHOME =', 'LES3DHOME= {0}\n'.format(workdir)) make = join_path('make', 'OPTION') m = FileFilter(make) + m.filter(r'CPP\s*=.*$', 'CPP = /usr/bin/cpp') m.filter(r'CCOM\s*=.*$', 'CCOM = {0}'.format(spack_cc)) m.filter(r'COPT\s*=.*$', 'COPT = {0}'.format(cflags)) m.filter(r'FCOM\s*=.*$', 'FCOM = {0}\n'.format(spack_fc)) @@ -141,6 +143,17 @@ def edit(self, spec, prefix): m.filter(r'LIBS = -lfort -lgf2 -ldd_mpi -lmpi_f77', 'LIBS = -lfort -lgf2 -ldd_mpi') + if spec.satisfies('%gcc'): + editfile = join_path('util', 'xvx2gf', 'FILES') + m = FileFilter(editfile) + m.filter(r'LIBS = -lgf2 -lz -lifcore -limf -ldl', + 'LIBS = -lgf2 -lz -ldl') + elif spec.satisfies('%fj'): + editfile = join_path('util', 'xvx2gf', 'FILES') + m = FileFilter(editfile) + m.filter(r'LIBS = -lgf2 -lz -lifcore -limf -ldl', + 'LIBS = -lgf2 -lz -ldl -linkfortran') + def build(self, spec, prefix): for m in [join_path('make', 'Makeall'), join_path('lib', 'src', 'dd_mpi', 'Makeall'), diff --git a/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch b/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch index 20886120cbd..13d34bacd3a 100644 --- a/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch +++ b/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch @@ -1,6 +1,6 @@ diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h --- FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2013-03-26 10:09:31.000000000 +0900 -+++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2020-05-29 16:35:09.690918296 +0900 ++++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2020-06-16 11:33:05.765408337 +0900 @@ -64,7 +64,7 @@ public: numY = this->ynum; numZ = this->znum; @@ -10,15 +10,29 @@ diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h FFB8.new return this->xnum * this->ynum * this->znum; }; -diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h ---- FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h 2013-03-26 10:09:31.000000000 +0900 -+++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h 2020-05-29 16:35:48.756606155 +0900 -@@ -13,7 +13,7 @@ - # # - ----------------------------------------------------------------------*/ - #pragma once +@@ -81,12 +81,6 @@ public: + + int getIndex() const{ return it->first; }; + +- void getIndices(int &i,int &j,int &k) const{ +- i = it->first / (ynum*znum); +- j = (it->first - i*ynum*znum) / znum; +- k = it->first - i*ynum*znum - j*znum; +- }; - -+#include - #ifndef PI - #define PI 3.1415926535897932384626 - #endif + iterator& operator++(void){ ++it; return *this; }; + + iterator operator++(int n){ +@@ -124,12 +118,6 @@ public: + + int getIndex() const{ return it->first; }; + +- void getIndices(int &i,int &j,int &k) const{ +- i = it->first / (ynum*znum); +- j = (it->first - i*ynum*znum) / znum; +- k = it->first - i*ynum*znum - j*znum; +- }; +- + const_iterator& operator++(void){ ++it; return *this; }; + + const_iterator operator++(int n){ From 93fcca900fa5b63e1afbaf9e220060aaa442ecf9 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Wed, 17 Jun 2020 01:42:56 -0400 Subject: [PATCH 742/802] vecgeom: add version 1.1.7 (#17120) --- var/spack/repos/builtin/packages/vecgeom/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/vecgeom/package.py b/var/spack/repos/builtin/packages/vecgeom/package.py index 20352f77123..1df60770f5c 100644 --- a/var/spack/repos/builtin/packages/vecgeom/package.py +++ b/var/spack/repos/builtin/packages/vecgeom/package.py @@ -18,6 +18,7 @@ class Vecgeom(CMakePackage, CudaPackage): maintainers = ['drbenmorgan', 'sethrj'] version('master', branch='master') + version('1.1.7', sha256='cc79a0baa783b21ecc399c4e7cca925ca340e6aeb96e3b2cad45c141557519bf') version('1.1.6', sha256='c4806a6b67d01b40074b8cc6865d78574a6a1c573be51696f2ecdf98b9cb954a') version('1.1.5', sha256='da674f3bbc75c30f56c1a2d251fa8930c899f27fa64b03a36569924030d87b95') version('1.1.3', sha256='ada09e8b6b2fa6c058290302b2cb5a6c2e644192aab1623c31d18c6a2f4c01c8') @@ -45,6 +46,11 @@ class Vecgeom(CMakePackage, CudaPackage): conflicts('+cuda', when='@:1.1.5') + # Fix missing CMAKE_CUDA_STANDARD + patch('https://gitlab.cern.ch/VecGeom/VecGeom/-/commit/7094dd180ef694f2abb7463cafcedfb8b8ed30a1.diff', + sha256='34f1a6899616e40bce33d80a38a9b409f819cbaab07b2e3be7f4ec4bedb52b29', + when='@1.1.7 +cuda') + for std in _cxxstd_values: depends_on('geant4 cxxstd=' + std, when='+geant4 cxxstd=' + std) depends_on('root cxxstd=' + std, when='+root cxxstd=' + std) From 0c28d8932f2a437ca18b1731126fdcba82c84b1a Mon Sep 17 00:00:00 2001 From: Ryan Mast Date: Tue, 16 Jun 2020 07:37:12 -0700 Subject: [PATCH 743/802] helics: Add version 2.5.2 --- var/spack/repos/builtin/packages/helics/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/helics/package.py b/var/spack/repos/builtin/packages/helics/package.py index f2bb52dec6a..50bfe67fa81 100644 --- a/var/spack/repos/builtin/packages/helics/package.py +++ b/var/spack/repos/builtin/packages/helics/package.py @@ -19,6 +19,7 @@ class Helics(CMakePackage): version('develop', branch='develop', submodules=True) version('master', branch='master', submodules=True) + version('2.5.2', sha256='81928f7e30233a07ae2bfe6c5489fdd958364c0549b2a3e6fdc6163d4b390311') version('2.5.1', sha256='3fc3507f7c074ff8b6a17fe54676334158fb2ff7cc8e7f4df011938f28fdbbca') version('2.5.0', sha256='6f4f9308ebb59d82d71cf068e0d9d66b6edfa7792d61d54f0a61bf20dd2a7428') version('2.4.2', sha256='957856f06ed6d622f05dfe53df7768bba8fe2336d841252f5fac8345070fa5cb') From 494a523636e8e9e48c909908c5a536e8ef20fbdf Mon Sep 17 00:00:00 2001 From: Fabian Brandt Date: Wed, 17 Jun 2020 07:44:43 +0200 Subject: [PATCH 744/802] libnetworkit: add version 7.0 (#17111) --- var/spack/repos/builtin/packages/libnetworkit/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libnetworkit/package.py b/var/spack/repos/builtin/packages/libnetworkit/package.py index 5d7f58eb906..04ea7b4e9d8 100644 --- a/var/spack/repos/builtin/packages/libnetworkit/package.py +++ b/var/spack/repos/builtin/packages/libnetworkit/package.py @@ -22,6 +22,7 @@ class Libnetworkit(CMakePackage): maintainers = ['fabratu'] + version('7.0', sha256='4faf16c5fae3e14d3c1b6f30e25c6e093dcf6a3dbf021235f3161ac2a527f682') version('6.1', sha256='22c953ea1054c356663b31c77114c2f0c8fec17e0e707aeec23026241beab9b2') variant('static', default=False, description='Enables the build of shared libraries') From d2b745b3d6daf3ccd8e0517161d169cb5c3ce712 Mon Sep 17 00:00:00 2001 From: Muhammad Haseeb Date: Wed, 17 Jun 2020 01:55:46 -0400 Subject: [PATCH 745/802] lua: requires -ltermcap when building (#17108) --- var/spack/repos/builtin/packages/lua/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 1c6b152aa34..e00e499abcf 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -54,7 +54,7 @@ def install(self, spec, prefix): 'MYLDFLAGS=-L%s -L%s' % ( spec['readline'].prefix.lib, spec['ncurses'].prefix.lib), - 'MYLIBS=-lncursesw', + 'MYLIBS=-lncursesw -ltermcap', 'CC=%s -std=gnu99 %s' % (spack_cc, self.compiler.cc_pic_flag), target) From dc0dfe9220ecd16b207dea9695a64fb845666f6c Mon Sep 17 00:00:00 2001 From: darmac Date: Wed, 17 Jun 2020 14:04:00 +0800 Subject: [PATCH 746/802] New package: lynx (#17099) --- .../repos/builtin/packages/lynx/package.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 var/spack/repos/builtin/packages/lynx/package.py diff --git a/var/spack/repos/builtin/packages/lynx/package.py b/var/spack/repos/builtin/packages/lynx/package.py new file mode 100644 index 00000000000..66c6f5408e9 --- /dev/null +++ b/var/spack/repos/builtin/packages/lynx/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Lynx(AutotoolsPackage): + """Lynx is the text web browser.""" + + homepage = "https://lynx.invisible-island.net/" + url = "https://invisible-mirror.net/archives/lynx/tarballs/lynx2.8.9rel.1.tar.gz" + + version('2.8.9.1', sha256='a46e4167b8f02c066d2fe2eafcc5603367be0e3fe2e59e9fc4eb016f306afc8e') + + depends_on('ncurses') + + def url_for_version(self, version): + version_str = version.string + index = version_str.rfind('.') + tmp = list(version_str) + if index >= 0: + tmp.insert(index, 'rel') + version_str = ''.join(tmp) + else: + version_str = version + url = "https://invisible-mirror.net/archives/lynx/tarballs/lynx{0}.tar.gz".format(version_str) + return url From eb5f1886b78a2b79c9fb5748addaad69c1a56591 Mon Sep 17 00:00:00 2001 From: takanori-ihara <62980219+takanori-ihara@users.noreply.github.com> Date: Wed, 17 Jun 2020 22:00:36 +0900 Subject: [PATCH 747/802] py-tensorflow: Update for use with Fujitsu compiler (#17088) * py-tensorflow: Update for use with Fujitsu compiler * py-tensorflow: remove -march option * fix flake8 error --- .../packages/py-tensorflow/1-1_fcc_tf_patch.patch | 12 ++++++++++++ .../repos/builtin/packages/py-tensorflow/package.py | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-tensorflow/1-1_fcc_tf_patch.patch diff --git a/var/spack/repos/builtin/packages/py-tensorflow/1-1_fcc_tf_patch.patch b/var/spack/repos/builtin/packages/py-tensorflow/1-1_fcc_tf_patch.patch new file mode 100644 index 00000000000..281cd63b143 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tensorflow/1-1_fcc_tf_patch.patch @@ -0,0 +1,12 @@ +diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl +index 740f24ec4a..7b8300f678 100644 +--- a/tensorflow/tensorflow.bzl ++++ b/tensorflow/tensorflow.bzl +@@ -1604,6 +1604,7 @@ def _py_wrap_cc_impl(ctx): + outputs = outputs, + mnemonic = "PythonSwig", + progress_message = "SWIGing " + src.path, ++ use_default_shell_env = True, + ) + return struct(files = depset(outputs)) + diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 3b2c0ac0621..5c8a10a4a92 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -255,6 +255,10 @@ class PyTensorflow(Package, CudaPackage): # Allows 2.0.* releases to build with '--config=nogcp' patch('0001-Remove-contrib-cloud-bigtable-and-storage-ops-kernel.patch', when='@2.0.0:2.0.1') + + # for fcc + patch('1-1_fcc_tf_patch.patch', when='@2.1.0:2.1.99%fj') + # do not import contrib.cloud if not available patch('https://github.com/tensorflow/tensorflow/commit/ed62ac8203999513dfae03498e871ea35eb60cc4.patch', sha256='c37d14622a86b164e2411ea45a04f756ac61b2044d251f19ab17733c508e5305', when='@1.14.0') @@ -635,6 +639,11 @@ def post_configure_fixes(self): 'build --action_env LD_LIBRARY_PATH="' + slibs + '"', '.tf_configure.bazelrc') + filter_file('build:opt --copt=-march=native', '', + '.tf_configure.bazelrc') + filter_file('build:opt --host_copt=-march=native', '', + '.tf_configure.bazelrc') + def build(self, spec, prefix): tmp_path = env['TEST_TMPDIR'] From e90c229dab42760f9fcf6f72267b35d054dbf606 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Wed, 17 Jun 2020 10:34:53 -0400 Subject: [PATCH 748/802] Fix/clarify some trilinos variants/dependencies (#17006) - Parallel HDF5 isn't required -- the comment seems to be about a transitive dependency with pnetcdf. - Boost usage should respect the variant, not automatically be reenabled when choosing DTK. --- var/spack/repos/builtin/packages/trilinos/package.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 5e8a96a16aa..16f916849c3 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -288,6 +288,7 @@ class Trilinos(CMakePackage): conflicts('+zoltan2', when='~xpetra') conflicts('+zoltan2', when='~zoltan') + conflicts('+dtk', when='~boost') conflicts('+dtk', when='~intrepid2') conflicts('+dtk', when='~kokkos') conflicts('+dtk', when='~teuchos') @@ -330,9 +331,9 @@ class Trilinos(CMakePackage): depends_on('blas') depends_on('lapack') depends_on('boost', when='+boost') - depends_on('boost', when='+dtk') - depends_on('matio', when='+matio') depends_on('glm', when='+glm') + depends_on('hdf5+hl', when='+hdf5') + depends_on('matio', when='+matio') depends_on('metis@5:', when='+metis') depends_on('suite-sparse', when='+suite-sparse') depends_on('zlib', when="+zlib") @@ -364,14 +365,12 @@ class Trilinos(CMakePackage): depends_on('hypre~internal-superlu~int64', when='+hypre') depends_on('hypre@xsdk-0.2.0~internal-superlu', when='@xsdk-0.2.0+hypre') depends_on('hypre@develop~internal-superlu', when='@develop+hypre') - # We need hdf5+hl to match with netcdf during concretization - depends_on('hdf5+hl+mpi', when='+hdf5+mpi') depends_on('python', when='+python') depends_on('py-numpy', when='+python', type=('build', 'run')) depends_on('swig', when='+python') # Dependencies/conflicts when MPI is disabled - depends_on('hdf5+hl~mpi', when='+hdf5~mpi') + depends_on('hdf5~mpi', when='+hdf5~mpi') conflicts('+parmetis', when='~mpi') conflicts('+pnetcdf', when='~mpi') From eca08c77e383692d0c00c964f1c129b0996f5bc1 Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Wed, 17 Jun 2020 17:32:08 +0200 Subject: [PATCH 749/802] openmpi: fixes for NAG compiler (#17073) * openmpi: fixes for NAG compiler * openmpi: more fixes --- .../1.10.4_1.10.999.patch} | 0 .../2.0.0_2.1.1.patch} | 0 .../2.1.2_2.1.3_3.0.0.patch} | 0 .../2.1.4_2.1.999_3.0.1_4.patch} | 0 .../repos/builtin/packages/openmpi/package.py | 115 +++- .../openmpi/use_mpi_tkr_sizeof/step_1.patch | 584 ++++++++++++++++++ .../openmpi/use_mpi_tkr_sizeof/step_2.patch | 22 + 7 files changed, 700 insertions(+), 21 deletions(-) rename var/spack/repos/builtin/packages/openmpi/{nag_ltmain_4.patch => nag_pthread/1.10.4_1.10.999.patch} (100%) rename var/spack/repos/builtin/packages/openmpi/{nag_ltmain_3.patch => nag_pthread/2.0.0_2.1.1.patch} (100%) rename var/spack/repos/builtin/packages/openmpi/{nag_ltmain_2.patch => nag_pthread/2.1.2_2.1.3_3.0.0.patch} (100%) rename var/spack/repos/builtin/packages/openmpi/{nag_ltmain_1.patch => nag_pthread/2.1.4_2.1.999_3.0.1_4.patch} (100%) create mode 100644 var/spack/repos/builtin/packages/openmpi/use_mpi_tkr_sizeof/step_1.patch create mode 100644 var/spack/repos/builtin/packages/openmpi/use_mpi_tkr_sizeof/step_2.patch diff --git a/var/spack/repos/builtin/packages/openmpi/nag_ltmain_4.patch b/var/spack/repos/builtin/packages/openmpi/nag_pthread/1.10.4_1.10.999.patch similarity index 100% rename from var/spack/repos/builtin/packages/openmpi/nag_ltmain_4.patch rename to var/spack/repos/builtin/packages/openmpi/nag_pthread/1.10.4_1.10.999.patch diff --git a/var/spack/repos/builtin/packages/openmpi/nag_ltmain_3.patch b/var/spack/repos/builtin/packages/openmpi/nag_pthread/2.0.0_2.1.1.patch similarity index 100% rename from var/spack/repos/builtin/packages/openmpi/nag_ltmain_3.patch rename to var/spack/repos/builtin/packages/openmpi/nag_pthread/2.0.0_2.1.1.patch diff --git a/var/spack/repos/builtin/packages/openmpi/nag_ltmain_2.patch b/var/spack/repos/builtin/packages/openmpi/nag_pthread/2.1.2_2.1.3_3.0.0.patch similarity index 100% rename from var/spack/repos/builtin/packages/openmpi/nag_ltmain_2.patch rename to var/spack/repos/builtin/packages/openmpi/nag_pthread/2.1.2_2.1.3_3.0.0.patch diff --git a/var/spack/repos/builtin/packages/openmpi/nag_ltmain_1.patch b/var/spack/repos/builtin/packages/openmpi/nag_pthread/2.1.4_2.1.999_3.0.1_4.patch similarity index 100% rename from var/spack/repos/builtin/packages/openmpi/nag_ltmain_1.patch rename to var/spack/repos/builtin/packages/openmpi/nag_pthread/2.1.4_2.1.999_3.0.1_4.patch diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index b3dcac253e2..ee2f76ea19e 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import itertools import os import sys import llnl.util.tty as tty @@ -157,12 +158,26 @@ class Openmpi(AutotoolsPackage): patch('btl_vader.patch', when='@3.0.1:3.0.2') patch('btl_vader.patch', when='@3.1.0:3.1.2') - # Reported upstream: https://github.com/open-mpi/ompi/pull/6378 + # Make NAG compiler pass the -pthread option to the linker: + # https://github.com/open-mpi/ompi/pull/6378 # We support only versions based on Libtool 2.4.6. - patch('nag_ltmain_1.patch', when='@2.1.4:2.1.999,3.0.1:4%nag') - patch('nag_ltmain_2.patch', when='@2.1.2:2.1.3,3.0.0%nag') - patch('nag_ltmain_3.patch', when='@2.0.0:2.1.1%nag') - patch('nag_ltmain_4.patch', when='@1.10.4:1.10.999%nag') + patch('nag_pthread/2.1.4_2.1.999_3.0.1_4.patch', when='@2.1.4:2.1.999,3.0.1:4%nag') + patch('nag_pthread/2.1.2_2.1.3_3.0.0.patch', when='@2.1.2:2.1.3,3.0.0%nag') + patch('nag_pthread/2.0.0_2.1.1.patch', when='@2.0.0:2.1.1%nag') + patch('nag_pthread/1.10.4_1.10.999.patch', when='@1.10.4:1.10.999%nag') + + # Fix MPI_Sizeof() in the "mpi" Fortran module for compilers that do not + # support "IGNORE TKR" functionality (e.g. NAG). + # The issue has been resolved upstream in two steps: + # 1) https://github.com/open-mpi/ompi/pull/2294 + # 2) https://github.com/open-mpi/ompi/pull/5099 + # The first one was applied starting version v3.0.0 and backported to + # v1.10. A subset with relevant modifications is applicable starting + # version 1.8.4. + patch('use_mpi_tkr_sizeof/step_1.patch', when='@1.8.4:1.10.6,2:2.999') + # The second patch was applied starting version v4.0.0 and backported to + # v2.x, v3.0.x, and v3.1.x. + patch('use_mpi_tkr_sizeof/step_2.patch', when='@1.8.4:2.1.3,3:3.0.1') variant( 'fabrics', @@ -192,7 +207,8 @@ class Openmpi(AutotoolsPackage): description='Enable MPI_THREAD_MULTIPLE support') variant('cuda', default=False, description='Enable CUDA support') variant('pmi', default=False, description='Enable PMI support') - variant('runpath', default=True, description='Enable wrapper runpath') + variant('wrapper-rpath', default=True, + description='Enable rpath support in the wrappers') variant('cxx', default=False, description='Enable C++ MPI bindings') variant('cxx_exceptions', default=False, description='Enable C++ Exception support') variant('gpfs', default=True, description='Enable GPFS support (if present)') @@ -274,6 +290,9 @@ class Openmpi(AutotoolsPackage): conflicts('fabrics=libfabric', when='@:1.8') # libfabric support was added in 1.10.0 # It may be worth considering making libfabric an exclusive fabrics choice + # RPATH support in the wrappers was added in 1.7.4 + conflicts('+wrapper-rpath', when='@:1.7.3') + def url_for_version(self, version): url = "http://www.open-mpi.org/software/ompi/v{0}/downloads/openmpi-{1}.tar.bz2" return url.format(version.up_to(2), version) @@ -369,12 +388,10 @@ def configure_args(self): '--disable-silent-rules' ] - # Add extra_rpaths dirs from compilers.yaml into link wrapper - rpaths = [self.compiler.cc_rpath_arg + path - for path in self.compiler.extra_rpaths] - config_args.extend([ - '--with-wrapper-ldflags={0}'.format(' '.join(rpaths)) - ]) + # All rpath flags should be appended with self.compiler.cc_rpath_arg. + # Later, we might need to update share/openmpi/mpic++-wrapper-data.txt + # and mpifort-wrapper-data.txt (see filter_rpaths()). + wrapper_ldflags = [] if '+atomics' in spec: config_args.append('--enable-builtin-atomics') @@ -418,12 +435,6 @@ def configure_args(self): if 'fabrics=auto' not in spec: config_args.extend(self.with_or_without('fabrics', activation_value='prefix')) - # The wrappers fail to automatically link libfabric. This will cause - # undefined references unless we add the appropriate flags. - if 'fabrics=libfabric' in spec: - config_args.append('--with-wrapper-ldflags=-L{0} -Wl,-rpath={0}' - .format(spec['libfabric'].prefix.lib)) - config_args.append('--with-wrapper-libs=-lfabric') # Schedulers if 'schedulers=auto' not in spec: @@ -499,12 +510,24 @@ def configure_args(self): else: config_args.append('--without-cuda') - if '+runpath' in spec: + if '+wrapper-rpath' in spec: config_args.append('--enable-wrapper-rpath') - config_args.append('--enable-wrapper-runpath') + + # Disable new dynamic tags in the wrapper (--disable-new-dtags) + # In the newer versions this can be done with a configure option + # (for older versions, we rely on filter_compiler_wrappers() and + # filter_pc_files()): + if spec.satisfies('@3.0.5:'): + config_args.append('--disable-wrapper-runpath') + + # Add extra_rpaths and implicit_rpaths into the wrappers. + wrapper_ldflags.extend([ + self.compiler.cc_rpath_arg + path + for path in itertools.chain( + self.compiler.extra_rpaths, + self.compiler.implicit_rpaths())]) else: config_args.append('--disable-wrapper-rpath') - config_args.append('--disable-wrapper-runpath') if spec.satisfies('@:4'): if '+cxx' in spec: @@ -517,8 +540,58 @@ def configure_args(self): else: config_args.append('--disable-cxx-exceptions') + if wrapper_ldflags: + config_args.append( + '--with-wrapper-ldflags={0}'.format(' '.join(wrapper_ldflags))) + return config_args + @when('+wrapper-rpath') + @run_after('install') + def filter_rpaths(self): + + def filter_lang_rpaths(lang_tokens, rpath_arg): + if self.compiler.cc_rpath_arg == rpath_arg: + return + + files = find(self.spec.prefix.share.openmpi, + ['*{0}-wrapper-data*'.format(t) for t in lang_tokens]) + files.extend(find(self.spec.prefix.lib.pkgconfig, + ['ompi-{0}.pc'.format(t) for t in lang_tokens])) + + x = FileFilter(*[f for f in files if not os.path.islink(f)]) + + # Replace self.compiler.cc_rpath_arg, which have been added as + # '--with-wrapper-ldflags', with rpath_arg in the respective + # language-specific wrappers and pkg-config files. + x.filter(self.compiler.cc_rpath_arg, rpath_arg, + string=True, backup=False) + + if self.spec.satisfies('@:1.10.3,2:2.1.1'): + # Replace Libtool-style RPATH prefixes '-Wl,-rpath -Wl,' with + # rpath_arg for old version of OpenMPI, which assumed that CXX + # and FC had the same prefixes as CC. + x.filter('-Wl,-rpath -Wl,', rpath_arg, + string=True, backup=False) + + filter_lang_rpaths(['c++', 'CC', 'cxx'], self.compiler.cxx_rpath_arg) + filter_lang_rpaths(['fort', 'f77', 'f90'], self.compiler.fc_rpath_arg) + + @when('@:3.0.4+wrapper-rpath') + @run_after('install') + def filter_pc_files(self): + files = find(self.spec.prefix.lib.pkgconfig, '*.pc') + x = FileFilter(*[f for f in files if not os.path.islink(f)]) + + # Remove this linking flag if present (it turns RPATH into RUNPATH) + x.filter('{0}--enable-new-dtags'.format(self.compiler.linker_arg), '', + string=True, backup=False) + + # NAG compiler is usually mixed with GCC, which has a different + # prefix for linker arguments. + if self.compiler.name == 'nag': + x.filter('-Wl,--enable-new-dtags', '', string=True, backup=False) + @run_after('install') def delete_mpirun_mpiexec(self): # The preferred way to run an application when Slurm is the diff --git a/var/spack/repos/builtin/packages/openmpi/use_mpi_tkr_sizeof/step_1.patch b/var/spack/repos/builtin/packages/openmpi/use_mpi_tkr_sizeof/step_1.patch new file mode 100644 index 00000000000..53d9e0018db --- /dev/null +++ b/var/spack/repos/builtin/packages/openmpi/use_mpi_tkr_sizeof/step_1.patch @@ -0,0 +1,584 @@ +--- a/ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h ++++ b/ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h +@@ -1650,570 +1650,6 @@ end subroutine MPI_Request_get_status + end interface + + +-interface MPI_Sizeof +- +-subroutine MPI_Sizeof0DCH(x, size, ierror) +- character, intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof0DCH +- +- +-subroutine MPI_Sizeof0DL(x, size, ierror) +- logical, intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof0DL +- +- +-subroutine MPI_Sizeof0DI1(x, size, ierror) +- integer*1, intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof0DI1 +- +- +-subroutine MPI_Sizeof0DI2(x, size, ierror) +- integer*2, intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof0DI2 +- +- +-subroutine MPI_Sizeof0DI4(x, size, ierror) +- integer*4, intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof0DI4 +- +- +-subroutine MPI_Sizeof0DI8(x, size, ierror) +- integer*8, intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof0DI8 +- +- +-subroutine MPI_Sizeof0DR4(x, size, ierror) +- real*4, intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof0DR4 +- +- +-subroutine MPI_Sizeof0DR8(x, size, ierror) +- real*8, intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof0DR8 +- +- +-subroutine MPI_Sizeof0DC8(x, size, ierror) +- complex*8, intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof0DC8 +- +- +-subroutine MPI_Sizeof0DC16(x, size, ierror) +- complex*16, intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof0DC16 +- +- +-subroutine MPI_Sizeof1DCH(x, size, ierror) +- character, dimension(*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof1DCH +- +- +-subroutine MPI_Sizeof1DL(x, size, ierror) +- logical, dimension(*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof1DL +- +- +-subroutine MPI_Sizeof1DI1(x, size, ierror) +- integer*1, dimension(*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof1DI1 +- +- +-subroutine MPI_Sizeof1DI2(x, size, ierror) +- integer*2, dimension(*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof1DI2 +- +- +-subroutine MPI_Sizeof1DI4(x, size, ierror) +- integer*4, dimension(*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof1DI4 +- +- +-subroutine MPI_Sizeof1DI8(x, size, ierror) +- integer*8, dimension(*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof1DI8 +- +- +-subroutine MPI_Sizeof1DR4(x, size, ierror) +- real*4, dimension(*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof1DR4 +- +- +-subroutine MPI_Sizeof1DR8(x, size, ierror) +- real*8, dimension(*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof1DR8 +- +- +-subroutine MPI_Sizeof1DC8(x, size, ierror) +- complex*8, dimension(*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof1DC8 +- +- +-subroutine MPI_Sizeof1DC16(x, size, ierror) +- complex*16, dimension(*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof1DC16 +- +- +-subroutine MPI_Sizeof2DCH(x, size, ierror) +- character, dimension(1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof2DCH +- +- +-subroutine MPI_Sizeof2DL(x, size, ierror) +- logical, dimension(1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof2DL +- +- +-subroutine MPI_Sizeof2DI1(x, size, ierror) +- integer*1, dimension(1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof2DI1 +- +- +-subroutine MPI_Sizeof2DI2(x, size, ierror) +- integer*2, dimension(1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof2DI2 +- +- +-subroutine MPI_Sizeof2DI4(x, size, ierror) +- integer*4, dimension(1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof2DI4 +- +- +-subroutine MPI_Sizeof2DI8(x, size, ierror) +- integer*8, dimension(1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof2DI8 +- +- +-subroutine MPI_Sizeof2DR4(x, size, ierror) +- real*4, dimension(1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof2DR4 +- +- +-subroutine MPI_Sizeof2DR8(x, size, ierror) +- real*8, dimension(1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof2DR8 +- +- +-subroutine MPI_Sizeof2DC8(x, size, ierror) +- complex*8, dimension(1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof2DC8 +- +- +-subroutine MPI_Sizeof2DC16(x, size, ierror) +- complex*16, dimension(1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof2DC16 +- +- +-subroutine MPI_Sizeof3DCH(x, size, ierror) +- character, dimension(1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof3DCH +- +- +-subroutine MPI_Sizeof3DL(x, size, ierror) +- logical, dimension(1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof3DL +- +- +-subroutine MPI_Sizeof3DI1(x, size, ierror) +- integer*1, dimension(1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof3DI1 +- +- +-subroutine MPI_Sizeof3DI2(x, size, ierror) +- integer*2, dimension(1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof3DI2 +- +- +-subroutine MPI_Sizeof3DI4(x, size, ierror) +- integer*4, dimension(1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof3DI4 +- +- +-subroutine MPI_Sizeof3DI8(x, size, ierror) +- integer*8, dimension(1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof3DI8 +- +- +-subroutine MPI_Sizeof3DR4(x, size, ierror) +- real*4, dimension(1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof3DR4 +- +- +-subroutine MPI_Sizeof3DR8(x, size, ierror) +- real*8, dimension(1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof3DR8 +- +- +-subroutine MPI_Sizeof3DC8(x, size, ierror) +- complex*8, dimension(1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof3DC8 +- +- +-subroutine MPI_Sizeof3DC16(x, size, ierror) +- complex*16, dimension(1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof3DC16 +- +- +-subroutine MPI_Sizeof4DCH(x, size, ierror) +- character, dimension(1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof4DCH +- +- +-subroutine MPI_Sizeof4DL(x, size, ierror) +- logical, dimension(1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof4DL +- +- +-subroutine MPI_Sizeof4DI1(x, size, ierror) +- integer*1, dimension(1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof4DI1 +- +- +-subroutine MPI_Sizeof4DI2(x, size, ierror) +- integer*2, dimension(1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof4DI2 +- +- +-subroutine MPI_Sizeof4DI4(x, size, ierror) +- integer*4, dimension(1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof4DI4 +- +- +-subroutine MPI_Sizeof4DI8(x, size, ierror) +- integer*8, dimension(1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof4DI8 +- +- +-subroutine MPI_Sizeof4DR4(x, size, ierror) +- real*4, dimension(1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof4DR4 +- +- +-subroutine MPI_Sizeof4DR8(x, size, ierror) +- real*8, dimension(1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof4DR8 +- +- +-subroutine MPI_Sizeof4DC8(x, size, ierror) +- complex*8, dimension(1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof4DC8 +- +- +-subroutine MPI_Sizeof4DC16(x, size, ierror) +- complex*16, dimension(1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof4DC16 +- +- +-subroutine MPI_Sizeof5DCH(x, size, ierror) +- character, dimension(1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof5DCH +- +- +-subroutine MPI_Sizeof5DL(x, size, ierror) +- logical, dimension(1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof5DL +- +- +-subroutine MPI_Sizeof5DI1(x, size, ierror) +- integer*1, dimension(1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof5DI1 +- +- +-subroutine MPI_Sizeof5DI2(x, size, ierror) +- integer*2, dimension(1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof5DI2 +- +- +-subroutine MPI_Sizeof5DI4(x, size, ierror) +- integer*4, dimension(1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof5DI4 +- +- +-subroutine MPI_Sizeof5DI8(x, size, ierror) +- integer*8, dimension(1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof5DI8 +- +- +-subroutine MPI_Sizeof5DR4(x, size, ierror) +- real*4, dimension(1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof5DR4 +- +- +-subroutine MPI_Sizeof5DR8(x, size, ierror) +- real*8, dimension(1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof5DR8 +- +- +-subroutine MPI_Sizeof5DC8(x, size, ierror) +- complex*8, dimension(1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof5DC8 +- +- +-subroutine MPI_Sizeof5DC16(x, size, ierror) +- complex*16, dimension(1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof5DC16 +- +- +-subroutine MPI_Sizeof6DCH(x, size, ierror) +- character, dimension(1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof6DCH +- +- +-subroutine MPI_Sizeof6DL(x, size, ierror) +- logical, dimension(1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof6DL +- +- +-subroutine MPI_Sizeof6DI1(x, size, ierror) +- integer*1, dimension(1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof6DI1 +- +- +-subroutine MPI_Sizeof6DI2(x, size, ierror) +- integer*2, dimension(1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof6DI2 +- +- +-subroutine MPI_Sizeof6DI4(x, size, ierror) +- integer*4, dimension(1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof6DI4 +- +- +-subroutine MPI_Sizeof6DI8(x, size, ierror) +- integer*8, dimension(1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof6DI8 +- +- +-subroutine MPI_Sizeof6DR4(x, size, ierror) +- real*4, dimension(1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof6DR4 +- +- +-subroutine MPI_Sizeof6DR8(x, size, ierror) +- real*8, dimension(1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof6DR8 +- +- +-subroutine MPI_Sizeof6DC8(x, size, ierror) +- complex*8, dimension(1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof6DC8 +- +- +-subroutine MPI_Sizeof6DC16(x, size, ierror) +- complex*16, dimension(1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof6DC16 +- +- +-subroutine MPI_Sizeof7DCH(x, size, ierror) +- character, dimension(1,1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof7DCH +- +- +-subroutine MPI_Sizeof7DL(x, size, ierror) +- logical, dimension(1,1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof7DL +- +- +-subroutine MPI_Sizeof7DI1(x, size, ierror) +- integer*1, dimension(1,1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof7DI1 +- +- +-subroutine MPI_Sizeof7DI2(x, size, ierror) +- integer*2, dimension(1,1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof7DI2 +- +- +-subroutine MPI_Sizeof7DI4(x, size, ierror) +- integer*4, dimension(1,1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof7DI4 +- +- +-subroutine MPI_Sizeof7DI8(x, size, ierror) +- integer*8, dimension(1,1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof7DI8 +- +- +-subroutine MPI_Sizeof7DR4(x, size, ierror) +- real*4, dimension(1,1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof7DR4 +- +- +-subroutine MPI_Sizeof7DR8(x, size, ierror) +- real*8, dimension(1,1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof7DR8 +- +- +-subroutine MPI_Sizeof7DC8(x, size, ierror) +- complex*8, dimension(1,1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof7DC8 +- +- +-subroutine MPI_Sizeof7DC16(x, size, ierror) +- complex*16, dimension(1,1,1,1,1,1,*), intent(in) :: x +- integer, intent(out) :: size +- integer, intent(out) :: ierror +-end subroutine MPI_Sizeof7DC16 +- +-end interface +- +- + interface MPI_Start + + subroutine MPI_Start(request, ierror) +--- a/ompi/mpi/fortran/use-mpi-tkr/mpi.F90 ++++ b/ompi/mpi/fortran/use-mpi-tkr/mpi.F90 +@@ -50,4 +50,8 @@ module mpi + + include "mpi-f90-interfaces.h" + ++#if OMPI_FORTRAN_BUILD_SIZEOF ++ include "mpi-tkr-sizeof.h" ++#endif ++ + end module mpi diff --git a/var/spack/repos/builtin/packages/openmpi/use_mpi_tkr_sizeof/step_2.patch b/var/spack/repos/builtin/packages/openmpi/use_mpi_tkr_sizeof/step_2.patch new file mode 100644 index 00000000000..6ca5051a596 --- /dev/null +++ b/var/spack/repos/builtin/packages/openmpi/use_mpi_tkr_sizeof/step_2.patch @@ -0,0 +1,22 @@ +--- a/ompi/mpi/fortran/configure-fortran-output.h.in ++++ b/ompi/mpi/fortran/configure-fortran-output.h.in +@@ -47,6 +47,8 @@ + ! Line 2 of the ignore TKR syntax + #define OMPI_FORTRAN_IGNORE_TKR_TYPE @OMPI_FORTRAN_IGNORE_TKR_TYPE@ + ++ ++#define OMPI_FORTRAN_BUILD_SIZEOF @OMPI_FORTRAN_BUILD_SIZEOF@ + ! Integers + + #define OMPI_HAVE_FORTRAN_INTEGER1 @OMPI_HAVE_FORTRAN_INTEGER1@ +--- a/ompi/mpi/fortran/use-mpi-tkr/Makefile.in ++++ b/ompi/mpi/fortran/use-mpi-tkr/Makefile.in +@@ -2023,6 +2023,8 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local + @OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS_TRUE@mpi.lo: $(top_builddir)/ompi/mpi/fortran/configure-fortran-output.h + @OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS_TRUE@mpi.lo: mpi-f90-cptr-interfaces.F90 + ++@BUILD_FORTRAN_SIZEOF_TRUE@@OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS_TRUE@mpi.lo: mpi-tkr-sizeof.h ++ + @OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS_TRUE@mpi-tkr-sizeof.h: $(top_builddir)/config.status + @OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS_TRUE@mpi-tkr-sizeof.h: $(sizeof_pl) + @OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS_TRUE@mpi-tkr-sizeof.h: From ad18933ef400ecbb879feebb32368ab7cc898493 Mon Sep 17 00:00:00 2001 From: Michio Ogawa Date: Thu, 18 Jun 2020 00:45:51 +0900 Subject: [PATCH 750/802] FrontISTR: various updates to the package (#17089) * Added maintainers * Refined dependencies * Changed git url --- .../builtin/packages/frontistr/package.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/frontistr/package.py b/var/spack/repos/builtin/packages/frontistr/package.py index 0a0cf7d6283..ebdfa0a3e31 100644 --- a/var/spack/repos/builtin/packages/frontistr/package.py +++ b/var/spack/repos/builtin/packages/frontistr/package.py @@ -11,18 +11,25 @@ class Frontistr(CMakePackage): """Open-Source Large-Scale Parallel FEM Program for Nonlinear Structural Analysis""" - homepage = "https://github.com/FrontISTR/FrontISTR" - git = "https://github.com/FrontISTR/FrontISTR.git" + homepage = "https://www.frontistr.com/" + git = "https://gitlab.com/FrontISTR-Commons/FrontISTR.git" + maintainers = ['hiroshi.okuda', 'kgoto', 'morita', 'inagaki', 'michioga'] version('5.0', tag='v5.0') + version('master', tag='master') + + variant('build_type', default='RELEASE', + description='CMake build type', + values=('DEBUG', 'RELEASE')) depends_on('mpi') - depends_on('revocap-refiner') - depends_on('revocap-coupler') depends_on('blas') - depends_on('metis') + depends_on('lapack') depends_on('scalapack') - depends_on('mumps +mpi') + depends_on('revocap-refiner') + # depends_on('revocap-coupler') + depends_on('metis') + depends_on('mumps') depends_on('trilinos') def cmake_args(self): From 03880f54139ff97e144833378842034c0f2d2a3b Mon Sep 17 00:00:00 2001 From: vvolkl Date: Wed, 17 Jun 2020 19:13:27 +0200 Subject: [PATCH 751/802] Split hepmc Into hepmc and hepmc3 (#16892) --- .../repos/builtin/packages/acts/package.py | 2 +- .../repos/builtin/packages/hepmc/package.py | 46 +-------------- .../repos/builtin/packages/hepmc3/package.py | 57 +++++++++++++++++++ 3 files changed, 59 insertions(+), 46 deletions(-) create mode 100644 var/spack/repos/builtin/packages/hepmc3/package.py diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index 09113f2cd82..849c326b18a 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -96,7 +96,7 @@ class Acts(CMakePackage): depends_on('dd4hep @1.10: +geant4 +xercesc', when='+dd4hep +geant4') depends_on('eigen @3.2.9:', type='build') depends_on('geant4', when='+geant4') - depends_on('hepmc@3.1:', when='+hepmc3') + depends_on('hepmc3@3.1:', when='+hepmc3') depends_on('heppdt', when='+hepmc3') depends_on('intel-tbb', when='+examples') depends_on('nlohmann-json @3.2.0:', when='@0.14: +json') diff --git a/var/spack/repos/builtin/packages/hepmc/package.py b/var/spack/repos/builtin/packages/hepmc/package.py index d208e7ecde3..6581615a2be 100644 --- a/var/spack/repos/builtin/packages/hepmc/package.py +++ b/var/spack/repos/builtin/packages/hepmc/package.py @@ -14,11 +14,6 @@ class Hepmc(CMakePackage): homepage = "http://hepmc.web.cern.ch/hepmc/" url = "http://hepmc.web.cern.ch/hepmc/releases/hepmc2.06.09.tgz" - version('3.2.0', sha256='f132387763d170f25a7cc9f0bd586b83373c09acf0c3daa5504063ba460f89fc') - version('3.1.2', sha256='4133074b3928252877982f3d4b4c6c750bb7a324eb6c7bb2afc6fa256da3ecc7') - version('3.1.1', sha256='2fcbc9964d6f9f7776289d65f9c73033f85c15bf5f0df00c429a6a1d8b8248bb') - version('3.1.0', sha256='cd37eed619d58369041018b8627274ad790020a4714b54ac05ad1ebc1a6e7f8a') - version('3.0.0', sha256='7ac3c939a857a5ad67bea1e77e3eb16e80d38cfdf825252ac57160634c26d9ec') version('2.06.10', sha256='5adedd9e3f7447e1e5fc01b72f745ab87da2c1611df89208bb3d7c6ea94c11a4') version('2.06.09', sha256='e0f8fddd38472c5615210894444686ac5d72df3be682f7d151b562b236d9b422') version('2.06.08', sha256='8be6c1793e0a045f07ddb88bb64b46de7e66a52e75fb72b3f82f9a3e3ba8a8ce') @@ -26,52 +21,13 @@ class Hepmc(CMakePackage): version('2.06.06', sha256='8cdff26c10783ed4248220a84a43b7e1f9b59cc2c9a29bd634d024ca469db125') version('2.06.05', sha256='4c411077cc97522c03b74f973264b8d9fd2b6ccec0efc7ceced2645371c73618') - variant('python', default=False, description='Enable Python bindings') - variant('rootio', default=False, description='Enable ROOT I/O') - variant('interfaces', default=False, description='Install interfaces for some Monte-Carlo Event Gens') - depends_on('cmake@2.8.9:', type='build') - depends_on('python', when='+python') - depends_on('root', when='+rootio') - conflicts('+python', when='@:3.1') - conflicts('+rootio', when='@:2') - conflicts('+interfaces', when='@:2') - - @when('@:2') def cmake_args(self): return ['-Dmomentum:STRING=GEV', '-Dlength:STRING=MM'] - @when('@3:') - def cmake_args(self): - spec = self.spec - args = [ - '-Dmomentum:STRING=GEV', - '-Dlength:STRING=MM', - '-DHEPMC3_ENABLE_PYTHON={0}'.format(spec.satisfies('+python')), - '-DHEPMC3_ENABLE_ROOTIO={0}'.format(spec.satisfies('+rootio')), - '-DHEPMC3_INSTALL_INTERFACES={0}'.format( - spec.satisfies('+interfaces')), - ] - - if self.spec.satisfies('+python'): - py_ver = spec['python'].version.up_to(2) - py_sitepkg = join_path(self.prefix, site_packages_dir) - args.extend([ - '-DHEPMC3_PYTHON_VERSIONS={0}'.format(py_ver), - '-DHEPMC3_Python_SITEARCH{0}={1}'.format( - py_ver.joined, py_sitepkg) - ]) - - if self.spec.satisfies('+rootio'): - args.append('-DROOT_DIR={0}'.format(self.spec['root'].prefix)) - - return args - def url_for_version(self, version): - if version > Version("3.0.0"): - url = "http://hepmc.web.cern.ch/hepmc/releases/HepMC3-{0}.tar.gz" - elif version <= Version("2.06.08"): + if version <= Version("2.06.08"): url = "http://lcgapp.cern.ch/project/simu/HepMC/download/HepMC-{0}.tar.gz" else: url = "http://hepmc.web.cern.ch/hepmc/releases/hepmc{0}.tgz" diff --git a/var/spack/repos/builtin/packages/hepmc3/package.py b/var/spack/repos/builtin/packages/hepmc3/package.py new file mode 100644 index 00000000000..95cc4014570 --- /dev/null +++ b/var/spack/repos/builtin/packages/hepmc3/package.py @@ -0,0 +1,57 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Hepmc3(CMakePackage): + """The HepMC package is an object oriented, C++ event record for + High Energy Physics Monte Carlo generators and simulation.""" + + homepage = "https://cern.ch/hepmc" + url = "https://gitlab.cern.ch/hepmc/HepMC3/-/archive/3.2.1/HepMC3-3.2.1.tar.gz" + git = "https://gitlab.cern.ch/hepmc/HepMC3.git" + + maintainers = ['vvolkl'] + + version('3.2.1', sha256='6e4e4bb5708af105d4bf74efc2745e6efe704e942d46a8042f7dcae37a4739fe') + version('3.2.0', sha256='f132387763d170f25a7cc9f0bd586b83373c09acf0c3daa5504063ba460f89fc') + version('3.1.2', sha256='4133074b3928252877982f3d4b4c6c750bb7a324eb6c7bb2afc6fa256da3ecc7') + version('3.1.1', sha256='2fcbc9964d6f9f7776289d65f9c73033f85c15bf5f0df00c429a6a1d8b8248bb') + version('3.1.0', sha256='cd37eed619d58369041018b8627274ad790020a4714b54ac05ad1ebc1a6e7f8a') + # note that version 3.0.0 is not supported + # conflicts with cmake configuration + + variant('python', default=False, description='Enable Python bindings') + variant('rootio', default=False, description='Enable ROOT I/O') + variant('interfaces', default=False, description='Install interfaces for some Monte-Carlo Event Gens') + + depends_on('cmake@2.8.9:', type='build') + depends_on('root', when='+rootio') + depends_on('python', when="+python") + + def cmake_args(self): + spec = self.spec + args = [ + '-Dmomentum:STRING=GEV', + '-Dlength:STRING=MM', + '-DHEPMC3_ENABLE_PYTHON={0}'.format(spec.satisfies('+python')), + '-DHEPMC3_ENABLE_ROOTIO={0}'.format(spec.satisfies('+rootio')), + '-DHEPMC3_INSTALL_INTERFACES={0}'.format( + spec.satisfies('+interfaces')), + ] + + if self.spec.satisfies('+python'): + py_ver = spec['python'].version.up_to(2) + py_sitepkg = join_path(self.prefix, site_packages_dir) + args.extend([ + '-DHEPMC3_PYTHON_VERSIONS={0}'.format(py_ver), + '-DHEPMC3_Python_SITEARCH{0}={1}'.format( + py_ver.joined, py_sitepkg) + ]) + + if self.spec.satisfies('+rootio'): + args.append('-DROOT_DIR={0}'.format(self.spec['root'].prefix)) + return args From 506f31b7a7fa1ebabdb4ce5d1764b0a197e62989 Mon Sep 17 00:00:00 2001 From: Chris White Date: Wed, 17 Jun 2020 10:43:47 -0700 Subject: [PATCH 752/802] axom conduit mfem build fixes (#17121) * honor global compiler flags * Honor debug variant when using global compiler flags * Add cppflags to c/cxx flags, clarify flag handling --- .../repos/builtin/packages/axom/package.py | 58 +++++++++++++------ .../repos/builtin/packages/conduit/package.py | 36 +++++++++++- .../repos/builtin/packages/mfem/package.py | 15 +++++ 3 files changed, 91 insertions(+), 18 deletions(-) diff --git a/var/spack/repos/builtin/packages/axom/package.py b/var/spack/repos/builtin/packages/axom/package.py index 46b411b4e7a..2eb3ae226c9 100644 --- a/var/spack/repos/builtin/packages/axom/package.py +++ b/var/spack/repos/builtin/packages/axom/package.py @@ -65,10 +65,10 @@ class Axom(CMakePackage, CudaPackage): # ----------------------------------------------------------------------- # Variants # ----------------------------------------------------------------------- - variant('debug', default=False, + variant('debug', default=False, description='Build debug instead of optimized version') - variant('fortran', default=True, description="Build with Fortran support") + variant('fortran', default=True, description="Build with Fortran support") variant("python", default=False, description="Build python support") @@ -77,16 +77,16 @@ class Axom(CMakePackage, CudaPackage): variant("mfem", default=False, description="Build with mfem") variant("hdf5", default=True, description="Build with hdf5") - variant("lua", default=False, description="Build with Lua") + variant("lua", default=True, description="Build with Lua") variant("scr", default=False, description="Build with SCR") variant("umpire", default=True, description="Build with umpire") variant("raja", default=True, description="Build with raja") - variant("cub", default=True, + variant("cub", default=True, description="Build with RAJA's internal CUB support") varmsg = "Build development tools (such as Sphinx, Uncrustify, etc...)" - variant("devtools", default=False, description=varmsg) + variant("devtools", default=False, description=varmsg) # ----------------------------------------------------------------------- # Dependencies @@ -124,7 +124,7 @@ class Axom(CMakePackage, CudaPackage): depends_on('umpire cuda_arch={0}'.format(sm_), when='+umpire cuda_arch={0}'.format(sm_)) - depends_on("mfem~mpi~hypre~metis~gzstream", when="+mfem") + depends_on("mfem~mpi~hypre~metis~zlib", when="+mfem") depends_on("python", when="+python") @@ -137,6 +137,12 @@ class Axom(CMakePackage, CudaPackage): depends_on("py-shroud", when="+devtools") depends_on("uncrustify@0.61", when="+devtools") + def flag_handler(self, name, flags): + if name in ('cflags', 'cxxflags', 'fflags'): + # the package manages these flags in another way + return (None, None, None) + return (flags, None, None) + def _get_sys_type(self, spec): sys_type = spec.architecture # if on llnl systems, we can use the SYS_TYPE @@ -210,6 +216,33 @@ def hostconfig(self, spec, prefix): else: cfg.write(cmake_cache_option("ENABLE_FORTRAN", False)) + # use global spack compiler flags + cppflags = ' '.join(spec.compiler_flags['cppflags']) + if cppflags: + # avoid always ending up with ' ' with no flags defined + cppflags += ' ' + cflags = cppflags + ' '.join(spec.compiler_flags['cflags']) + if cflags: + cfg.write(cmake_cache_entry("CMAKE_C_FLAGS", cflags)) + cxxflags = cppflags + ' '.join(spec.compiler_flags['cxxflags']) + if cxxflags: + cfg.write(cmake_cache_entry("CMAKE_CXX_FLAGS", cxxflags)) + fflags = ' '.join(spec.compiler_flags['fflags']) + if fflags: + cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags)) + + if ("gfortran" in f_compiler) and ("clang" in cpp_compiler): + libdir = pjoin(os.path.dirname( + os.path.dirname(cpp_compiler)), "lib") + flags = "" + for _libpath in [libdir, libdir + "64"]: + if os.path.exists(_libpath): + flags += " -Wl,-rpath,{0}".format(_libpath) + description = ("Adds a missing libstdc++ rpath") + if flags: + cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags, + description)) + # TPL locations cfg.write("#------------------{0}\n".format("-" * 60)) cfg.write("# TPLs\n") @@ -433,9 +466,9 @@ def hostconfig(self, spec, prefix): os.path.dirname(f_compiler)), "lib") description = ("Adds a missing rpath for libraries " "associated with the fortran compiler") + linker_flags = "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath," + libdir cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", - "-Wl,-rpath," + libdir, - description)) + linker_flags, description)) if "+cuda" in spec: cfg.write("#------------------{0}\n".format("-" * 60)) @@ -485,15 +518,6 @@ def hostconfig(self, spec, prefix): cfg.write("# nvcc does not like gtest's 'pthreads' flag\n") cfg.write(cmake_cache_option("gtest_disable_pthreads", True)) - if ("gfortran" in f_compiler) and ("clang" in cpp_compiler): - clanglibdir = pjoin(os.path.dirname( - os.path.dirname(cpp_compiler)), "lib") - flags = "-Wl,-rpath,{0}".format(clanglibdir) - description = ("Adds a missing rpath for libraries " - "associated with the fortran compiler") - cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags, - description)) - cfg.write("\n") cfg.close() tty.info("Spack generated Axom host-config file: " + host_config_path) diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py index 2e6ec094091..9928884e924 100644 --- a/var/spack/repos/builtin/packages/conduit/package.py +++ b/var/spack/repos/builtin/packages/conduit/package.py @@ -147,6 +147,12 @@ class Conduit(Package): # build phases used by this package phases = ["configure", "build", "install"] + def flag_handler(self, name, flags): + if name in ('cflags', 'cxxflags', 'fflags'): + # the package manages these flags in another way + return (None, None, None) + return (flags, None, None) + def setup_build_environment(self, env): env.set('CTEST_OUTPUT_ON_FAILURE', '1') @@ -350,6 +356,33 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None): else: cfg.write(cmake_cache_entry("BUILD_SHARED_LIBS", "OFF")) + # use global spack compiler flags + cppflags = ' '.join(spec.compiler_flags['cppflags']) + if cppflags: + # avoid always ending up with ' ' with no flags defined + cppflags += ' ' + cflags = cppflags + ' '.join(spec.compiler_flags['cflags']) + if cflags: + cfg.write(cmake_cache_entry("CMAKE_C_FLAGS", cflags)) + cxxflags = cppflags + ' '.join(spec.compiler_flags['cxxflags']) + if cxxflags: + cfg.write(cmake_cache_entry("CMAKE_CXX_FLAGS", cxxflags)) + fflags = ' '.join(spec.compiler_flags['fflags']) + if fflags: + cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags)) + + if ("gfortran" in f_compiler) and ("clang" in cpp_compiler): + libdir = os.path.join(os.path.dirname( + os.path.dirname(f_compiler)), "lib") + flags = "" + for _libpath in [libdir, libdir + "64"]: + if os.path.exists(_libpath): + flags += " -Wl,-rpath,{0}".format(_libpath) + description = ("Adds a missing libstdc++ rpath") + if flags: + cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags, + description)) + ####################### # Unit Tests ####################### @@ -380,7 +413,8 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None): # Grab lib directory for the current fortran compiler libdir = os.path.join(os.path.dirname( os.path.dirname(f_compiler)), "lib") - flags = "-lstdc++ -Wl,-rpath," + libdir + flags = "${BLT_EXE_LINKER_FLAGS} -lstdc++ " + flags += "-Wl,-rpath,{0} -Wl,-rpath,{0}64".format(libdir) cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags)) diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index 5f6d8b5c0a2..3a4abab49bf 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -366,6 +366,21 @@ def find_optional_library(name, prefix): cxxflags = spec.compiler_flags['cxxflags'] if cxxflags: + # Add opt/debug flags if they are not present in global cxx flags + opt_flag_found = any(f in self.compiler.opt_flags + for f in cxxflags) + debug_flag_found = any(f in self.compiler.debug_flags + for f in cxxflags) + + if '+debug' in spec: + if not debug_flag_found: + cxxflags.append('-g') + if not opt_flag_found: + cxxflags.append('-O0') + else: + if not opt_flag_found: + cxxflags.append('-O2') + cxxflags = [(xcompiler + flag) for flag in cxxflags] if '+cuda' in spec: cxxflags += [ From 01b277ad0fe15e6f42f9f403126da5de68994737 Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Wed, 17 Jun 2020 21:41:24 +0200 Subject: [PATCH 753/802] openmpi: options for local transport (#16831) --- .../repos/builtin/packages/fca/package.py | 31 ++++ .../repos/builtin/packages/hcoll/package.py | 31 ++++ .../repos/builtin/packages/knem/package.py | 46 ++++++ .../repos/builtin/packages/openmpi/package.py | 142 ++++++++++++++---- .../repos/builtin/packages/xpmem/package.py | 91 +++++++++++ 5 files changed, 310 insertions(+), 31 deletions(-) create mode 100644 var/spack/repos/builtin/packages/fca/package.py create mode 100644 var/spack/repos/builtin/packages/hcoll/package.py create mode 100644 var/spack/repos/builtin/packages/knem/package.py create mode 100644 var/spack/repos/builtin/packages/xpmem/package.py diff --git a/var/spack/repos/builtin/packages/fca/package.py b/var/spack/repos/builtin/packages/fca/package.py new file mode 100644 index 00000000000..ca91a43b4ec --- /dev/null +++ b/var/spack/repos/builtin/packages/fca/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Fca(Package): + """Legacy interface for Mellanox Fabric Collective Accelerator (FCA). FCA + is a MPI-integrated software package that utilizes CORE-Direct technology + for implementing the MPI collective communications.""" + + homepage = 'https://www.mellanox.com/products/fca' + has_code = False + + version('2.5.2431') + + # FCA needs to be added as an external package to SPACK. For this, the + # config file packages.yaml needs to be adjusted: + # + # fca: + # version: [2.5.2431] + # paths: + # fca@2.5.2431: /opt/mellanox/fca (path to your FCA installation) + # buildable: False + + def install(self, spec, prefix): + raise InstallError( + self.spec.format('{name} is not installable, you need to specify ' + 'it as an external package in packages.yaml')) diff --git a/var/spack/repos/builtin/packages/hcoll/package.py b/var/spack/repos/builtin/packages/hcoll/package.py new file mode 100644 index 00000000000..f39e2e75960 --- /dev/null +++ b/var/spack/repos/builtin/packages/hcoll/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Hcoll(Package): + """Modern interface for Mellanox Fabric Collective Accelerator (FCA). FCA + is a MPI-integrated software package that utilizes CORE-Direct technology + for implementing the MPI collective communications.""" + + homepage = 'https://www.mellanox.com/products/fca' + has_code = False + + version('3.9.1927') + + # HCOLL needs to be added as an external package to SPACK. For this, the + # config file packages.yaml needs to be adjusted: + # + # hcoll: + # version: [3.9.1927] + # paths: + # hcoll@3.9.1927: /opt/mellanox/hcoll (path to your HCOLL installation) + # buildable: False + + def install(self, spec, prefix): + raise InstallError( + self.spec.format('{name} is not installable, you need to specify ' + 'it as an external package in packages.yaml')) diff --git a/var/spack/repos/builtin/packages/knem/package.py b/var/spack/repos/builtin/packages/knem/package.py new file mode 100644 index 00000000000..473a1783193 --- /dev/null +++ b/var/spack/repos/builtin/packages/knem/package.py @@ -0,0 +1,46 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Knem(AutotoolsPackage): + """KNEM is a Linux kernel module enabling high-performance intra-node MPI + communication for large messages.""" + + homepage = "http://knem.gforge.inria.fr" + url = "http://gforge.inria.fr/frs/download.php/37186/knem-1.1.3.tar.gz" + list_url = "http://knem.gforge.inria.fr/download" + + maintainers = ['skosukhin'] + + version('1.1.3', sha256='50d3c4a20c140108b8ce47aaafd0ade0927d6f507e1b5cc690dd6bddeef30f60') + + variant('hwloc', default=True, + description='Enable hwloc in the user-space tools') + + depends_on('hwloc', when='+hwloc') + depends_on('pkgconfig', type='build', when='+hwloc') + + # The support for hwloc was added in 0.9.1: + conflicts('+hwloc', when='@:0.9.0') + + # Ideally, we should list all non-Linux-based platforms here: + conflicts('platform=darwin') + + # All compilers except for gcc are in conflict: + for __compiler in spack.compilers.supported_compilers(): + if __compiler != 'gcc': + conflicts('%{0}'.format(__compiler), + msg='Linux kernel module must be compiled with gcc') + + @run_before('build') + def override_kernel_compiler(self): + # Override the compiler for kernel module source files. We need + # this additional argument for all installation phases. + make.add_default_arg('CC={0}'.format(spack_cc)) + + def configure_args(self): + return self.enable_or_disable('hwloc') diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index ee2f76ea19e..4065e85a591 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -182,19 +182,25 @@ class Openmpi(AutotoolsPackage): variant( 'fabrics', values=disjoint_sets( - ('auto',), ('psm', 'psm2', 'verbs', 'mxm', 'ucx', 'libfabric') + ('auto',), + ('psm', 'psm2', 'verbs', + 'mxm', 'ucx', 'ofi', + 'fca', 'hcoll', + 'xpmem', 'cma', 'knem') # shared memory transports ).with_non_feature_values('auto', 'none'), description="List of fabrics that are enabled; " - "'auto' lets openmpi determine", + "'auto' lets openmpi determine", ) variant( 'schedulers', values=disjoint_sets( - ('auto',), ('alps', 'lsf', 'tm', 'slurm', 'sge', 'loadleveler') + ('auto',), + ('alps', 'lsf', 'tm', + 'slurm', 'sge', 'loadleveler') ).with_non_feature_values('auto', 'none'), description="List of schedulers for which support is enabled; " - "'auto' lets openmpi determine", + "'auto' lets openmpi determine", ) # Additional support options @@ -259,39 +265,59 @@ class Openmpi(AutotoolsPackage): depends_on('zlib', when='@3.0.0:') depends_on('valgrind~mpi', when='+memchecker') + depends_on('opa-psm2', when='fabrics=psm2') + depends_on('rdma-core', when='fabrics=verbs') + depends_on('mxm', when='fabrics=mxm') + depends_on('binutils+libiberty', when='fabrics=mxm') depends_on('ucx', when='fabrics=ucx') depends_on('ucx +thread_multiple', when='fabrics=ucx +thread_multiple') depends_on('ucx +thread_multiple', when='@3.0.0: fabrics=ucx') - depends_on('libfabric', when='fabrics=libfabric') - depends_on('opa-psm2', when='fabrics=psm2') - depends_on('mxm', when='fabrics=mxm') - depends_on('binutils+libiberty', when='fabrics=mxm') - depends_on('rdma-core', when='fabrics=verbs') + depends_on('libfabric', when='fabrics=ofi') + depends_on('fca', when='fabrics=fca') + depends_on('hcoll', when='fabrics=hcoll') + depends_on('xpmem', when='fabrics=xpmem') + depends_on('knem', when='fabrics=knem') - depends_on('slurm', when='schedulers=slurm') depends_on('lsf', when='schedulers=lsf') depends_on('openpbs', when='schedulers=tm') + depends_on('slurm', when='schedulers=slurm') + + # CUDA support was added in 1.7 + conflicts('+cuda', when='@:1.6') + # PMI support was added in 1.5.5 + conflicts('+pmi', when='@:1.5.4') + # RPATH support in the wrappers was added in 1.7.4 + conflicts('+wrapper-rpath', when='@:1.7.3') - conflicts('+cuda', when='@:1.6') # CUDA support was added in 1.7 - conflicts('fabrics=psm2', when='@:1.8') # PSM2 support was added in 1.10.0 - conflicts('fabrics=mxm', when='@:1.5.3') # MXM support was added in 1.5.4 - conflicts('+pmi', when='@:1.5.4') # PMI support was added in 1.5.5 - conflicts('schedulers=slurm ~pmi', when='@1.5.4:', - msg='+pmi is required for openmpi(>=1.5.5) to work with SLURM.') - conflicts('schedulers=loadleveler', when='@3.0.0:', - msg='The loadleveler scheduler is not supported with ' - 'openmpi(>=3.0.0).') conflicts('+cxx', when='@5:', msg='C++ MPI bindings are removed in 5.0.X release') conflicts('+cxx_exceptions', when='@5:', msg='C++ exceptions are removed in 5.0.X release') - filter_compiler_wrappers('openmpi/*-wrapper-data*', relative_root='share') - conflicts('fabrics=libfabric', when='@:1.8') # libfabric support was added in 1.10.0 - # It may be worth considering making libfabric an exclusive fabrics choice + # PSM2 support was added in 1.10.0 + conflicts('fabrics=psm2', when='@:1.8') + # MXM support was added in 1.5.4 + conflicts('fabrics=mxm', when='@:1.5.3') + # libfabric (OFI) support was added in 1.10.0 + conflicts('fabrics=ofi', when='@:1.8') + # fca support was added in 1.5.0 and removed in 5.0.0 + conflicts('fabrics=fca', when='@:1.4,5:') + # hcoll support was added in 1.7.3: + conflicts('fabrics=hcoll', when='@:1.7.2') + # xpmem support was added in 1.7 + conflicts('fabrics=xpmem', when='@:1.6') + # cma support was added in 1.7 + conflicts('fabrics=cma', when='@:1.6') + # knem support was added in 1.5 + conflicts('fabrics=knem', when='@:1.4') - # RPATH support in the wrappers was added in 1.7.4 - conflicts('+wrapper-rpath', when='@:1.7.3') + conflicts('schedulers=slurm ~pmi', when='@1.5.4:', + msg='+pmi is required for openmpi(>=1.5.5) to work with SLURM.') + conflicts('schedulers=loadleveler', when='@3.0.0:', + msg='The loadleveler scheduler is not supported with ' + 'openmpi(>=3.0.0).') + + filter_compiler_wrappers('openmpi/*-wrapper-data*', relative_root='share') def url_for_version(self, version): url = "http://www.open-mpi.org/software/ompi/v{0}/downloads/openmpi-{1}.tar.bz2" @@ -343,6 +369,17 @@ def setup_dependent_package(self, module, dependent_spec): join_path(self.prefix.lib, 'libmpi.{0}'.format(dso_suffix)) ] + # Most of the following with_or_without methods might seem redundant + # because Spack compiler wrapper adds the required -I and -L flags, which + # is enough for the configure script to find them. However, we also need + # the flags in Libtool (lib/*.la) and pkg-config (lib/pkgconfig/*.pc). + # Therefore, we pass the prefixes explicitly. + + def with_or_without_psm2(self, activated): + if not activated: + return '--without-psm2' + return '--with-psm2={0}'.format(self.spec['opa-psm2'].prefix) + def with_or_without_verbs(self, activated): # Up through version 1.6, this option was named --with-openib. # In version 1.7, it was renamed to be --with-verbs. @@ -351,16 +388,54 @@ def with_or_without_verbs(self, activated): return '--without-{0}'.format(opt) return '--with-{0}={1}'.format(opt, self.spec['rdma-core'].prefix) + def with_or_without_mxm(self, activated): + if not activated: + return '--without-mxm' + return '--with-mxm={0}'.format(self.spec['mxm'].prefix) + + def with_or_without_ucx(self, activated): + if not activated: + return '--without-ucx' + return '--with-ucx={0}'.format(self.spec['ucx'].prefix) + + def with_or_without_ofi(self, activated): + # Up through version 3.0.3 this option was name --with-libfabric. + # In version 3.0.4, the old name was deprecated in favor of --with-ofi. + opt = 'ofi' if self.spec.satisfies('@3.0.4:') else 'libfabric' + if not activated: + return '--without-{0}'.format(opt) + return '--with-{0}={1}'.format(opt, self.spec['libfabric'].prefix) + + def with_or_without_fca(self, activated): + if not activated: + return '--without-fca' + return '--with-fca={0}'.format(self.spec['fca'].prefix) + + def with_or_without_hcoll(self, activated): + if not activated: + return '--without-hcoll' + return '--with-hcoll={0}'.format(self.spec['hcoll'].prefix) + + def with_or_without_xpmem(self, activated): + if not activated: + return '--without-xpmem' + return '--with-xpmem={0}'.format(self.spec['xpmem'].prefix) + + def with_or_without_knem(self, activated): + if not activated: + return '--without-knem' + return '--with-knem={0}'.format(self.spec['knem'].prefix) + + def with_or_without_lsf(self, activated): + if not activated: + return '--without-lsf' + return '--with-lsf={0}'.format(self.spec['lsf'].prefix) + def with_or_without_tm(self, activated): if not activated: return '--without-tm' return '--with-tm={0}'.format(self.spec['openpbs'].prefix) - def with_or_without_psm2(self, activated): - if not activated: - return '--without-psm2' - return '--with-psm2={0}'.format(self.spec['opa-psm2'].prefix) - @run_before('autoreconf') def die_without_fortran(self): # Until we can pass variants such as +fortran through virtual @@ -433,8 +508,13 @@ def configure_args(self): # Fabrics if 'fabrics=auto' not in spec: - config_args.extend(self.with_or_without('fabrics', - activation_value='prefix')) + config_args.extend(self.with_or_without('fabrics')) + + if spec.satisfies('@2.0.0'): + if 'fabrics=xpmem' in spec and 'platform=cray' in spec: + config_args.append('--with-cray-xpmem') + else: + config_args.append('--without-cray-xpmem') # Schedulers if 'schedulers=auto' not in spec: diff --git a/var/spack/repos/builtin/packages/xpmem/package.py b/var/spack/repos/builtin/packages/xpmem/package.py new file mode 100644 index 00000000000..90fa58df063 --- /dev/null +++ b/var/spack/repos/builtin/packages/xpmem/package.py @@ -0,0 +1,91 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Xpmem(AutotoolsPackage): + """XPMEM is a Linux kernel module that enables a process to map the memory + of another process into its virtual address space.""" + + # The README file of the repository says that the development was + # transferred to a new repository on GitLab: http://gitlab.com/hjelmn/xpmem + # However, it looks like that the repository on GitHub has a more recent + # version of the codebase. + homepage = "https://github.com/hjelmn/xpmem" + url = "https://github.com/hjelmn/xpmem/archive/v2.6.3.tar.gz" + git = "https://github.com/hjelmn/xpmem.git" + + maintainers = ['skosukhin'] + + version('master', branch='master') + + # Versions starting 2.6.4 are neither tagged nor released in the repo + # (the choice of commits is based on the commit history of + # 'kernel/xpmem_private.h'): + version('2.6.5', commit='4efeed9cbaabe971f3766d67cb108e2c3316d4b8') + version('2.6.4', commit='522054850e4d1479d69f50f7190d1548bf9749fd') + + # Released versions: + version('2.6.3', sha256='ee239a32269f33234cdbdb94db29c12287862934c0784328d34aff82a9fa8b54') + version('2.6.2', sha256='2c1a93b4cb20ed73c2093435a7afec513e0e797aa1e49d4d964cc6bdae89d65b') + + variant('kernel-module', default=True, + description='Enable building the kernel module') + + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') + + # It will become possible to disable the kernel module only starting 2.6.6: + # https://github.com/hjelmn/xpmem/pull/24 + conflicts('~kernel-module', when='@:2.6.5') + + # Ideally, we should list all non-Linux-based platforms here: + conflicts('+kernel-module', when='platform=darwin') + + # All compilers except for gcc are in conflict with +kernel-module: + for __compiler in spack.compilers.supported_compilers(): + if __compiler != 'gcc': + conflicts('+kernel-module', + when='%{0}'.format(__compiler), + msg='Linux kernel module must be compiled with gcc') + + def autoreconf(self, spec, prefix): + Executable('./autogen.sh')() + + @run_before('build') + def override_kernel_compiler(self): + # Override the compiler for kernel module source files. We need + # this additional argument for all installation phases. + if '+kernel-module' in self.spec: + make.add_default_arg('CC={0}'.format(spack_cc)) + + def configure_args(self): + args = [] + + if '~kernel-module' in self.spec: + # The kernel module is enabled by default. An attempt of explicit + # enabling with '--enable-kernel-module' disables the module. + args.extend('--disable-kernel-module') + + if self.spec.satisfies('@:2.6.5'): + fmt = self.spec.format + # The following arguments will not be needed starting 2.6.6: + # https://github.com/hjelmn/xpmem/pull/18 + args.extend([ + fmt('--with-default-prefix={prefix}'), + fmt('--with-module={prefix.share}/Modules/{name}/{version}')]) + + return args + + @when('@:2.6.5') + def install(self, spec, prefix): + with working_dir(self.build_directory): + # Override the hardcoded prefix for 'cray-xpmem.conf' + make('ldsoconfdir={0}'.format( + self.spec.prefix.etc.join('ld.so.conf.d')), + *self.install_targets) From f7008f37d482deb2adc42c91a09b4987528e9c60 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 16 Jun 2020 15:30:56 +0200 Subject: [PATCH 754/802] slurm: Fix build with gcc@10: gcc@10: defaults to -fno-common, which breaks slurm up to version 20-02-1. For more details, see https://gcc.gnu.org/gcc-10/porting_to.html --- var/spack/repos/builtin/packages/slurm/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/slurm/package.py b/var/spack/repos/builtin/packages/slurm/package.py index c0d4cc01a91..ed69d08a774 100644 --- a/var/spack/repos/builtin/packages/slurm/package.py +++ b/var/spack/repos/builtin/packages/slurm/package.py @@ -63,6 +63,15 @@ class Slurm(AutotoolsPackage): depends_on('mariadb', when='+mariadb') depends_on('pmix', when='+pmix') + def flag_handler(self, name, flags): + wrapper_flags = None + + if name == 'cflags': + if self.spec.satisfies('@:20-02-1 %gcc@10:'): + wrapper_flags = ['-fcommon'] + + return (wrapper_flags, None, flags) + def configure_args(self): spec = self.spec From c0cdc004091ffe5bf310ca69e7b9f3b1f1c008d0 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 17 Jun 2020 16:01:46 -0500 Subject: [PATCH 755/802] oneDNN: add v1.5.0 (#17137) --- var/spack/repos/builtin/packages/onednn/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/onednn/package.py b/var/spack/repos/builtin/packages/onednn/package.py index 995cf40942a..b723fabd9c9 100644 --- a/var/spack/repos/builtin/packages/onednn/package.py +++ b/var/spack/repos/builtin/packages/onednn/package.py @@ -12,10 +12,11 @@ class Onednn(CMakePackage): Formerly known as Intel MKL-DNN and DNNL.""" homepage = "https://01.org/dnnl" - url = "https://github.com/oneapi-src/oneDNN/archive/v1.4.tar.gz" + url = "https://github.com/oneapi-src/oneDNN/archive/v1.5.tar.gz" maintainers = ['adamjstewart'] + version('1.5', sha256='2aacc00129418185e0bc1269d3ef82f93f08de2c336932989c0c360279129edb') version('1.4', sha256='54737bcb4dc1961d32ee75da3ecc529fa48198f8b2ca863a079e19a9c4adb70f') version('1.3', sha256='b87c23b40a93ef5e479c81028db71c4847225b1a170f82af5e79f1cda826d3bf') version('1.2.2', sha256='251dd17643cff285f38b020fc4ac9245d8d596f3e2140b98982ffc32eae3943c') From 5b59e883c1bb30b5893bb6bd3d6ea6be2e3c294e Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Wed, 17 Jun 2020 17:53:30 -0500 Subject: [PATCH 756/802] cray module do not work without CRAY_LD_LIBRARY_PATH (#17031) Co-authored-by: Gregory Becker --- lib/spack/spack/build_environment.py | 12 ++++++++---- lib/spack/spack/util/module_cmd.py | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 435de8594ec..f997110b4c9 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -32,6 +32,7 @@ Skimming this module is a nice way to get acquainted with the types of calls you can make from within the install() function. """ +import re import inspect import multiprocessing import os @@ -148,11 +149,14 @@ def clean_environment(): env.unset('DYLD_LIBRARY_PATH') env.unset('DYLD_FALLBACK_LIBRARY_PATH') - # On Cray systems newer than CNL5, unset CRAY_LD_LIBRARY_PATH to avoid - # interference with Spack dependencies. CNL5 (e.g. Blue Waters) requires - # these variables to be set. + # On Cray "cluster" systems, unset CRAY_LD_LIBRARY_PATH to avoid + # interference with Spack dependencies. + # CNL requires these variables to be set (or at least some of them, + # depending on the CNL version). hostarch = arch.Arch(arch.platform(), 'default_os', 'default_target') - if str(hostarch.platform) == 'cray' and str(hostarch.os) != 'cnl5': + on_cray = str(hostarch.platform) == 'cray' + using_cnl = re.match(r'cnl\d+', str(hostarch.os)) + if on_cray and not using_cnl: env.unset('CRAY_LD_LIBRARY_PATH') for varname in os.environ.keys(): if 'PKGCONF' in varname: diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py index a5ebe73c847..7017b2ecb6d 100644 --- a/lib/spack/spack/util/module_cmd.py +++ b/lib/spack/spack/util/module_cmd.py @@ -127,7 +127,7 @@ def get_path_args_from_module_line(line): # OPERATION VAR_NAME PATH_ARG words = line.split() if len(words) > 2: - path_arg = line.split()[2] + path_arg = words[2] else: return [] From c8199ece656aa49796d80bf99aa8d43492ebfd1f Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Wed, 17 Jun 2020 21:30:41 -0700 Subject: [PATCH 757/802] python: fix patch issue for 2.7.X, 3.7.X (#17140) * python: fixing patch issue for 2.7.X, 3.7.X versions (#17128) * python: fixing the C/C++ 'distutils' patching for @3.7.0:3.7.1 --- .../repos/builtin/packages/python/package.py | 17 +- .../python/python-2.7.17+-distutils-C++.patch | 269 ++++++++++++++++++ ...patch => python-2.7.8-distutils-C++.patch} | 0 ...patch => python-3.6.8-distutils-C++.patch} | 0 .../python/python-3.7.3-distutils-C++.patch | 256 +++++++++++++++++ ...atch => python-3.7.4+-distutils-C++.patch} | 0 6 files changed, 539 insertions(+), 3 deletions(-) create mode 100644 var/spack/repos/builtin/packages/python/python-2.7.17+-distutils-C++.patch rename var/spack/repos/builtin/packages/python/{python-2.7-distutils-C++.patch => python-2.7.8-distutils-C++.patch} (100%) rename var/spack/repos/builtin/packages/python/{python-3.6-distutils-C++.patch => python-3.6.8-distutils-C++.patch} (100%) create mode 100644 var/spack/repos/builtin/packages/python/python-3.7.3-distutils-C++.patch rename var/spack/repos/builtin/packages/python/{python-3.7+-distutils-C++.patch => python-3.7.4+-distutils-C++.patch} (100%) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 7a143695a38..bca6162c64a 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -167,9 +167,11 @@ class Python(AutotoolsPackage): # C/C++ modules, consider installing a Spack-managed Python with # this patch instead. For more information, see: # https://github.com/spack/spack/pull/16856 - patch('python-2.7-distutils-C++.patch', when='@2.7') - patch('python-3.6-distutils-C++.patch', when='@3.6') - patch('python-3.7+-distutils-C++.patch', when='@3.7:3.8') + patch('python-2.7.8-distutils-C++.patch', when='@2.7.8:2.7.16') + patch('python-2.7.17+-distutils-C++.patch', when='@2.7.17:2.7.18') + patch('python-3.6.8-distutils-C++.patch', when='@3.6.8,3.7.2') + patch('python-3.7.3-distutils-C++.patch', when='@3.7.3') + patch('python-3.7.4+-distutils-C++.patch', when='@3.7.4:3.8') patch('tkinter.patch', when='@:2.8,3.3:3.7 platform=darwin') @@ -267,6 +269,15 @@ def setup_build_environment(self, env): tty.warn(('Python v{0} may not install properly if Python ' 'user configurations are present.').format(self.version)) + # TODO: Python has incomplete support for Python modules with mixed + # C/C++ source, and patches are required to enable building for these + # modules. All Python versions without a viable patch are installed + # with a warning message about this potentially erroneous behavior. + if not spec.satisfies('@2.7.8:2.7.18,3.6.8,3.7.2:3.8.3'): + tty.warn(('Python v{0} does not have the C++ "distutils" patch; ' + 'errors may occur when installing Python modules w/ ' + 'mixed C/C++ source files.').format(self.version)) + # Need this to allow python build to find the Python installation. env.set('MACOSX_DEPLOYMENT_TARGET', platform.mac_ver()[0]) diff --git a/var/spack/repos/builtin/packages/python/python-2.7.17+-distutils-C++.patch b/var/spack/repos/builtin/packages/python/python-2.7.17+-distutils-C++.patch new file mode 100644 index 00000000000..1d2249fcfc0 --- /dev/null +++ b/var/spack/repos/builtin/packages/python/python-2.7.17+-distutils-C++.patch @@ -0,0 +1,269 @@ +diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py +index d2aaae7..8bcdb05 100644 +--- a/Lib/_osx_support.py ++++ b/Lib/_osx_support.py +@@ -14,13 +14,13 @@ __all__ = [ + # configuration variables that may contain universal build flags, + # like "-arch" or "-isdkroot", that may need customization for + # the user environment +-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', +- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', +- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', +- 'PY_CORE_CFLAGS') ++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', ++ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', ++ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS') + + # configuration variables that may contain compiler calls +-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') ++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') + + # prefix added to original configuration variable names + _INITPRE = '_OSX_SUPPORT_INITIAL_' +diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py +index 258e138..13b7d0c 100644 +--- a/Lib/distutils/cygwinccompiler.py ++++ b/Lib/distutils/cygwinccompiler.py +@@ -117,8 +117,10 @@ class CygwinCCompiler (UnixCCompiler): + # dllwrap 2.10.90 is buggy + if self.ld_version >= "2.10.90": + self.linker_dll = "gcc" ++ self.linker_dll_cxx = "g++" + else: + self.linker_dll = "dllwrap" ++ self.linker_dll_cxx = "dllwrap" + + # ld_version >= "2.13" support -shared so use it instead of + # -mdll -static +@@ -132,9 +134,13 @@ class CygwinCCompiler (UnixCCompiler): + self.set_executables(compiler='gcc -mcygwin -O -Wall', + compiler_so='gcc -mcygwin -mdll -O -Wall', + compiler_cxx='g++ -mcygwin -O -Wall', ++ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', + linker_exe='gcc -mcygwin', + linker_so=('%s -mcygwin %s' % +- (self.linker_dll, shared_option))) ++ (self.linker_dll, shared_option)), ++ linker_exe_cxx='g++ -mcygwin', ++ linker_so_cxx=('%s -mcygwin %s' % ++ (self.linker_dll_cxx, shared_option))) + + # cygwin and mingw32 need different sets of libraries + if self.gcc_version == "2.91.57": +@@ -160,8 +166,12 @@ class CygwinCCompiler (UnixCCompiler): + raise CompileError, msg + else: # for other files use the C-compiler + try: +- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg + +@@ -327,9 +337,14 @@ class Mingw32CCompiler (CygwinCCompiler): + self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin, + compiler_so='gcc%s -mdll -O -Wall' % no_cygwin, + compiler_cxx='g++%s -O -Wall' % no_cygwin, ++ compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin, + linker_exe='gcc%s' % no_cygwin, + linker_so='%s%s %s %s' + % (self.linker_dll, no_cygwin, ++ shared_option, entry_point), ++ linker_exe_cxx='g++%s' % no_cygwin, ++ linker_so_cxx='%s%s %s %s' ++ % (self.linker_dll_cxx, no_cygwin, + shared_option, entry_point)) + # Maybe we should also append -mthreads, but then the finished + # dlls need another dll (mingwm10.dll see Mingw32 docs) +diff --git a/Lib/distutils/emxccompiler.py b/Lib/distutils/emxccompiler.py +index a017205..bdc532c 100644 +--- a/Lib/distutils/emxccompiler.py ++++ b/Lib/distutils/emxccompiler.py +@@ -65,8 +65,12 @@ class EMXCCompiler (UnixCCompiler): + # XXX optimization, warnings etc. should be customizable. + self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', + compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', ++ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', ++ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', + linker_exe='gcc -Zomf -Zmt -Zcrtdll', +- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll') ++ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll', ++ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll', ++ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll') + + # want the gcc library statically linked (so that we don't have + # to distribute a version dependent on the compiler we have) +@@ -83,8 +87,12 @@ class EMXCCompiler (UnixCCompiler): + raise CompileError, msg + else: # for other files use the C-compiler + try: +- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg + +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 1a4b792..9d724b2 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -181,10 +181,12 @@ def customize_compiler(compiler): + _osx_support.customize_compiler(_config_vars) + _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' + +- (cc, cxx, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ +- get_config_vars('CC', 'CXX', 'CFLAGS', +- 'CCSHARED', 'LDSHARED', 'SO', 'AR', +- 'ARFLAGS') ++ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \ ++ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'SO', 'AR', 'ARFLAGS') ++ ++ cflags = '' ++ cxxflags = '' + + if 'CC' in os.environ: + newcc = os.environ['CC'] +@@ -199,19 +201,27 @@ def customize_compiler(compiler): + cxx = os.environ['CXX'] + if 'LDSHARED' in os.environ: + ldshared = os.environ['LDSHARED'] ++ if 'LDCXXSHARED' in os.environ: ++ ldcxxshared = os.environ['LDCXXSHARED'] + if 'CPP' in os.environ: + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if 'LDFLAGS' in os.environ: + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] + if 'CFLAGS' in os.environ: + cflags = cflags + ' ' + os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] ++ if 'CXXFLAGS' in os.environ: ++ cxxflags = cxxflags + ' ' + os.environ['CXXFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] + if 'CPPFLAGS' in os.environ: + cpp = cpp + ' ' + os.environ['CPPFLAGS'] + cflags = cflags + ' ' + os.environ['CPPFLAGS'] ++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: +@@ -220,13 +230,17 @@ def customize_compiler(compiler): + archiver = ar + ' ' + ar_flags + + cc_cmd = cc + ' ' + cflags ++ cxx_cmd = cxx + ' ' + cxxflags + compiler.set_executables( + preprocessor=cpp, + compiler=cc_cmd, + compiler_so=cc_cmd + ' ' + ccshared, +- compiler_cxx=cxx, ++ compiler_cxx=cxx_cmd, ++ compiler_so_cxx=cxx_cmd + ' ' + ccshared, + linker_so=ldshared, + linker_exe=cc, ++ linker_so_cxx=ldcxxshared, ++ linker_exe_cxx=cxx, + archiver=archiver) + + compiler.shared_lib_extension = so_ext +diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py +index 3af540e..f8f7efe 100644 +--- a/Lib/distutils/unixccompiler.py ++++ b/Lib/distutils/unixccompiler.py +@@ -55,14 +55,17 @@ class UnixCCompiler(CCompiler): + # are pretty generic; they will probably have to be set by an outsider + # (eg. using information discovered by the sysconfig about building + # Python extensions). +- executables = {'preprocessor' : None, +- 'compiler' : ["cc"], +- 'compiler_so' : ["cc"], +- 'compiler_cxx' : ["cc"], +- 'linker_so' : ["cc", "-shared"], +- 'linker_exe' : ["cc"], +- 'archiver' : ["ar", "-cr"], +- 'ranlib' : None, ++ executables = {'preprocessor' : None, ++ 'compiler' : ["cc"], ++ 'compiler_so' : ["cc"], ++ 'compiler_cxx' : ["c++"], ++ 'compiler_so_cxx' : ["c++"], ++ 'linker_so' : ["cc", "-shared"], ++ 'linker_exe' : ["cc"], ++ 'linker_so_cxx' : ["c++", "-shared"], ++ 'linker_exe_cxx' : ["c++"], ++ 'archiver' : ["ar", "-cr"], ++ 'ranlib' : None, + } + + if sys.platform[:6] == "darwin": +@@ -114,12 +117,19 @@ class UnixCCompiler(CCompiler): + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + compiler_so = self.compiler_so ++ compiler_so_cxx = self.compiler_so_cxx + if sys.platform == 'darwin': + compiler_so = _osx_support.compiler_fixup(compiler_so, + cc_args + extra_postargs) ++ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, ++ cc_args + extra_postargs) + try: +- self.spawn(compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg + +@@ -176,23 +186,16 @@ class UnixCCompiler(CCompiler): + ld_args.extend(extra_postargs) + self.mkpath(os.path.dirname(output_filename)) + try: +- if target_desc == CCompiler.EXECUTABLE: +- linker = self.linker_exe[:] ++ if target_lang == "c++": ++ if target_desc == CCompiler.EXECUTABLE: ++ linker = self.linker_exe_cxx[:] ++ else: ++ linker = self.linker_so_cxx[:] + else: +- linker = self.linker_so[:] +- if target_lang == "c++" and self.compiler_cxx: +- # skip over environment variable settings if /usr/bin/env +- # is used to set up the linker's environment. +- # This is needed on OSX. Note: this assumes that the +- # normal and C++ compiler have the same environment +- # settings. +- i = 0 +- if os.path.basename(linker[0]) == "env": +- i = 1 +- while '=' in linker[i]: +- i = i + 1 +- +- linker[i] = self.compiler_cxx[i] ++ if target_desc == CCompiler.EXECUTABLE: ++ linker = self.linker_exe[:] ++ else: ++ linker = self.linker_so[:] + + if sys.platform == 'darwin': + linker = _osx_support.compiler_fixup(linker, ld_args) diff --git a/var/spack/repos/builtin/packages/python/python-2.7-distutils-C++.patch b/var/spack/repos/builtin/packages/python/python-2.7.8-distutils-C++.patch similarity index 100% rename from var/spack/repos/builtin/packages/python/python-2.7-distutils-C++.patch rename to var/spack/repos/builtin/packages/python/python-2.7.8-distutils-C++.patch diff --git a/var/spack/repos/builtin/packages/python/python-3.6-distutils-C++.patch b/var/spack/repos/builtin/packages/python/python-3.6.8-distutils-C++.patch similarity index 100% rename from var/spack/repos/builtin/packages/python/python-3.6-distutils-C++.patch rename to var/spack/repos/builtin/packages/python/python-3.6.8-distutils-C++.patch diff --git a/var/spack/repos/builtin/packages/python/python-3.7.3-distutils-C++.patch b/var/spack/repos/builtin/packages/python/python-3.7.3-distutils-C++.patch new file mode 100644 index 00000000000..e29323bf0b5 --- /dev/null +++ b/var/spack/repos/builtin/packages/python/python-3.7.3-distutils-C++.patch @@ -0,0 +1,256 @@ +diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py +index db6674e..ccbe09a 100644 +--- a/Lib/_osx_support.py ++++ b/Lib/_osx_support.py +@@ -14,13 +14,13 @@ __all__ = [ + # configuration variables that may contain universal build flags, + # like "-arch" or "-isdkroot", that may need customization for + # the user environment +-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', +- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', +- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', +- 'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS') ++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', ++ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', ++ 'PY_CPPFLAGS', 'PY_CORE_LDFLAGS', 'PY_CORE_CFLAGS') + + # configuration variables that may contain compiler calls +-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') ++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') + + # prefix added to original configuration variable names + _INITPRE = '_OSX_SUPPORT_INITIAL_' +diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py +index 6c5d777..640fa2d 100644 +--- a/Lib/distutils/cygwinccompiler.py ++++ b/Lib/distutils/cygwinccompiler.py +@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler): + # dllwrap 2.10.90 is buggy + if self.ld_version >= "2.10.90": + self.linker_dll = "gcc" ++ self.linker_dll_cxx = "g++" + else: + self.linker_dll = "dllwrap" ++ self.linker_dll_cxx = "dllwrap" + + # ld_version >= "2.13" support -shared so use it instead of + # -mdll -static +@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler): + self.set_executables(compiler='gcc -mcygwin -O -Wall', + compiler_so='gcc -mcygwin -mdll -O -Wall', + compiler_cxx='g++ -mcygwin -O -Wall', ++ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', + linker_exe='gcc -mcygwin', + linker_so=('%s -mcygwin %s' % +- (self.linker_dll, shared_option))) ++ (self.linker_dll, shared_option)), ++ linker_exe_cxx='g++ -mcygwin', ++ linker_so_cxx=('%s -mcygwin %s' % ++ (self.linker_dll_cxx, shared_option))) + + # cygwin and mingw32 need different sets of libraries + if self.gcc_version == "2.91.57": +@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler): + raise CompileError(msg) + else: # for other files use the C-compiler + try: +- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + +@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler): + self.set_executables(compiler='gcc -O -Wall', + compiler_so='gcc -mdll -O -Wall', + compiler_cxx='g++ -O -Wall', ++ compiler_so_cxx='g++ -mdll -O -Wall', + linker_exe='gcc', + linker_so='%s %s %s' + % (self.linker_dll, shared_option, ++ entry_point), ++ linker_exe_cxx='g++', ++ linker_so_cxx='%s %s %s' ++ % (self.linker_dll_cxx, shared_option, + entry_point)) + # Maybe we should also append -mthreads, but then the finished + # dlls need another dll (mingwm10.dll see Mingw32 docs) +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 83160f8..b735369 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -183,9 +183,11 @@ def customize_compiler(compiler): + _osx_support.customize_compiler(_config_vars) + _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' + +- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ ++ (cc, cxx, opt, cflags, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ + get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', +- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') ++ 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') ++ ++ cxxflags = cflags + + if 'CC' in os.environ: + newcc = os.environ['CC'] +@@ -200,19 +202,27 @@ def customize_compiler(compiler): + cxx = os.environ['CXX'] + if 'LDSHARED' in os.environ: + ldshared = os.environ['LDSHARED'] ++ if 'LDCXXSHARED' in os.environ: ++ ldcxxshared = os.environ['LDCXXSHARED'] + if 'CPP' in os.environ: + cpp = os.environ['CPP'] + else: + cpp = cc + " -E" # not always + if 'LDFLAGS' in os.environ: + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] + if 'CFLAGS' in os.environ: + cflags = opt + ' ' + os.environ['CFLAGS'] + ldshared = ldshared + ' ' + os.environ['CFLAGS'] ++ if 'CXXFLAGS' in os.environ: ++ cxxflags = opt + ' ' + os.environ['CXXFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] + if 'CPPFLAGS' in os.environ: + cpp = cpp + ' ' + os.environ['CPPFLAGS'] ++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] + cflags = cflags + ' ' + os.environ['CPPFLAGS'] + ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] ++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] + if 'AR' in os.environ: + ar = os.environ['AR'] + if 'ARFLAGS' in os.environ: +@@ -221,13 +231,17 @@ def customize_compiler(compiler): + archiver = ar + ' ' + ar_flags + + cc_cmd = cc + ' ' + cflags ++ cxx_cmd = cxx + ' ' + cxxflags + compiler.set_executables( + preprocessor=cpp, + compiler=cc_cmd, + compiler_so=cc_cmd + ' ' + ccshared, +- compiler_cxx=cxx, ++ compiler_cxx=cxx_cmd, ++ compiler_so_cxx=cxx_cmd + ' ' + ccshared, + linker_so=ldshared, + linker_exe=cc, ++ linker_so_cxx=ldcxxshared, ++ linker_exe_cxx=cxx, + archiver=archiver) + + compiler.shared_lib_extension = shlib_suffix +diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py +index d10a78d..7e88781 100644 +--- a/Lib/distutils/unixccompiler.py ++++ b/Lib/distutils/unixccompiler.py +@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler): + # are pretty generic; they will probably have to be set by an outsider + # (eg. using information discovered by the sysconfig about building + # Python extensions). +- executables = {'preprocessor' : None, +- 'compiler' : ["cc"], +- 'compiler_so' : ["cc"], +- 'compiler_cxx' : ["cc"], +- 'linker_so' : ["cc", "-shared"], +- 'linker_exe' : ["cc"], +- 'archiver' : ["ar", "-cr"], +- 'ranlib' : None, ++ executables = {'preprocessor' : None, ++ 'compiler' : ["cc"], ++ 'compiler_so' : ["cc"], ++ 'compiler_cxx' : ["c++"], ++ 'compiler_so_cxx' : ["c++"], ++ 'linker_so' : ["cc", "-shared"], ++ 'linker_exe' : ["cc"], ++ 'linker_so_cxx' : ["c++", "-shared"], ++ 'linker_exe_cxx' : ["c++"], ++ 'archiver' : ["ar", "-cr"], ++ 'ranlib' : None, + } + + if sys.platform[:6] == "darwin": +@@ -110,12 +113,19 @@ class UnixCCompiler(CCompiler): + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + compiler_so = self.compiler_so ++ compiler_so_cxx = self.compiler_so_cxx + if sys.platform == 'darwin': + compiler_so = _osx_support.compiler_fixup(compiler_so, + cc_args + extra_postargs) ++ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, ++ cc_args + extra_postargs) + try: +- self.spawn(compiler_so + cc_args + [src, '-o', obj] + +- extra_postargs) ++ if self.detect_language(src) == 'c++': ++ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + ++ extra_postargs) ++ else: ++ self.spawn(compiler_so + cc_args + [src, '-o', obj] + ++ extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + +@@ -173,30 +183,16 @@ class UnixCCompiler(CCompiler): + ld_args.extend(extra_postargs) + self.mkpath(os.path.dirname(output_filename)) + try: +- if target_desc == CCompiler.EXECUTABLE: +- linker = self.linker_exe[:] ++ if target_lang == "c++": ++ if target_desc == CCompiler.EXECUTABLE: ++ linker = self.linker_exe_cxx[:] ++ else: ++ linker = self.linker_so_cxx[:] + else: +- linker = self.linker_so[:] +- if target_lang == "c++" and self.compiler_cxx: +- # skip over environment variable settings if /usr/bin/env +- # is used to set up the linker's environment. +- # This is needed on OSX. Note: this assumes that the +- # normal and C++ compiler have the same environment +- # settings. +- i = 0 +- if os.path.basename(linker[0]) == "env": +- i = 1 +- while '=' in linker[i]: +- i += 1 +- +- if os.path.basename(linker[i]) == 'ld_so_aix': +- # AIX platforms prefix the compiler with the ld_so_aix +- # script, so we need to adjust our linker index +- offset = 1 ++ if target_desc == CCompiler.EXECUTABLE: ++ linker = self.linker_exe[:] + else: +- offset = 0 +- +- linker[i+offset] = self.compiler_cxx[i] ++ linker = self.linker_so[:] + + if sys.platform == 'darwin': + linker = _osx_support.compiler_fixup(linker, ld_args) +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 2d2e11f..8456e3f 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -615,10 +615,10 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o + *\ -s*|s*) quiet="-q";; \ + *) quiet="";; \ + esac; \ +- echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ ++ echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ +- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ ++ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + diff --git a/var/spack/repos/builtin/packages/python/python-3.7+-distutils-C++.patch b/var/spack/repos/builtin/packages/python/python-3.7.4+-distutils-C++.patch similarity index 100% rename from var/spack/repos/builtin/packages/python/python-3.7+-distutils-C++.patch rename to var/spack/repos/builtin/packages/python/python-3.7.4+-distutils-C++.patch From 1bb94f2913b8657ce098230f33a08be38e1ba05a Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Thu, 18 Jun 2020 00:32:25 -0400 Subject: [PATCH 758/802] glib: fix 2.56 build with python@2 (#17144) * glib: fix 2.56 build with python@2 * flake8 --- var/spack/repos/builtin/packages/glib/package.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index 4d648ddb3a4..6426286b355 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -141,10 +141,18 @@ def configure_args(self): args.append('--with-libiconv=maybe') else: args.append('--with-libiconv=gnu') - if 'tracing=dtrace' in self.spec or 'tracing=systemtap' in self.spec: - args.append('--enable-tracing') + if self.spec.satisfies('@2.56:'): + for value in ('dtrace', 'systemtap'): + if ('tracing=' + value) in self.spec: + args.append('--enable-' + value) + else: + args.append('--disable-' + value) else: - args.append('--disable-tracing') + if ('tracing=dtrace' in self.spec + or 'tracing=systemtap' in self.spec): + args.append('--enable-tracing') + else: + args.append('--disable-tracing') # SELinux is not available in Spack, so glib should not use it. args.append('--disable-selinux') # glib should not use the globally installed gtk-doc. Otherwise, From 58e20430b1d33aa4edcad46e9b1c70332eb55066 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Thu, 18 Jun 2020 16:43:06 +0900 Subject: [PATCH 759/802] minimap2: fix a typo in the recipe (#17148) --- var/spack/repos/builtin/packages/minimap2/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/minimap2/package.py b/var/spack/repos/builtin/packages/minimap2/package.py index 16f7f7aec12..4c8e2a1c4c3 100644 --- a/var/spack/repos/builtin/packages/minimap2/package.py +++ b/var/spack/repos/builtin/packages/minimap2/package.py @@ -28,7 +28,7 @@ def install_minimap2(self): if self.spec.target.family == 'aarch64': make_arg.extend([ 'arm_neon=1', - 'aarch64~1' + 'aarch64=1' ]) make(*make_arg) mkdirp(prefix.bin) From 1f85d6ecebd555ae219637cdc9e1ec475f962f48 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 18 Jun 2020 02:44:03 -0500 Subject: [PATCH 760/802] Docs: fix rst link to spack ci (#17147) --- lib/spack/docs/pipelines.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/docs/pipelines.rst b/lib/spack/docs/pipelines.rst index d1128163b1f..ee3b4e8ad62 100644 --- a/lib/spack/docs/pipelines.rst +++ b/lib/spack/docs/pipelines.rst @@ -103,7 +103,7 @@ needed for pipeline operation that should not be visible in a spack environment file. These environment variables are described in more detail :ref:`ci_environment_variables`. -.. _cmd_spack_ci: +.. _cmd-spack-ci: ^^^^^^^^^^^^^^^^^^ ``spack ci`` @@ -112,7 +112,7 @@ file. These environment variables are described in more detail Super-command for functionality related to generating pipelines and executing pipeline jobs. -.. _cmd_spack_ci_generate: +.. _cmd-spack-ci-generate: ^^^^^^^^^^^^^^^^^^^^^ ``spack ci generate`` @@ -121,7 +121,7 @@ pipeline jobs. Concretizes the specs in the active environment, stages them (as described in :ref:`staging_algorithm`), and writes the resulting ``.gitlab-ci.yml`` to disk. -.. _cmd_spack_ci_rebuild: +.. _cmd-spack-ci-rebuild: ^^^^^^^^^^^^^^^^^^^^ ``spack ci rebuild`` From 2fd3ab3c9c93110e71018681f9759eb166a639c9 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Thu, 18 Jun 2020 01:37:32 -0700 Subject: [PATCH 761/802] Fetching from urls: Error Message (#16434) * Fetching from urls: Error Message Fix the error message when fetching from consecutive `urls` of a package version. Each fail should show the currently failing URL, not the first url. Example multi-problem run that occured in real life: ``` ==> 5821: Installing util-macros curl: (28) Connection timed out after 10000 milliseconds curl: (16) Error in the HTTP2 framing layer curl: (22) The requested URL returned error: 403 Forbidden ==> Fetching https://www.x.org/archive/individual/util/util-macros-1.19.1.tar.bz2 ==> Failed to fetch file from URL: https://www.x.org/archive/individual/util/util-macros-1.19.1.tar.bz2 Curl failed with error 28 ==> Fetching https://mirrors.ircam.fr/pub/x.org/individual/util/util-macros-1.19.1.tar.bz2 ==> Failed to fetch file from URL: https://www.x.org/archive/individual/util/util-macros-1.19.1.tar.bz2 Curl failed with error 16 ==> Fetching http://xorg.mirrors.pair.com/individual/util/util-macros-1.19.1.tar.bz2 ==> Failed to fetch file from URL: https://www.x.org/archive/individual/util/util-macros-1.19.1.tar.bz2 URL https://www.x.org/archive/individual/util/util-macros-1.19.1.tar.bz2 was not found! ==> Fetching from https://www.x.org/archive/individual/util/util-macros-1.19.1.tar.bz2 failed. ==> Error: FetchError: All fetchers failed for spack-stage-util-macros-1.19.1-se2a2e74oyusj2r4esgcb7pr3qhh45ef ``` - `urls[0]`: HTTP2 layer error - `urls[1]`: timeout - `urls[2]`: missing file on mirror * x.org: two more mirrors x.org mirrors are a bit tricky, since many are out-of-sync or off. A good package to test with is `util-macros`, which had a "recent" release. --- lib/spack/spack/build_systems/xorg.py | 5 +++++ lib/spack/spack/fetch_strategy.py | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/build_systems/xorg.py b/lib/spack/spack/build_systems/xorg.py index 815bb7c26b5..ae28b30929b 100644 --- a/lib/spack/spack/build_systems/xorg.py +++ b/lib/spack/spack/build_systems/xorg.py @@ -14,9 +14,14 @@ class XorgPackage(spack.package.PackageBase): xorg_mirror_path = None #: List of x.org mirrors used by Spack + # Note: x.org mirrors are a bit tricky, since many are out-of-sync or off. + # A good package to test with is `util-macros`, which had a "recent" + # release. base_mirrors = [ 'https://www.x.org/archive/individual/', 'https://mirrors.ircam.fr/pub/x.org/individual/', + 'https://mirror.transip.net/xorg/individual/', + 'ftp://ftp.freedesktop.org/pub/xorg/individual/', 'http://xorg.mirrors.pair.com/individual/' ] diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index c6200565e5b..5f0cc4db5d7 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -292,6 +292,7 @@ def fetch(self): tty.msg("Already downloaded %s" % self.archive_file) return + url = None for url in self.candidate_urls: try: partial_file, save_file = self._fetch_from_url(url) @@ -303,7 +304,7 @@ def fetch(self): pass if not self.archive_file: - raise FailedDownloadError(self.url) + raise FailedDownloadError(url) def _fetch_from_url(self, url): save_file = None @@ -369,12 +370,12 @@ def _fetch_from_url(self, url): if curl.returncode == 22: # This is a 404. Curl will print the error. raise FailedDownloadError( - self.url, "URL %s was not found!" % self.url) + url, "URL %s was not found!" % url) elif curl.returncode == 60: # This is a certificate error. Suggest spack -k raise FailedDownloadError( - self.url, + url, "Curl was unable to fetch due to invalid certificate. " "This is either an attack, or your cluster's SSL " "configuration is bad. If you believe your SSL " @@ -386,7 +387,7 @@ def _fetch_from_url(self, url): # This is some other curl error. Curl will print the # error, but print a spack message too raise FailedDownloadError( - self.url, + url, "Curl failed with error %d" % curl.returncode) # Check if we somehow got an HTML file rather than the archive we From 4fe78bceaa9d4390f3ed0641a4223033aaf87b67 Mon Sep 17 00:00:00 2001 From: Itaru Kitayama Date: Thu, 18 Jun 2020 17:40:54 +0900 Subject: [PATCH 762/802] cube and libjpeg-turbo: added cube v4.5 and libjpeg-turbo v2.0.4 (#17132) --- var/spack/repos/builtin/packages/cube/package.py | 1 + var/spack/repos/builtin/packages/libjpeg-turbo/package.py | 1 + 2 files changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/cube/package.py b/var/spack/repos/builtin/packages/cube/package.py index d3bdd366173..d2eeb203c00 100644 --- a/var/spack/repos/builtin/packages/cube/package.py +++ b/var/spack/repos/builtin/packages/cube/package.py @@ -17,6 +17,7 @@ class Cube(AutotoolsPackage): homepage = "http://www.scalasca.org/software/cube-4.x/download.html" url = "http://apps.fz-juelich.de/scalasca/releases/cube/4.4/dist/cubegui-4.4.2.tar.gz" + version('4.5', sha256='ffe84108adce0adf06dca80820d941b1a60a5580a8bacc8f7c1b6989c8ab1bfa') version('4.4.4', sha256='9b7b96d5a64b558a9017cc3599bba93a42095534e018e3de9b1f80ab6d04cc34') version('4.4.3', sha256='bf4b0f2ff68507ff82ba24eb4895aed961710dae16d783c222a12f152440cf36') version('4.4.2', sha256='29b6479616a524f8325f5031a883963bf965fb92569de33271a020f08650ec7b') diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py index 10bddc37e03..a78c4af66cd 100644 --- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py +++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py @@ -15,6 +15,7 @@ class LibjpegTurbo(Package): homepage = "https://libjpeg-turbo.org/" url = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/2.0.3.tar.gz" + version('2.0.4', sha256='33dd8547efd5543639e890efbf2ef52d5a21df81faf41bb940657af916a23406') version('2.0.3', sha256='a69598bf079463b34d45ca7268462a18b6507fdaa62bb1dfd212f02041499b5d') version('2.0.2', sha256='b45255bd476c19c7c6b198c07c0487e8b8536373b82f2b38346b32b4fa7bb942') version('1.5.90', sha256='cb948ade92561d8626fd7866a4a7ba3b952f9759ea3dd642927bc687470f60b7') From 910d25870616f7407f5b28649c6134e75b7dacbf Mon Sep 17 00:00:00 2001 From: Shintaro Iwasaki Date: Thu, 18 Jun 2020 04:11:59 -0500 Subject: [PATCH 763/802] argobots, bolt: updates to package.py (#17117) --- .../repos/builtin/packages/argobots/package.py | 17 ++++++----------- .../repos/builtin/packages/bolt/package.py | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/argobots/package.py b/var/spack/repos/builtin/packages/argobots/package.py index 3db9014afbe..2dc8212eb7f 100644 --- a/var/spack/repos/builtin/packages/argobots/package.py +++ b/var/spack/repos/builtin/packages/argobots/package.py @@ -20,21 +20,16 @@ class Argobots(AutotoolsPackage): git = "https://github.com/pmodels/argobots.git" maintainers = ['shintaro-iwasaki'] - version("master", branch="master") - version("1.0", sha256="36a0815f7bf99900a9c9c1eef61ef9b3b76aa2cfc4594a304f6c8c3296da8def", - preferred=True) - version("1.0rc2", sha256="7496b8bd39930a548b01aa3b1fe8f8b582c272600ef6a05ddc4398cf21dc12a2") - version("1.0rc1", sha256="2dc4487556dce602655a6535f501136f0edc3575708029c80b1af6dccd069ce7") - version("1.0b1", sha256="480b85b0e8db288400088a57c2dc5639f556843b06b0492841920c38348a2a3e") - version("1.0a1", sha256="bef93e06026ddeba8809474923176803e64d08e1425672cd7c5b424c797d5d9d") + version("main", branch="main") + version("1.0", sha256="36a0815f7bf99900a9c9c1eef61ef9b3b76aa2cfc4594a304f6c8c3296da8def") variant("valgrind", default=False, description="Enable Valgrind") variant("debug", default=False, description="Compiled with debugging symbols") - depends_on("m4", type=("build"), when="@master") - depends_on("autoconf", type=("build"), when="@master") - depends_on("automake", type=("build"), when="@master") - depends_on("libtool", type=("build"), when="@master") + depends_on("m4", type=("build"), when="@main") + depends_on("autoconf", type=("build"), when="@main") + depends_on("automake", type=("build"), when="@main") + depends_on("libtool", type=("build"), when="@main") depends_on("valgrind", when="+valgrind") def configure_args(self): diff --git a/var/spack/repos/builtin/packages/bolt/package.py b/var/spack/repos/builtin/packages/bolt/package.py index 0b131b4d7a7..b4e4cf95ce9 100644 --- a/var/spack/repos/builtin/packages/bolt/package.py +++ b/var/spack/repos/builtin/packages/bolt/package.py @@ -22,7 +22,7 @@ class Bolt(CMakePackage): git = "https://github.com/pmodels/bolt.git" maintainers = ['shintaro-iwasaki'] - version("master", branch="master") + version("main", branch="main") version("1.0", sha256="1c0d2f75597485ca36335d313a73736594e75c8a36123c5a6f54d01b5ba5c384") depends_on('argobots') From 82eb71cb953db0d95d15caed0d3b73232736e638 Mon Sep 17 00:00:00 2001 From: Omar Padron Date: Thu, 18 Jun 2020 05:16:24 -0400 Subject: [PATCH 764/802] Explicitly install setuptools in docker images (#17143) --- share/spack/docker/centos-6.dockerfile | 1 + share/spack/docker/centos-7.dockerfile | 1 + share/spack/docker/ubuntu-1604.dockerfile | 1 + share/spack/docker/ubuntu-1804.dockerfile | 1 + 4 files changed, 4 insertions(+) diff --git a/share/spack/docker/centos-6.dockerfile b/share/spack/docker/centos-6.dockerfile index fe919f3c885..8c971124a53 100644 --- a/share/spack/docker/centos-6.dockerfile +++ b/share/spack/docker/centos-6.dockerfile @@ -42,6 +42,7 @@ RUN yum update -y \ patch \ python \ python-pip \ + python-setuptools \ tcl \ unzip \ which \ diff --git a/share/spack/docker/centos-7.dockerfile b/share/spack/docker/centos-7.dockerfile index 67affa1af9f..292663d9222 100644 --- a/share/spack/docker/centos-7.dockerfile +++ b/share/spack/docker/centos-7.dockerfile @@ -42,6 +42,7 @@ RUN yum update -y \ patch \ python \ python-pip \ + python-setuptools \ tcl \ unzip \ which \ diff --git a/share/spack/docker/ubuntu-1604.dockerfile b/share/spack/docker/ubuntu-1604.dockerfile index 7891c5a2614..1f7db8bea9c 100644 --- a/share/spack/docker/ubuntu-1604.dockerfile +++ b/share/spack/docker/ubuntu-1604.dockerfile @@ -41,6 +41,7 @@ RUN apt-get -yqq update \ make \ python3 \ python3-pip \ + python3-setuptools \ tcl \ unzip \ && locale-gen en_US.UTF-8 \ diff --git a/share/spack/docker/ubuntu-1804.dockerfile b/share/spack/docker/ubuntu-1804.dockerfile index c0793314760..a8d9577b664 100644 --- a/share/spack/docker/ubuntu-1804.dockerfile +++ b/share/spack/docker/ubuntu-1804.dockerfile @@ -41,6 +41,7 @@ RUN apt-get -yqq update \ make \ python3 \ python3-pip \ + python3-setuptools \ tcl \ unzip \ && locale-gen en_US.UTF-8 \ From 1de20f00b6d72a6c51f1f8e151081c7d34427fe3 Mon Sep 17 00:00:00 2001 From: Sinan Date: Thu, 18 Jun 2020 02:20:17 -0700 Subject: [PATCH 765/802] arrayfire: added cudnn as a dependency when +cuda (#17146) Co-authored-by: Sinan81 --- var/spack/repos/builtin/packages/arrayfire/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/arrayfire/package.py b/var/spack/repos/builtin/packages/arrayfire/package.py index 983bd7e775e..d3a7b65e2c1 100644 --- a/var/spack/repos/builtin/packages/arrayfire/package.py +++ b/var/spack/repos/builtin/packages/arrayfire/package.py @@ -25,6 +25,7 @@ class Arrayfire(CMakePackage, CudaPackage): depends_on('fftw') depends_on('blas') depends_on('cuda@7.5:', when='+cuda') + depends_on('cudnn', when='+cuda') depends_on('opencl +icd', when='+opencl') # TODO add more opencl backends: # currently only Cuda backend is enabled From 2a13bad8eb6a8045228359afda8451c7a6dd3b60 Mon Sep 17 00:00:00 2001 From: darmac Date: Thu, 18 Jun 2020 20:42:52 +0800 Subject: [PATCH 766/802] atop: fix ld error (#17150) --- var/spack/repos/builtin/packages/atop/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/atop/package.py b/var/spack/repos/builtin/packages/atop/package.py index c06d27cbd7b..3c0772fc4e4 100644 --- a/var/spack/repos/builtin/packages/atop/package.py +++ b/var/spack/repos/builtin/packages/atop/package.py @@ -20,6 +20,9 @@ class Atop(Package): depends_on('zlib') depends_on('ncurses') + def setup_build_environment(self, env): + env.append_flags('LDFLAGS', '-ltinfo') + def install(self, spec, prefix): make() mkdirp(prefix.bin) From 68c13d76f9b12dcd777a915426aa2a552944fb45 Mon Sep 17 00:00:00 2001 From: lorddavidiii Date: Thu, 18 Jun 2020 14:43:52 +0200 Subject: [PATCH 767/802] arpack-ng: fix build with gcc@10: (#17131) --- var/spack/repos/builtin/packages/arpack-ng/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index 35a263541f3..1698a0e4bd1 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -85,6 +85,12 @@ def libs(self): libraries, root=self.prefix, shared=True, recursive=True ) + @when('@:3.7.0 %gcc@10:') + def setup_build_environment(self, env): + # version up to and including 3.7.0 are not ported to gcc 10 + # https://github.com/opencollab/arpack-ng/issues/242 + env.set('FFLAGS', '-fallow-argument-mismatch') + @when('@3.4.0:') def install(self, spec, prefix): From 6d9f0262de6269b895673315a1c36c4f6888419e Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 18 Jun 2020 14:44:32 +0200 Subject: [PATCH 768/802] libjpeg-turbo: fixed sha256 (#17154) --- .../repos/builtin/packages/libjpeg-turbo/package.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py index a78c4af66cd..4b81a01ef6c 100644 --- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py +++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py @@ -8,14 +8,16 @@ class LibjpegTurbo(Package): """libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to - accelerate baseline JPEG compression and decompression. libjpeg is a - library that implements JPEG image encoding, decoding and - transcoding.""" + accelerate baseline JPEG compression and decompression. + + libjpeg is a library that implements JPEG image encoding, decoding and + transcoding. + """ # https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/BUILDING.md homepage = "https://libjpeg-turbo.org/" - url = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/2.0.3.tar.gz" + url = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/2.0.3.tar.gz" - version('2.0.4', sha256='33dd8547efd5543639e890efbf2ef52d5a21df81faf41bb940657af916a23406') + version('2.0.4', sha256='7777c3c19762940cff42b3ba4d7cd5c52d1671b39a79532050c85efb99079064') version('2.0.3', sha256='a69598bf079463b34d45ca7268462a18b6507fdaa62bb1dfd212f02041499b5d') version('2.0.2', sha256='b45255bd476c19c7c6b198c07c0487e8b8536373b82f2b38346b32b4fa7bb942') version('1.5.90', sha256='cb948ade92561d8626fd7866a4a7ba3b952f9759ea3dd642927bc687470f60b7') From 33e6d0f378aa2bd325a15de275844cc68bc491f6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 18 Jun 2020 17:24:14 -0500 Subject: [PATCH 769/802] py-matplotlib: add v3.2.2 (#17160) --- var/spack/repos/builtin/packages/py-matplotlib/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 9b9b77f00a2..a1b4c94e409 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -13,7 +13,7 @@ class PyMatplotlib(PythonPackage): and interactive visualizations in Python.""" homepage = "https://matplotlib.org/" - url = "https://pypi.io/packages/source/m/matplotlib/matplotlib-3.2.1.tar.gz" + url = "https://pypi.io/packages/source/m/matplotlib/matplotlib-3.2.2.tar.gz" maintainers = ['adamjstewart'] @@ -27,6 +27,7 @@ class PyMatplotlib(PythonPackage): 'matplotlib.testing.jpl_units' ] + version('3.2.2', sha256='3d77a6630d093d74cbbfebaa0571d00790966be1ed204e4a8239f5cbd6835c5d') version('3.2.1', sha256='ffe2f9cdcea1086fc414e82f42271ecf1976700b8edd16ca9d376189c6d93aee') version('3.2.0', sha256='651d76daf9168250370d4befb09f79875daa2224a9096d97dfc3ed764c842be4') version('3.1.3', sha256='db3121f12fb9b99f105d1413aebaeb3d943f269f3d262b45586d12765866f0c6') @@ -127,7 +128,10 @@ class PyMatplotlib(PythonPackage): depends_on('pkgconfig', type='build') # Testing dependencies - depends_on('py-pytest', type='test') + # https://matplotlib.org/devel/testing.html#requirements + depends_on('py-pytest@3.6:', type='test') + depends_on('ghostscript@9.0:', type='test') + # depends_on('inkscape@:0.999', type='test') msg = 'MacOSX backend requires the Cocoa headers included with XCode' conflicts('platform=linux', when='backend=macosx', msg=msg) From 5a0c5de50b168e34278a876942cda93ddd440c84 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 18 Jun 2020 17:24:27 -0500 Subject: [PATCH 770/802] py-pandas: add v1.0.5 (#17161) --- var/spack/repos/builtin/packages/py-pandas/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index 152f3a0d4c2..3fba468a270 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -12,7 +12,7 @@ class PyPandas(PythonPackage): programming language.""" homepage = "https://pandas.pydata.org/" - url = "https://pypi.io/packages/source/p/pandas/pandas-1.0.4.tar.gz" + url = "https://pypi.io/packages/source/p/pandas/pandas-1.0.5.tar.gz" maintainers = ['adamjstewart'] import_modules = [ @@ -29,6 +29,7 @@ class PyPandas(PythonPackage): 'pandas.api.extensions' ] + version('1.0.5', sha256='69c5d920a0b2a9838e677f78f4dde506b95ea8e4d30da25859db6469ded84fa8') version('1.0.4', sha256='b35d625282baa7b51e82e52622c300a1ca9f786711b2af7cbe64f1e6831f4126') version('1.0.3', sha256='32f42e322fb903d0e189a4c10b75ba70d90958cc4f66a1781ed027f1a1d14586') version('1.0.2', sha256='76334ba36aa42f93b6b47b79cbc32187d3a178a4ab1c3a478c8f4198bcd93a73') From b80d5e74e52542ae8961acda16b57951d36c1925 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 18 Jun 2020 17:24:38 -0500 Subject: [PATCH 771/802] PyTorch: add v1.5.1 (#17167) --- var/spack/repos/builtin/packages/py-torch/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 4878c343762..c240144f11d 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -50,6 +50,7 @@ class PyTorch(PythonPackage, CudaPackage): ] version('master', branch='master', submodules=True) + version('1.5.1', tag='v1.5.1', submodules=True) version('1.5.0', tag='v1.5.0', submodules=True) version('1.4.1', tag='v1.4.1', submodules=True) version('1.4.0', tag='v1.4.0', submodules=True, @@ -170,7 +171,7 @@ class PyTorch(PythonPackage, CudaPackage): # https://github.com/pytorch/pytorch/pull/35607 # https://github.com/pytorch/pytorch/pull/37865 # Fixes CMake configuration error when XNNPACK is disabled - patch('xnnpack.patch', when='@1.5.0') + patch('xnnpack.patch', when='@1.5.0:1.5.999') # https://github.com/pytorch/pytorch/pull/37086 # Fixes compilation with Clang 9.0.0 and Apple Clang 11.0.3 From b73536b4ad15fbbac3a99908fb6db40a68642066 Mon Sep 17 00:00:00 2001 From: Alexander Knieps Date: Fri, 19 Jun 2020 18:03:25 +0200 Subject: [PATCH 772/802] Update to swipl package (#17173) * Added version 8.2.0, added dependency for documentation build, added variants for documentations * Renamed variant '+man' to '+html' Co-authored-by: Alexander Knieps --- var/spack/repos/builtin/packages/swipl/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/swipl/package.py b/var/spack/repos/builtin/packages/swipl/package.py index 6cba487a7d2..da3e161c2c6 100644 --- a/var/spack/repos/builtin/packages/swipl/package.py +++ b/var/spack/repos/builtin/packages/swipl/package.py @@ -24,6 +24,7 @@ class Swipl(CMakePackage): maintainers = ['alexrobomind'] + version('8.2.0', sha256='d8c9f3adb9cd997a5fed7b5f5dbfe971d2defda969b9066ada158e4202c09c3c') version('8.0.3', sha256='cee59c0a477c8166d722703f6e52f962028f3ac43a5f41240ecb45dbdbe2d6ae') variant('gmp', default=True, description='bignum and rational number support') @@ -32,10 +33,14 @@ class Swipl(CMakePackage): variant('zlib', default=True, description='Compressed streams support') variant('odbc', default=True, description='ODBC database access') variant('unwind', default=True, description='Build with stack traces in crash reports') + variant('html', default=True, description='Install the HTML documentation') + variant('pdfdoc', default=False, description='Build the PDF documentation') depends_on('uuid') depends_on('readline') + depends_on('libarchive', when='+html') + depends_on('gmp', when='+gmp') depends_on('unwind', when='+unwind') depends_on('unixodbc', when='+odbc') @@ -65,6 +70,8 @@ def append_switch(variant, cmake_flag): append_switch('+gmp', 'USE_GMP') append_switch('+xpce', 'SWIPL_PACKAGES_X') append_switch('+odbc', 'SWIPL_PACKAGES_ODBC') + append_switch('+html', 'INSTALL_DOCUMENTATION') + append_switch('+pdfdoc', 'BUILD_PDF_DOCUMENTATION') # The variants ssl and zlib are implicitly set up by CMake From 844312f2135169b9e329710e178177df0553e412 Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Fri, 19 Jun 2020 12:10:03 -0400 Subject: [PATCH 773/802] Updated slate package to use new git repo. Added maintainer. (#17165) * Updated slate package to use new git repo. Added maintainer. --- var/spack/repos/builtin/packages/slate/package.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/slate/package.py b/var/spack/repos/builtin/packages/slate/package.py index 67264d3bc92..cae0a0e8df5 100644 --- a/var/spack/repos/builtin/packages/slate/package.py +++ b/var/spack/repos/builtin/packages/slate/package.py @@ -16,10 +16,10 @@ class Slate(Package): solvers.""" homepage = "https://icl.utk.edu/slate/" - hg = "https://bitbucket.org/icl/slate" - maintainers = ['G-Ragghianti'] + git = "https://bitbucket.org/icl/slate" + maintainers = ['G-Ragghianti', 'mgates3'] - version('develop', hg=hg) + version('develop', submodules=True) variant('cuda', default=True, description='Build with CUDA support.') variant('mpi', default=True, description='Build with MPI support.') @@ -27,7 +27,6 @@ class Slate(Package): depends_on('cuda@9:', when='+cuda') depends_on('intel-mkl') - depends_on('mercurial', type='build') depends_on('mpi', when='+mpi') conflicts('%gcc@:5') From a20ba315f57bcbbb73838d1b67a15a9e14d580cd Mon Sep 17 00:00:00 2001 From: Chris White Date: Fri, 19 Jun 2020 12:31:09 -0700 Subject: [PATCH 774/802] Axom/Conduit: Fix error when fortran is not defined (#17171) * Fix error when fortran is not defined * Guard more ~fortran cases --- var/spack/repos/builtin/packages/axom/package.py | 8 +++++--- var/spack/repos/builtin/packages/conduit/package.py | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/axom/package.py b/var/spack/repos/builtin/packages/axom/package.py index 2eb3ae226c9..add0619a3e8 100644 --- a/var/spack/repos/builtin/packages/axom/package.py +++ b/var/spack/repos/builtin/packages/axom/package.py @@ -231,7 +231,9 @@ def hostconfig(self, spec, prefix): if fflags: cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags)) - if ("gfortran" in f_compiler) and ("clang" in cpp_compiler): + if ((f_compiler is not None) + and ("gfortran" in f_compiler) + and ("clang" in cpp_compiler)): libdir = pjoin(os.path.dirname( os.path.dirname(cpp_compiler)), "lib") flags = "" @@ -444,7 +446,7 @@ def hostconfig(self, spec, prefix): # Override XL compiler family familymsg = ("Override to proper compiler family for XL") - if "xlf" in f_compiler: + if (f_compiler is not None) and ("xlf" in f_compiler): cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER_ID", "XL", familymsg)) if "xlc" in c_compiler: @@ -455,7 +457,7 @@ def hostconfig(self, spec, prefix): familymsg)) if spec.satisfies('target=ppc64le:'): - if "xlf" in f_compiler: + if (f_compiler is not None) and ("xlf" in f_compiler): description = ("Converts C-style comments to Fortran style " "in preprocessed files") cfg.write(cmake_cache_entry("BLT_FORTRAN_FLAGS", diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py index 9928884e924..b8b23bccbee 100644 --- a/var/spack/repos/builtin/packages/conduit/package.py +++ b/var/spack/repos/builtin/packages/conduit/package.py @@ -371,7 +371,9 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None): if fflags: cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags)) - if ("gfortran" in f_compiler) and ("clang" in cpp_compiler): + if ((f_compiler is not None) + and ("gfortran" in f_compiler) + and ("clang" in cpp_compiler)): libdir = os.path.join(os.path.dirname( os.path.dirname(f_compiler)), "lib") flags = "" From c7f6608f5ecdb165e21622b56ab9163c8d8d238a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 20 Jun 2020 17:46:10 -0500 Subject: [PATCH 775/802] NumPy: add v1.19.0 (#17183) --- var/spack/repos/builtin/packages/py-numpy/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 4659a449ebf..f437b43063c 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -16,7 +16,7 @@ class PyNumpy(PythonPackage): number capabilities""" homepage = "https://numpy.org/" - url = "https://pypi.io/packages/source/n/numpy/numpy-1.18.5.zip" + url = "https://pypi.io/packages/source/n/numpy/numpy-1.19.0.zip" git = "https://github.com/numpy/numpy.git" maintainers = ['adamjstewart'] @@ -30,6 +30,7 @@ class PyNumpy(PythonPackage): ] version('master', branch='master') + version('1.19.0', sha256='76766cc80d6128750075378d3bb7812cf146415bd29b588616f72c943c00d598') version('1.18.5', sha256='34e96e9dae65c4839bd80012023aadd6ee2ccb73ce7fdf3074c62f301e63120b') version('1.18.4', sha256='bbcc85aaf4cd84ba057decaead058f43191cc0e30d6bc5d44fe336dc3d3f4509') version('1.18.3', sha256='e46e2384209c91996d5ec16744234d1c906ab79a701ce1a26155c9ec890b8dc8') @@ -82,6 +83,7 @@ class PyNumpy(PythonPackage): depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) depends_on('python@2.7:2.8,3.5:', type=('build', 'run'), when='@1.16:') depends_on('python@3.5:', type=('build', 'run'), when='@1.17:') + depends_on('python@3.6:', type=('build', 'run'), when='@1.19:') depends_on('py-setuptools', type='build') # Check pyproject.toml for updates to the required cython version depends_on('py-cython@0.29.13:', when='@1.18.0:', type='build') @@ -91,6 +93,7 @@ class PyNumpy(PythonPackage): depends_on('py-nose@1.0.0:', when='@:1.14', type='test') depends_on('py-pytest', when='@1.15:', type='test') + depends_on('py-hypothesis', when='@1.19:', type='test') # Allows you to specify order of BLAS/LAPACK preference # https://github.com/numpy/numpy/pull/13132 From 4bfa844de08e1b786ed3d09fb403fb4b645c6fef Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 22 Jun 2020 01:20:04 -0500 Subject: [PATCH 776/802] SciPy: add v1.5.0 (#17189) --- var/spack/repos/builtin/packages/py-scipy/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index 7baf0bbb38a..6775d533fa8 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -12,7 +12,7 @@ class PyScipy(PythonPackage): as routines for numerical integration and optimization.""" homepage = "https://www.scipy.org/" - url = "https://pypi.io/packages/source/s/scipy/scipy-1.4.1.tar.gz" + url = "https://pypi.io/packages/source/s/scipy/scipy-1.5.0.tar.gz" maintainers = ['adamjstewart'] install_time_test_callbacks = ['install_test', 'import_module_test'] @@ -30,6 +30,7 @@ class PyScipy(PythonPackage): 'scipy.sparse.linalg.eigen.lobpcg', 'scipy.special._precompute' ] + version('1.5.0', sha256='4ff72877d19b295ee7f7727615ea8238f2d59159df0bdd98f91754be4a2767f0') version('1.4.1', sha256='dee1bbf3a6c8f73b6b218cb28eed8dd13347ea2f87d572ce19b289d6fd3fbc59') version('1.4.0', sha256='31f7cfa93b01507c935c12b535e24812594002a02a56803d7cd063e9920d25e8') version('1.3.3', sha256='64bf4e8ae0db2d42b58477817f648d81e77f0b381d0ea4427385bba3f959380a') @@ -50,14 +51,17 @@ class PyScipy(PythonPackage): depends_on('python@2.6:2.8,3.2:', type=('build', 'run')) depends_on('python@2.7:2.8,3.4:', when='@0.18:', type=('build', 'run')) depends_on('python@3.5:', when='@1.3:', type=('build', 'run')) + depends_on('python@3.6:', when='@1.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') - depends_on('py-pybind11@2.4.0:', when='@1.4.1:', type='build') depends_on('py-pybind11@2.2.4:', when='@1.4.0:', type='build') + depends_on('py-pybind11@2.4.0:', when='@1.4.1:', type='build') + depends_on('py-pybind11@2.4.3:', when='@1.5.0:', type='build') depends_on('py-numpy@1.5.1:+blas+lapack', type=('build', 'run')) depends_on('py-numpy@1.6.2:+blas+lapack', when='@0.16:', type=('build', 'run')) depends_on('py-numpy@1.7.1:+blas+lapack', when='@0.18:', type=('build', 'run')) depends_on('py-numpy@1.8.2:+blas+lapack', when='@0.19:', type=('build', 'run')) depends_on('py-numpy@1.13.3:+blas+lapack', when='@1.3:', type=('build', 'run')) + depends_on('py-numpy@1.14.5:+blas+lapack', when='@1.5:', type=('build', 'run')) depends_on('py-pytest', type='test') # NOTE: scipy picks up Blas/Lapack from numpy, see From 0cddfb9d8a203f6d319480869f95f3e06f88dd07 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 22 Jun 2020 08:30:17 +0200 Subject: [PATCH 777/802] meson: added v0.54.3 (#17190) --- var/spack/repos/builtin/packages/meson/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/meson/package.py b/var/spack/repos/builtin/packages/meson/package.py index 39971c7076c..8ff3ddf32e0 100644 --- a/var/spack/repos/builtin/packages/meson/package.py +++ b/var/spack/repos/builtin/packages/meson/package.py @@ -16,6 +16,7 @@ class Meson(PythonPackage): maintainers = ['michaelkuhn'] + version('0.54.3', sha256='c25caff342b5368bfe33fab6108f454fcf12e2f2cef70817205872ddef669e8b') version('0.54.2', sha256='85cafdc70ae7d1d9d506e7356b917c649c4df2077bd6a0382db37648aa4ecbdb') version('0.54.1', sha256='854e8b94ab36e5aece813d2b2aee8a639bd52201dfea50890722ac9128e2f59e') version('0.54.0', sha256='95efdbaa7cb3e915ab9a7b26b1412475398fdc3e834842a780f1646c7764f2d9') From e91d7988e5ef9b582fd7dcf37eed2eb9f9d1e11a Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 22 Jun 2020 00:36:01 -0600 Subject: [PATCH 778/802] votca-*: added v1.6.1 (#17186) --- .../repos/builtin/packages/votca-csg-tutorials/package.py | 4 +++- var/spack/repos/builtin/packages/votca-csg/package.py | 4 +++- var/spack/repos/builtin/packages/votca-csgapps/package.py | 4 +++- var/spack/repos/builtin/packages/votca-tools/package.py | 1 + var/spack/repos/builtin/packages/votca-xtp/package.py | 4 +++- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py b/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py index b20c767fce7..4b54e4b9aa5 100644 --- a/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py +++ b/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py @@ -22,12 +22,14 @@ class VotcaCsgTutorials(CMakePackage): version('master', branch='master') version('stable', branch='stable') + version('1.6.1', sha256='d8428c4a03ce42d88317045ec555af3defa022fd9a61f05e07b57c5577288c8c') version('1.6', sha256='54946c647724f1beb95942d47ec7f4cf7a95a59ec7268522693d5ec723585daf') version('1.5.1', sha256='e35cea92df0e7d05ca7b449c1b5d84d887a3a23c7796abe3b84e4d6feec7faca') version('1.5', sha256='03b841fb94129cf59781a7a5e3b71936c414aa9dfa17a50d7bc856d46274580c') version('1.4.1', sha256='623724192c3a7d76b603a74a3326f181045f10f38b9f56dce754a90f1a74556e') version('1.4', sha256='27d50acd68a9d8557fef18ec2b0c62841ae91c22275ab9afbd65c35e4dd5f719') - for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master", "stable"]: + for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "1.6.1", "master", + "stable"]: depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") diff --git a/var/spack/repos/builtin/packages/votca-csg/package.py b/var/spack/repos/builtin/packages/votca-csg/package.py index deffd257397..f6b43266e56 100644 --- a/var/spack/repos/builtin/packages/votca-csg/package.py +++ b/var/spack/repos/builtin/packages/votca-csg/package.py @@ -22,6 +22,7 @@ class VotcaCsg(CMakePackage): version('master', branch='master') version('stable', branch='stable') + version('1.6.1', sha256='ed12bcb1ccdf71f54e21cdcc9803add4b8ebdc6b8263cb5b0034f5db01e31dbb') version('1.6', sha256='8cf6a4ac3ef7347c720a44d8a676f8cbd1462e162f6113de39f27b89354465ea') version('1.5.1', sha256='7fca1261bd267bf38d2edd26259730fed3126c0c3fd91fb81940dbe17bb568fd') version('1.5', sha256='160387cdc51f87dd20ff2e2eed97086beee415d48f3c92f4199f6109068c8ff4') @@ -29,7 +30,8 @@ class VotcaCsg(CMakePackage): version('1.4', sha256='c13e7febd792de8c3d426203f089bd4d33b8067f9db5e8840e4579c88b61146e') depends_on("cmake@2.8:", type='build') - for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master", "stable"]: + for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "1.6.1", "master", + "stable"]: depends_on('votca-tools@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") depends_on("gromacs~mpi@5.1:2019.9999") diff --git a/var/spack/repos/builtin/packages/votca-csgapps/package.py b/var/spack/repos/builtin/packages/votca-csgapps/package.py index dcca20339c5..ad12a83b2a4 100644 --- a/var/spack/repos/builtin/packages/votca-csgapps/package.py +++ b/var/spack/repos/builtin/packages/votca-csgapps/package.py @@ -22,12 +22,14 @@ class VotcaCsgapps(CMakePackage): version('master', branch='master') version('stable', branch='stable') + version('1.6.1', sha256='03c7cef2a76e73cf953b2b5ea2cdca765ec1a2627d0a9d8869d46166e63d197c') version('1.6', sha256='084bbc5b179bb7eb8f6671d2d5fa13e69e68946570c9120a7e4b10aff1866e2e') version('1.5.1', sha256='b4946711e88a1745688b6cce5aad872e6e2ea200fededf38d77a864883e3750e') version('1.5', sha256='18b40ce6222509bc70aa9d56b8c538cd5903edf7294d6f95530668e555206d5b') version('1.4.1', sha256='095d9ee4cd49d2fd79c10e0e84e6890b755e54dec6a5cd580a2b4241ba230a2b') version('1.4', sha256='4ea8348c2f7de3cc488f48fbd8652e69b52515441952766c06ff67ed1aaf69a0') - for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "master", "stable"]: + for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "1.6.1", "master", + "stable"]: depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") diff --git a/var/spack/repos/builtin/packages/votca-tools/package.py b/var/spack/repos/builtin/packages/votca-tools/package.py index 09f8e5aab69..f676fb633b6 100644 --- a/var/spack/repos/builtin/packages/votca-tools/package.py +++ b/var/spack/repos/builtin/packages/votca-tools/package.py @@ -22,6 +22,7 @@ class VotcaTools(CMakePackage): version('master', branch='master') version('stable', branch='stable') + version('1.6.1', sha256='3e8f51d484cb3fdfbeb851aab387807ba4c40aecef8317c90182da68ad282dcc') version('1.6', sha256='cfd0fedc80fecd009f743b5df47777508d76bf3ef294a508a9f11fbb42efe9a5') version('1.5.1', sha256='4be4fe25a2910e24e1720cd9022d214001d38196033ade8f9d6e618b4f47d5c4') version('1.5', sha256='a82a6596c24ff06e79eab17ca02f4405745ceeeb66369693a59023ad0b62cf22') diff --git a/var/spack/repos/builtin/packages/votca-xtp/package.py b/var/spack/repos/builtin/packages/votca-xtp/package.py index 21cfdf4edb1..98c546c069b 100644 --- a/var/spack/repos/builtin/packages/votca-xtp/package.py +++ b/var/spack/repos/builtin/packages/votca-xtp/package.py @@ -22,13 +22,15 @@ class VotcaXtp(CMakePackage): version('master', branch='master') version('stable', branch='stable') + version('1.6.1', sha256='886af50bc12457bbafb06dc927b7fd4cadc3db1b4615b24a08953f6b358debef') version('1.6', sha256='695c2d9d3f924103481529f992e3723bdce10b8edfc294421a849cdf51dbbb6e') version('1.5.1', sha256='17a7722e5a32d236e4f1f6f88b680da4ba5f52bcf65bca3687c6a1c731d10881') version('1.5', sha256='b40b6d19e13f0650e84b8beebe86ce5c09071624f18d66df826f9d8584b4d3c8') version('1.4.1', sha256='4b53d371d6cf648c9e9e9bd1f104d349cafeaf10a02866e3f1d05c574b595a21') depends_on("cmake@2.8:", type='build') - for v in ["1.4.1", "1.5", "1.5.1", "1.6", "master", "stable"]: + for v in ["1.4.1", "1.5", "1.5.1", "1.6", "1.6.1", "master", + "stable"]: depends_on('votca-tools@%s' % v, when="@%s:%s.0" % (v, v)) depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("libxc", when='@stable,1.5:') From 73b3bbbd22592e47720b0e5f5580a4e3671067e7 Mon Sep 17 00:00:00 2001 From: Hans Pabst Date: Mon, 22 Jun 2020 08:36:46 +0200 Subject: [PATCH 779/802] libxsmm: added v1.16 (#17185) --- var/spack/repos/builtin/packages/libxsmm/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libxsmm/package.py b/var/spack/repos/builtin/packages/libxsmm/package.py index 12cfc32dfd2..caf6681e47b 100644 --- a/var/spack/repos/builtin/packages/libxsmm/package.py +++ b/var/spack/repos/builtin/packages/libxsmm/package.py @@ -14,10 +14,11 @@ class Libxsmm(MakefilePackage): and deep learning primitives.""" homepage = 'https://github.com/hfp/libxsmm' - url = 'https://github.com/hfp/libxsmm/archive/1.15.tar.gz' + url = 'https://github.com/hfp/libxsmm/archive/1.16.tar.gz' git = 'https://github.com/hfp/libxsmm.git' version('master', branch='master') + version('1.16', sha256='4f4f2ad97815413af80821d2e306eb6f00541941ad412662da05c02361a20e07') version('1.15', sha256='499e5adfbf90cd3673309243c2b56b237d54f86db2437e1ac06c8746b55ab91c') version('1.14', sha256='9c0af4509ea341d1ee2c6c19fc6f19289318c3bd4b17844efeb9e7f9691abf76') version('1.13', sha256='47c034e169820a9633770eece0e0fdd8d4a744e09b81da2af8c2608a4625811e') From 0b74285a14eb84e897906b8948bea4dddbfba2e9 Mon Sep 17 00:00:00 2001 From: iarspider Date: Mon, 22 Jun 2020 08:52:19 +0200 Subject: [PATCH 780/802] py-pyheadtail: added new package at v1.14.1 (#17159) Co-authored-by: iarspider --- .../builtin/packages/py-pyheadtail/package.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pyheadtail/package.py diff --git a/var/spack/repos/builtin/packages/py-pyheadtail/package.py b/var/spack/repos/builtin/packages/py-pyheadtail/package.py new file mode 100644 index 00000000000..811bf63b4b0 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pyheadtail/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPyheadtail(PythonPackage): + """CERN PyHEADTAIL numerical n-body simulation code for simulating + macro-particle beam dynamics with collective effects.""" + + homepage = "https://github.com/PyCOMPLETE/PyHEADTAIL" + url = "https://pypi.io/packages/source/P/PyHEADTAIL/PyHEADTAIL-1.14.1.tar.gz" + + version('1.14.1', sha256='bf90ac7e8764176c55e82c363cad7ab43543863b6ef482760ced23b78e917bb4') + version('1.13.1', sha256='29c742573a918126b5a9c21806ee0ec6a34ec642a0e6ad200f6d4551bf1bb310') + + depends_on('python', type=('build', 'run')) + depends_on('python@3:', when='@1.13.5:', type=('build', 'run')) + depends_on('py-cython', type='build') + depends_on('py-numpy', type=('build', 'run')) + depends_on('py-scipy', type=('build', 'run')) + depends_on('py-h5py', type=('build', 'run')) From 3fc963b1f919baa46f5f6f15bb1ca19f2404f600 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 22 Jun 2020 02:31:57 -0500 Subject: [PATCH 781/802] delphes: better specify the dependency on root (#17175) Compiling delphes with default root cxxstd=11 fails, see e.g. https://sft.its.cern.ch/jira/si/jira.issueviews:issue-html/ROOT-9492/ROOT-9492.html --- var/spack/repos/builtin/packages/delphes/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/delphes/package.py b/var/spack/repos/builtin/packages/delphes/package.py index 723182f616f..b3b511a00fa 100644 --- a/var/spack/repos/builtin/packages/delphes/package.py +++ b/var/spack/repos/builtin/packages/delphes/package.py @@ -39,7 +39,8 @@ class Delphes(CMakePackage): version('3.0.5', sha256='ab64ec6d2476fbfa40562e7edb510a8ab4c4fe5be77a4353ebf315c2af181a80') depends_on('cmake', type='build') - depends_on('root') + depends_on('root cxxstd=14', when='cxxstd=14') + depends_on('root cxxstd=17', when='cxxstd=17') variant('build_type', default='Release', description='The build type to build', From 0d08e18df5106a276543e1eb058d42e7f7dff88d Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Mon, 22 Jun 2020 00:32:55 -0700 Subject: [PATCH 782/802] Minor cleanup for conduit and hydrogen (#17136) * Fix how the Conduit detects that the MPI compiler is the same as the CC compiler and is more careful when it sets the MPI compilers to be the Cray PE system compilers. * Remove unnecessary push of the MPI compilers to the C compilers for Hydrogen. --- var/spack/repos/builtin/packages/conduit/package.py | 2 +- var/spack/repos/builtin/packages/hydrogen/package.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py index b8b23bccbee..8481ddce82f 100644 --- a/var/spack/repos/builtin/packages/conduit/package.py +++ b/var/spack/repos/builtin/packages/conduit/package.py @@ -469,7 +469,7 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None): # use those for mpi wrappers, b/c spec['mpi'].mpicxx # etc make return the spack compiler wrappers # which can trip up mpi detection in CMake 3.14 - if cpp_compiler == "CC": + if spec['mpi'].mpicc == spack_cc: mpicc_path = "cc" mpicxx_path = "CC" mpifc_path = "ftn" diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index c28d0872d90..449fe046dc5 100644 --- a/var/spack/repos/builtin/packages/hydrogen/package.py +++ b/var/spack/repos/builtin/packages/hydrogen/package.py @@ -117,9 +117,6 @@ def cmake_args(self): args = [ '-DCMAKE_INSTALL_MESSAGE:STRING=LAZY', - '-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc, - '-DCMAKE_CXX_COMPILER=%s' % spec['mpi'].mpicxx, - '-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc, '-DBUILD_SHARED_LIBS:BOOL=%s' % ('+shared' in spec), '-DHydrogen_ENABLE_OPENMP:BOOL=%s' % ('+hybrid' in spec), '-DHydrogen_ENABLE_QUADMATH:BOOL=%s' % ('+quad' in spec), From a76545b813d2c7f0e7c174cf1f78755b137e0f60 Mon Sep 17 00:00:00 2001 From: darmac Date: Mon, 22 Jun 2020 19:37:26 +0800 Subject: [PATCH 783/802] dos2unix: add build dependency on gettext (#17191) --- var/spack/repos/builtin/packages/dos2unix/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/dos2unix/package.py b/var/spack/repos/builtin/packages/dos2unix/package.py index 926bc5f65f5..8630b8369aa 100644 --- a/var/spack/repos/builtin/packages/dos2unix/package.py +++ b/var/spack/repos/builtin/packages/dos2unix/package.py @@ -14,5 +14,7 @@ class Dos2unix(MakefilePackage): version('7.3.4', sha256='8ccda7bbc5a2f903dafd95900abb5bf5e77a769b572ef25150fde4056c5f30c5') + depends_on('gettext', type='build') + def install(self, spec, prefix): make('prefix={0}'.format(prefix), 'install') From 54cfec025f084632be28f2a9166df0028069dc82 Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Mon, 22 Jun 2020 08:21:46 -0400 Subject: [PATCH 784/802] blaspp: moved to new git repo (#17184) Extended the list of maintainers --- var/spack/repos/builtin/packages/blaspp/package.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/blaspp/package.py b/var/spack/repos/builtin/packages/blaspp/package.py index 702c33a51fc..bcc5e80292a 100644 --- a/var/spack/repos/builtin/packages/blaspp/package.py +++ b/var/spack/repos/builtin/packages/blaspp/package.py @@ -7,14 +7,15 @@ class Blaspp(CMakePackage): - """BLAS++: C++ API for the Basic Linear Algebra Subroutines (University of - Texas).""" + """C++ API for the Basic Linear Algebra Subroutines. Developed by the + Innovative Computing Laboratory at the University of Tennessee, + Knoxville.""" homepage = "https://bitbucket.org/icl/blaspp" - hg = "https://bitbucket.org/icl/blaspp" - maintainers = ['teonnik', 'Sely85'] + git = "https://bitbucket.org/icl/blaspp" + maintainers = ['teonnik', 'Sely85', 'G-Ragghianti', 'mgates3'] - version('develop', hg=hg, revision="5191c9d") + version('develop', commit='6293d96') variant('gfort', default=False, From 4e9a98997aea9365fc46c4503d813947cbead088 Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Mon, 22 Jun 2020 06:22:14 -0700 Subject: [PATCH 785/802] Added 8.0 RC to the versions (#17176) --- var/spack/repos/builtin/packages/cudnn/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/cudnn/package.py b/var/spack/repos/builtin/packages/cudnn/package.py index 74f5133d901..f0e8904e346 100644 --- a/var/spack/repos/builtin/packages/cudnn/package.py +++ b/var/spack/repos/builtin/packages/cudnn/package.py @@ -22,6 +22,16 @@ class Cudnn(Package): maintainers = ['adamjstewart'] + # cuDNN 8.0 + version('8.0.0.180-11.0-linux-x64', + sha256='9e75ea70280a77de815e0bdc85d08b67e081bc99a708b574092142344d2ba07e') + version('8.0.0.180-11.0-linux-ppc64le', + sha256='1229e94731bbca63ee7f5a239f4e1838a51a301d896f3097fbf7377d74704060') + version('8.0.0.180-10.2-linux-x64', + sha256='0c87c12358ee2b99d57c2a8c7560e3bb93e54bb929f5f8bec4964a72a2bb261d') + version('8.0.0.180-10.2-linux-ppc64le', + sha256='59e4ad6db15fcc374976e8052fe39e3f30f34079710fb3c7751a64c853d9243f') + # cuDNN 7.6.5 version('7.6.5.32-10.2-linux-x64', sha256='600267f2caaed2fd58eb214ba669d8ea35f396a7d19b94822e6b36f9f7088c20', From 42f2c168d2374a041d9bbe7b2246a8cae56bb369 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Mon, 22 Jun 2020 08:44:29 -0700 Subject: [PATCH 786/802] swig: fix older builds on newer platforms by updating config files (#16854) * swig: revise 'autotools' automated 'config.*' update mechanism to support 'config.sub' and adapt 'swig' accordingly --- lib/spack/spack/build_systems/autotools.py | 137 ++++++++++-------- .../repos/builtin/packages/swig/package.py | 3 + 2 files changed, 82 insertions(+), 58 deletions(-) diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index bb17cce46ce..72a2c0afbb0 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -57,8 +57,9 @@ class AutotoolsPackage(PackageBase): #: This attribute is used in UI queries that need to know the build #: system base class build_system_class = 'AutotoolsPackage' - #: Whether or not to update ``config.guess`` on old architectures - patch_config_guess = True + #: Whether or not to update ``config.guess`` and ``config.sub`` on old + #: architectures + patch_config_files = True #: Whether or not to update ``libtool`` #: (currently only for Arm/Clang/Fujitsu compilers) patch_libtool = True @@ -87,72 +88,92 @@ def archive_files(self): return [os.path.join(self.build_directory, 'config.log')] @run_after('autoreconf') - def _do_patch_config_guess(self): - """Some packages ship with an older config.guess and need to have - this updated when installed on a newer architecture. In particular, - config.guess fails for PPC64LE for version prior to a 2013-06-10 - build date (automake 1.13.4) and for ARM (aarch64).""" + def _do_patch_config_files(self): + """Some packages ship with older config.guess/config.sub files and + need to have these updated when installed on a newer architecture. + In particular, config.guess fails for PPC64LE for version prior + to a 2013-06-10 build date (automake 1.13.4) and for ARM (aarch64).""" - if not self.patch_config_guess or ( + if not self.patch_config_files or ( not self.spec.satisfies('target=ppc64le:') and not self.spec.satisfies('target=aarch64:') ): return - my_config_guess = None - config_guess = None - if os.path.exists('config.guess'): - # First search the top-level source directory - my_config_guess = 'config.guess' + + # TODO: Expand this to select the 'config.sub'-compatible architecture + # for each platform (e.g. 'config.sub' doesn't accept 'power9le', but + # does accept 'ppc64le'). + if self.spec.satisfies('target=ppc64le:'): + config_arch = 'ppc64le' + elif self.spec.satisfies('target=aarch64:'): + config_arch = 'aarch64' else: - # Then search in all sub directories. - # We would like to use AC_CONFIG_AUX_DIR, but not all packages - # ship with their configure.in or configure.ac. - d = '.' - dirs = [os.path.join(d, o) for o in os.listdir(d) - if os.path.isdir(os.path.join(d, o))] - for dirname in dirs: - path = os.path.join(dirname, 'config.guess') + config_arch = 'local' + + my_config_files = {'guess': None, 'sub': None} + config_files = {'guess': None, 'sub': None} + config_args = {'guess': [], 'sub': [config_arch]} + + for config_name in config_files.keys(): + config_file = 'config.{0}'.format(config_name) + if os.path.exists(config_file): + # First search the top-level source directory + my_config_files[config_name] = config_file + else: + # Then search in all sub directories recursively. + # We would like to use AC_CONFIG_AUX_DIR, but not all packages + # ship with their configure.in or configure.ac. + config_path = next((os.path.join(r, f) + for r, ds, fs in os.walk('.') for f in fs + if f == config_file), None) + my_config_files[config_name] = config_path + + if my_config_files[config_name] is not None: + try: + config_path = my_config_files[config_name] + check_call([config_path] + config_args[config_name], + stdout=PIPE, stderr=PIPE) + # The package's config file already runs OK, so just use it + continue + except Exception as e: + tty.debug(e) + else: + continue + + # Look for a spack-installed automake package + if 'automake' in self.spec: + automake_dir = 'automake-' + str(self.spec['automake'].version) + automake_path = os.path.join(self.spec['automake'].prefix, + 'share', automake_dir) + path = os.path.join(automake_path, config_file) if os.path.exists(path): - my_config_guess = path + config_files[config_name] = path + # Look for the system's config.guess + if (config_files[config_name] is None and + os.path.exists('/usr/share')): + automake_dir = [s for s in os.listdir('/usr/share') if + "automake" in s] + if automake_dir: + automake_path = os.path.join('/usr/share', automake_dir[0]) + path = os.path.join(automake_path, config_file) + if os.path.exists(path): + config_files[config_name] = path + if config_files[config_name] is not None: + try: + config_path = config_files[config_name] + my_config_path = my_config_files[config_name] - if my_config_guess is not None: - try: - check_call([my_config_guess], stdout=PIPE, stderr=PIPE) - # The package's config.guess already runs OK, so just use it - return - except Exception as e: - tty.debug(e) - else: - return + check_call([config_path] + config_args[config_name], + stdout=PIPE, stderr=PIPE) - # Look for a spack-installed automake package - if 'automake' in self.spec: - automake_path = os.path.join(self.spec['automake'].prefix, 'share', - 'automake-' + - str(self.spec['automake'].version)) - path = os.path.join(automake_path, 'config.guess') - if os.path.exists(path): - config_guess = path - # Look for the system's config.guess - if config_guess is None and os.path.exists('/usr/share'): - automake_dir = [s for s in os.listdir('/usr/share') if - "automake" in s] - if automake_dir: - automake_path = os.path.join('/usr/share', automake_dir[0]) - path = os.path.join(automake_path, 'config.guess') - if os.path.exists(path): - config_guess = path - if config_guess is not None: - try: - check_call([config_guess], stdout=PIPE, stderr=PIPE) - mod = os.stat(my_config_guess).st_mode & 0o777 | stat.S_IWUSR - os.chmod(my_config_guess, mod) - shutil.copyfile(config_guess, my_config_guess) - return - except Exception as e: - tty.debug(e) + m = os.stat(my_config_path).st_mode & 0o777 | stat.S_IWUSR + os.chmod(my_config_path, m) + shutil.copyfile(config_path, my_config_path) + continue + except Exception as e: + tty.debug(e) - raise RuntimeError('Failed to find suitable config.guess') + raise RuntimeError('Failed to find suitable ' + config_file) @run_before('configure') def _set_autotools_environment_variables(self): diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index c6c9824a63a..59a535fb745 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -43,6 +43,9 @@ class Swig(AutotoolsPackage, SourceforgePackage): depends_on('autoconf', type='build', when=_version) depends_on('automake', type='build', when=_version) depends_on('libtool', type='build', when=_version) + # Need newer 'automake' to support newer platforms + for _target in ['ppc64le', 'aarch64']: + depends_on('automake@1.15:', type='build', when='target={0}:'.format(_target)) depends_on('pkgconfig', type='build') build_directory = 'spack-build' From 224dc951597253f426f16132eab43701a9f1c53e Mon Sep 17 00:00:00 2001 From: Omar Padron Date: Mon, 22 Jun 2020 13:19:47 -0400 Subject: [PATCH 787/802] Pre ci optimization (#16372) * add initial optimization script * integrate optimization in spack ci * make optimization opt-in * fix import error * flake8 fixes * update command completion * work around vermin errors * fix sphynx errors --- lib/spack/spack/ci.py | 8 +- lib/spack/spack/ci_optimization.py | 377 +++++++++++++++++++++++++++++ lib/spack/spack/cmd/ci.py | 9 +- share/spack/spack-completion.bash | 2 +- 4 files changed, 393 insertions(+), 3 deletions(-) create mode 100644 lib/spack/spack/ci_optimization.py diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index 9ba7f39e455..ce74abf29cc 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -449,7 +449,8 @@ def format_job_needs(phase_name, strip_compilers, dep_jobs, def generate_gitlab_ci_yaml(env, print_summary, output_file, - custom_spack_repo=None, custom_spack_ref=None): + custom_spack_repo=None, custom_spack_ref=None, + run_optimizer=False): # FIXME: What's the difference between one that opens with 'spack' # and one that opens with 'env'? This will only handle the former. with spack.concretize.disable_compiler_existence_check(): @@ -788,6 +789,11 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file, for output_key, output_value in sorted(output_object.items()): sorted_output[output_key] = output_value + # TODO(opadron): remove this or refactor + if run_optimizer: + import spack.ci_optimization as ci_opt + sorted_output = ci_opt.optimizer(sorted_output) + with open(output_file, 'w') as outf: outf.write(syaml.dump_config(sorted_output, default_flow_style=True)) diff --git a/lib/spack/spack/ci_optimization.py b/lib/spack/spack/ci_optimization.py new file mode 100644 index 00000000000..693802d06d5 --- /dev/null +++ b/lib/spack/spack/ci_optimization.py @@ -0,0 +1,377 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import collections + +try: + # dynamically import to keep vermin from complaining + collections_abc = __import__('collections.abc') +except ImportError: + collections_abc = collections + +import copy +import hashlib + +import spack.util.spack_yaml as syaml + + +def matches(obj, proto): + """Returns True if the test object "obj" matches the prototype object + "proto". + + If obj and proto are mappings, obj matches proto if (key in obj) and + (obj[key] matches proto[key]) for every key in proto. + + If obj and proto are sequences, obj matches proto if they are of the same + length and (a matches b) for every (a,b) in zip(obj, proto). + + Otherwise, obj matches proto if obj == proto. + + Precondition: proto must not have any reference cycles + """ + if isinstance(obj, collections_abc.Mapping): + if not isinstance(proto, collections_abc.Mapping): + return False + + return all( + (key in obj and matches(obj[key], val)) + for key, val in proto.items() + ) + + if (isinstance(obj, collections_abc.Sequence) and + not isinstance(obj, str)): + + if not (isinstance(proto, collections_abc.Sequence) and + not isinstance(proto, str)): + return False + + if len(obj) != len(proto): + return False + + return all( + matches(obj[index], val) + for index, val in enumerate(proto) + ) + + return obj == proto + + +def subkeys(obj, proto): + """Returns the test mapping "obj" after factoring out the items it has in + common with the prototype mapping "proto". + + Consider a recursive merge operation, merge(a, b) on mappings a and b, that + returns a mapping, m, whose keys are the union of the keys of a and b, and + for every such key, "k", its corresponding value is: + + - merge(a[key], b[key]) if a[key] and b[key] are mappings, or + - b[key] if (key in b) and not matches(a[key], b[key]), + or + - a[key] otherwise + + + If obj and proto are mappings, the returned object is the smallest object, + "a", such that merge(a, proto) matches obj. + + Otherwise, obj is returned. + """ + if not (isinstance(obj, collections_abc.Mapping) and + isinstance(proto, collections_abc.Mapping)): + return obj + + new_obj = {} + for key, value in obj.items(): + if key not in proto: + new_obj[key] = value + continue + + if (matches(value, proto[key]) and + matches(proto[key], value)): + continue + + if isinstance(value, collections_abc.Mapping): + new_obj[key] = subkeys(value, proto[key]) + continue + + new_obj[key] = value + + return new_obj + + +def add_extends(yaml, key): + """Modifies the given object "yaml" so that it includes an "extends" key + whose value features "key". + + If "extends" is not in yaml, then yaml is modified such that + yaml["extends"] == key. + + If yaml["extends"] is a str, then yaml is modified such that + yaml["extends"] == [yaml["extends"], key] + + If yaml["extends"] is a list that does not include key, then key is + appended to the list. + + Otherwise, yaml is left unchanged. + """ + + has_key = ('extends' in yaml) + extends = yaml.get('extends') + + if has_key and not isinstance(extends, (str, collections_abc.Sequence)): + return + + if extends is None: + yaml['extends'] = key + return + + if isinstance(extends, str): + if extends != key: + yaml['extends'] = [extends, key] + return + + if key not in extends: + extends.append(key) + + +def common_subobject(yaml, sub): + """Factor prototype object "sub" out of the values of mapping "yaml". + + Consider a modified copy of yaml, "new", where for each key, "key" in yaml: + + - If yaml[key] matches sub, then new[key] = subkeys(yaml[key], sub). + - Otherwise, new[key] = yaml[key]. + + If the above match criteria is not satisfied for any such key, then (yaml, + None) is returned. The yaml object is returned unchanged. + + Otherwise, each matching value in new is modified as in + add_extends(new[key], common_key), and then new[common_key] is set to sub. + The common_key value is chosen such that it does not match any preexisting + key in new. In this case, (new, common_key) is returned. + """ + match_list = set(k for k, v in yaml.items() if matches(v, sub)) + + if not match_list: + return yaml, None + + common_prefix = '.c' + common_index = 0 + + while True: + common_key = ''.join((common_prefix, str(common_index))) + if common_key not in yaml: + break + common_index += 1 + + new_yaml = {} + + for key, val in yaml.items(): + new_yaml[key] = copy.deepcopy(val) + + if not matches(val, sub): + continue + + new_yaml[key] = subkeys(new_yaml[key], sub) + add_extends(new_yaml[key], common_key) + + new_yaml[common_key] = sub + + return new_yaml, common_key + + +def print_delta(name, old, new, applied=None): + delta = new - old + reldelta = (1000 * delta) // old + reldelta = (reldelta // 10, reldelta % 10) + + if applied is None: + applied = (new <= old) + + print('\n'.join(( + '{} {}:', + ' before: {: 10d}', + ' after : {: 10d}', + ' delta : {:+10d} ({:=+3d}.{}%)', + )).format( + name, + ('+' if applied else 'x'), + old, + new, + delta, + reldelta[0], + reldelta[1] + )) + + +def try_optimization_pass(name, yaml, optimization_pass, *args, **kwargs): + """Try applying an optimization pass and return information about the + result + + "name" is a string describing the nature of the pass. If it is a non-empty + string, summary statistics are also printed to stdout. + + "yaml" is the object to apply the pass to. + + "optimization_pass" is the function implementing the pass to be applied. + + "args" and "kwargs" are the additional arguments to pass to optimization + pass. The pass is applied as + + >>> (new_yaml, *other_results) = optimization_pass(yaml, *args, **kwargs) + + The pass's results are greedily rejected if it does not modify the original + yaml document, or if it produces a yaml document that serializes to a + larger string. + + Returns (new_yaml, yaml, applied, other_results) if applied, or + (yaml, new_yaml, applied, other_results) otherwise. + """ + result = optimization_pass(yaml, *args, **kwargs) + new_yaml, other_results = result[0], result[1:] + + if new_yaml is yaml: + # pass was not applied + return (yaml, new_yaml, False, other_results) + + pre_size = len(syaml.dump_config(yaml, default_flow_style=True)) + post_size = len(syaml.dump_config(new_yaml, default_flow_style=True)) + + # pass makes the size worse: not applying + applied = (post_size <= pre_size) + if applied: + yaml, new_yaml = new_yaml, yaml + + if name: + print_delta(name, pre_size, post_size, applied) + + return (yaml, new_yaml, applied, other_results) + + +def build_histogram(iterator, key): + """Builds a histogram of values given an iterable of mappings and a key. + + For each mapping "m" with key "key" in iterator, the value m[key] is + considered. + + Returns a list of tuples (hash, count, proportion, value), where + + - "hash" is a sha1sum hash of the value. + - "count" is the number of occurences of values that hash to "hash". + - "proportion" is the proportion of all values considered above that + hash to "hash". + - "value" is one of the values considered above that hash to "hash". + Which value is chosen when multiple values hash to the same "hash" is + undefined. + + The list is sorted in descending order by count, yielding the most + frequently occuring hashes first. + """ + buckets = collections.defaultdict(int) + values = {} + + num_objects = 0 + for obj in iterator: + num_objects += 1 + + try: + val = obj[key] + except (KeyError, TypeError): + continue + + value_hash = hashlib.sha1() + value_hash.update(syaml.dump_config(val).encode()) + value_hash = value_hash.hexdigest() + + buckets[value_hash] += 1 + values[value_hash] = val + + return [(h, buckets[h], float(buckets[h]) / num_objects, values[h]) + for h in sorted(buckets.keys(), key=lambda k: -buckets[k])] + + +def optimizer(yaml): + original_size = len(syaml.dump_config(yaml, default_flow_style=True)) + + # try factoring out commonly repeated portions + common_job = { + 'variables': { + 'SPACK_COMPILER_ACTION': 'NONE', + 'SPACK_RELATED_BUILDS_CDASH': '' + }, + + 'after_script': ['rm -rf "./spack"'], + + 'artifacts': { + 'paths': ['jobs_scratch_dir', 'cdash_report'], + 'when': 'always' + }, + } + + # look for a list of tags that appear frequently + _, count, proportion, tags = next(iter( + build_histogram(yaml.values(), 'tags')), + (None,) * 4) + + # If a list of tags is found, and there are more than one job that uses it, + # *and* the jobs that do use it represent at least 70% of all jobs, then + # add the list to the prototype object. + if tags and count > 1 and proportion >= 0.70: + common_job['tags'] = tags + + # apply common object factorization + yaml, other, applied, rest = try_optimization_pass( + 'general common object factorization', + yaml, common_subobject, common_job) + + # look for a common script, and try factoring that out + _, count, proportion, script = next(iter( + build_histogram(yaml.values(), 'script')), + (None,) * 4) + + if script and count > 1 and proportion >= 0.70: + yaml, other, applied, rest = try_optimization_pass( + 'script factorization', + yaml, common_subobject, {'script': script}) + + # look for a common before_script, and try factoring that out + _, count, proportion, script = next(iter( + build_histogram(yaml.values(), 'before_script')), + (None,) * 4) + + if script and count > 1 and proportion >= 0.70: + yaml, other, applied, rest = try_optimization_pass( + 'before_script factorization', + yaml, common_subobject, {'before_script': script}) + + # Look specifically for the SPACK_ROOT_SPEC environment variables. + # Try to factor them out. + h = build_histogram(( + getattr(val, 'get', lambda *args: {})('variables') + for val in yaml.values()), 'SPACK_ROOT_SPEC') + + # In this case, we try to factor out *all* instances of the SPACK_ROOT_SPEC + # environment variable; not just the one that appears with the greatest + # frequency. We only require that more than 1 job uses a given instance's + # value, because we expect the value to be very large, and so expect even + # few-to-one factorizations to yield large space savings. + counter = 0 + for _, count, proportion, spec in h: + if count <= 1: + continue + + counter += 1 + + yaml, other, applied, rest = try_optimization_pass( + 'SPACK_ROOT_SPEC factorization ({count})'.format(count=counter), + yaml, + common_subobject, + {'variables': {'SPACK_ROOT_SPEC': spec}}) + + new_size = len(syaml.dump_config(yaml, default_flow_style=True)) + + print('\n') + print_delta('overall summary', original_size, new_size) + print('\n') + return yaml diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py index 35891edb131..3e57c6656af 100644 --- a/lib/spack/spack/cmd/ci.py +++ b/lib/spack/spack/cmd/ci.py @@ -54,6 +54,11 @@ def setup_parser(subparser): help="Provide a git branch or tag if a custom spack branch " + "should be checked out as a step in each generated job. " + "This argument is ignored if no --spack-repo is provided.") + generate.add_argument( + '--optimize', action='store_true', + help="(Experimental) run the generated document through a series of " + "optimization passes designed to reduce the size of the " + "generated file.") generate.set_defaults(func=ci_generate) # Check a spec against mirror. Rebuild, create buildcache and push to @@ -75,6 +80,7 @@ def ci_generate(args): copy_yaml_to = args.copy_to spack_repo = args.spack_repo spack_ref = args.spack_ref + run_optimizer = args.optimize if not output_file: gen_ci_dir = os.getcwd() @@ -86,7 +92,8 @@ def ci_generate(args): # Generate the jobs spack_ci.generate_gitlab_ci_yaml( - env, True, output_file, spack_repo, spack_ref) + env, True, output_file, spack_repo, spack_ref, + run_optimizer=run_optimizer) if copy_yaml_to: copy_to_dir = os.path.dirname(copy_yaml_to) diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 0a74d144883..ed42ad4eddb 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -474,7 +474,7 @@ _spack_ci() { } _spack_ci_generate() { - SPACK_COMPREPLY="-h --help --output-file --copy-to --spack-repo --spack-ref" + SPACK_COMPREPLY="-h --help --output-file --copy-to --spack-repo --spack-ref --optimize" } _spack_ci_rebuild() { From 985c5c7792d9e1f582974490e61f947b43a43b75 Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Mon, 22 Jun 2020 14:15:46 -0400 Subject: [PATCH 788/802] [py-macs2] new version and dependency (#16817) * [py-macs2] Combined commit - Added version 2.1.3.3 - added dependency py-cython Author: Jen Herting Date: Tue May 26 16:41:28 2020 -0400 [py-macs2] added sha256= Author: Andrew Elble Date: Tue Oct 29 10:34:33 2019 -0400 migrated repos * [py-macs2] fixed copyright * [py-macs2] py-cython is build dependency --- var/spack/repos/builtin/packages/py-macs2/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-macs2/package.py b/var/spack/repos/builtin/packages/py-macs2/package.py index c20463b6e94..b9703842b58 100644 --- a/var/spack/repos/builtin/packages/py-macs2/package.py +++ b/var/spack/repos/builtin/packages/py-macs2/package.py @@ -15,10 +15,12 @@ class PyMacs2(PythonPackage): version('2.2.4', sha256='b131aadc8f5fd94bec35308b821e1f7585def788d2e7c756fc8cac402ffee25b') version('2.1.4', sha256='e4966d001914320829ab859c7bc8e92c6410aa7bdbddfd00b7625e9a0fb15c97') + version('2.1.3.3', sha256='00959e523f45ed92b8429f55944eca6984623ac008d7cdb488c3ffe59c21984a') version('2.1.1.20160309', sha256='2008ba838f83f34f8e0fddefe2a3a0159f4a740707c68058f815b31ddad53d26') depends_on('python@3.5:', when='@2.2:', type=('build', 'run')) depends_on('python@2.7:2.8', when='@:2.1', type=('build', 'run')) + depends_on('py-cython', type='build') # Most Python packages only require py-setuptools as a build dependency. # However, py-macs2 requires py-setuptools during runtime as well. From 735416dbf490252d53f5503cb44dd6a9e028034e Mon Sep 17 00:00:00 2001 From: vvolkl Date: Mon, 22 Jun 2020 20:16:06 +0200 Subject: [PATCH 789/802] HEP generator update: evtgen, tauola, photos, pythia8, lhapdf, whizard (#16880) * add package evtgen fix formatting add evtgen dependencies and update pythia8 fix formatting * [evtgen] update versions * [pythia8] add 'without-PACKAGE' args * fix formatting * Add LHAPDF Co-authored-by: iarspider * Add package whizard fix formatting * [pyhtia8, evtgen] add conflict msg re: circular dependencies * [pyhtia8, evtgen] fix conflicts * [pyhtia8, evtgen] fix msg string * Set pythia8 default to ~evtgen --- .../repos/builtin/packages/evtgen/g2c.patch | 22 +++++ .../repos/builtin/packages/evtgen/package.py | 55 +++++++++++++ .../repos/builtin/packages/lhapdf/package.py | 35 ++++++++ .../repos/builtin/packages/photos/package.py | 27 +++++++ .../repos/builtin/packages/pythia8/package.py | 33 ++++++++ .../repos/builtin/packages/tauola/package.py | 26 ++++++ .../repos/builtin/packages/whizard/package.py | 81 +++++++++++++++++++ 7 files changed, 279 insertions(+) create mode 100644 var/spack/repos/builtin/packages/evtgen/g2c.patch create mode 100644 var/spack/repos/builtin/packages/evtgen/package.py create mode 100644 var/spack/repos/builtin/packages/lhapdf/package.py create mode 100644 var/spack/repos/builtin/packages/photos/package.py create mode 100644 var/spack/repos/builtin/packages/tauola/package.py create mode 100644 var/spack/repos/builtin/packages/whizard/package.py diff --git a/var/spack/repos/builtin/packages/evtgen/g2c.patch b/var/spack/repos/builtin/packages/evtgen/g2c.patch new file mode 100644 index 00000000000..0cce1d54014 --- /dev/null +++ b/var/spack/repos/builtin/packages/evtgen/g2c.patch @@ -0,0 +1,22 @@ +diff --git a/configure b/configure +index 375e3b7..e47deac 100755 +--- a/configure ++++ b/configure +@@ -196,7 +196,7 @@ echo "Platform is $ARCH" + FFLAGS="${FFLAGS_OPT}" + CFLAGS="${CFLAGS_OPT}" + CXXFLAGS="${CXXFLAGS_OPT}" +-FLIBS="-lfrtbegin -lg2c" ++#FLIBS="-lfrtbegin -lg2c" + SOFLAGS="-soname" + + if [ ${COMPMODE} = OPT ]; then +@@ -213,7 +213,7 @@ if [ $ARCH = Linux ]; then + FFLAGS="${FFLAGS_OPT} -Wno-globals" + CFLAGS="${CFLAGS_OPT}" + CXXFLAGS="${CXXFLAGS_OPT}" +- FLIBS="-lfrtbegin -lg2c" ++ #FLIBS="-lfrtbegin -lg2c" + if [ ${COMPMODE} = OPT ]; then + FFLAGS="${FFLAGS_OPT}" + CFLAGS="${CFLAGS_OPT}" diff --git a/var/spack/repos/builtin/packages/evtgen/package.py b/var/spack/repos/builtin/packages/evtgen/package.py new file mode 100644 index 00000000000..514fe026265 --- /dev/null +++ b/var/spack/repos/builtin/packages/evtgen/package.py @@ -0,0 +1,55 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Evtgen(AutotoolsPackage): + """ EvtGen is a Monte Carlo event generator that simulates + the decays of heavy flavour particles, primarily B and D mesons. """ + + homepage = "https://evtgen.hepforge.org/" + url = "http://lcgpackages.web.cern.ch/lcgpackages/tarFiles/sources/MCGeneratorsTarFiles/evtgen-R01-07-00.tar.gz" + + maintainers = ['vvolkl'] + + version('02-00-00', sha256='02372308e1261b8369d10538a3aa65fe60728ab343fcb64b224dac7313deb719') + version('01-07-00', sha256='2648f1e2be5f11568d589d2079f22f589c283a2960390bbdb8d9d7f71bc9c014', preferred=True) + + variant('pythia8', default=True, description='Build with pythia8') + variant('tauola', default=False, description='Build with tauola') + variant('photos', default=False, description='Build with photos') + + patch("g2c.patch") + + depends_on('hepmc@:2.99.99') + depends_on("pythia8", when="+pythia8") + depends_on("tauola", when="+tauola") + depends_on("photos", when="+photos") + + conflicts("^pythia8+evtgen", when="+pythia8", + msg="Building pythia with evtgen bindings and " + "evtgen with pythia bindings results in a circular dependency " + "that cannot be resolved at the moment! " + "Use evtgen+pythia8^pythia8~evtgen.") + + def configure_args(self): + args = [] + + args.append('--hepmcdir=%s' % self.spec["hepmc"].prefix) + if '+pythia8' in self.spec: + args.append('--pythiadir=%s' % self.spec['pythia8'].prefix) + if '+photos' in self.spec: + args.append('--photosdir=%s' % self.spec['photos'].prefix) + if '+tauola' in self.spec: + args.append('--tauoladir=%s' % self.spec['tauola'].prefix) + + return args + + def build(self, spec, prefix): + # avoid parallel compilation errors + # due to libext_shared depending on lib_shared + make('lib_shared') + make('all') diff --git a/var/spack/repos/builtin/packages/lhapdf/package.py b/var/spack/repos/builtin/packages/lhapdf/package.py new file mode 100644 index 00000000000..10a69aba755 --- /dev/null +++ b/var/spack/repos/builtin/packages/lhapdf/package.py @@ -0,0 +1,35 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Lhapdf(AutotoolsPackage): + """LHAPDF is a general purpose C++ interpolator, + used for evaluating PDFs from discretised data files. """ + + homepage = "https://lhapdf.hepforge.org/" + url = "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-6.2.3.tar.gz" + + version('6.2.3', sha256='d6e63addc56c57b6286dc43ffc56d901516f4779a93a0f1547e14b32cfd82dd1') + + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') + + depends_on('python', type=('build', 'run')) + depends_on('py-cython', type='build') + depends_on('py-setuptools', type='build') + depends_on('boost', type='build') + depends_on('yaml-cpp', type='build', when='@:6.1.5') + + def configure_args(self): + args = ['--with-boost=' + self.spec['boost'].prefix, + 'FCFLAGS=-O3', 'CFLAGS=-O3', 'CXXFLAGS=-O3'] + + if self.spec.satisfies('@:6.1.5'): + args.append('--with-yaml-cpp=' + self.spec['yaml-cpp'].prefix) + return args diff --git a/var/spack/repos/builtin/packages/photos/package.py b/var/spack/repos/builtin/packages/photos/package.py new file mode 100644 index 00000000000..6304e194aad --- /dev/null +++ b/var/spack/repos/builtin/packages/photos/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Photos(AutotoolsPackage): + """ Photos is a Monte Carlo program for bremsstrahlung in the decay + of particles and resonances.""" + + homepage = "http://photospp.web.cern.ch/photospp/" + url = "http://photospp.web.cern.ch/photospp/resources/PHOTOS.3.61/PHOTOS.3.61-LHC.tar.gz" + + version('3.61', sha256='acd3bcb769ba2a3e263de399e9b89fd6296405c9cbc5045b83baba3e60db4b26') + + maintainers = ['vvolkl'] + + depends_on('hepmc@:2.99.99') + + def configure_args(self): + args = [] + + args.append('--with-hepmc=%s' % self.spec["hepmc"].prefix) + args.append('--without-hepmc3') + return args diff --git a/var/spack/repos/builtin/packages/pythia8/package.py b/var/spack/repos/builtin/packages/pythia8/package.py index 8f2ec41b545..572d65922be 100644 --- a/var/spack/repos/builtin/packages/pythia8/package.py +++ b/var/spack/repos/builtin/packages/pythia8/package.py @@ -23,13 +23,46 @@ class Pythia8(AutotoolsPackage): version('8212', sha256='f8fb4341c7e8a8be3347eb26b00329a388ccf925313cfbdba655a08d7fd5a70e') variant('shared', default=True, description='Build shared library') + variant('hepmc', default=True, description='Build HepMC2 extensions') + variant('evtgen', default=False, description='Build EvtGen extensions') + variant('root', default=False, description='Build ROOT extensions') + variant('fastjet', default=False, description='Build fastjet extensions') depends_on('rsync', type='build') + depends_on('hepmc@:2.99.99', when="+hepmc") + depends_on('root', when="+root") + depends_on('evtgen', when="+evtgen") + depends_on("fastjet@3.0.0:", when="+fastjet") + + conflicts("^evtgen+pythia8", when="+evtgen", + msg="Building pythia with evtgen bindings and " + "evtgen with pythia bindings results in a circular dependency " + "that cannot be resolved at the moment! " + "Use pythia8+evtgen^evtgen~pythia8") def configure_args(self): args = [] if '+shared' in self.spec: args.append('--enable-shared') + if '+hepmc' in self.spec: + args.append('--with-hepmc=%s' % self.spec["hepmc"].prefix) + else: + args.append('--without-hepmc') + if '+fastjet' in self.spec: + args.append('--with-fastjet3=%s' % self.spec["fastjet"].prefix) + else: + args.append('--without-fastjet') + if '+evtgen' in self.spec: + args.append('--with-evtgen=%s' % self.spec["evtgen"].prefix) + else: + args.append('--without-evtgen') + if '+root' in self.spec: + args.append('--with-root=%s' % self.spec["root"].prefix) + else: + args.append('--without-evtgen') return args + + def setup_dependent_run_environment(self, env, dependent_spec): + env.set('PYTHIA8DATA', self.prefix.share.Pythia8.xmldoc) diff --git a/var/spack/repos/builtin/packages/tauola/package.py b/var/spack/repos/builtin/packages/tauola/package.py new file mode 100644 index 00000000000..e850ce4dcc6 --- /dev/null +++ b/var/spack/repos/builtin/packages/tauola/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Tauola(AutotoolsPackage): + """ Tauola is a event generator for tau decays.""" + + homepage = "https://tauolapp.web.cern.ch/tauolapp/" + url = "https://tauolapp.web.cern.ch/tauolapp/resources/TAUOLA.1.1.8/TAUOLA.1.1.8-LHC.tar.gz" + + version('1.1.8', sha256='3f734e8a967682869cca2c1ffebd3e055562613c40853cc81820d8b666805ed5') + + maintainers = ['vvolkl'] + + depends_on('hepmc@:2.99.99') + + def configure_args(self): + args = [] + + args.append('--with-hepmc=%s' % self.spec["hepmc"].prefix) + args.append('--without-hepmc3') + return args diff --git a/var/spack/repos/builtin/packages/whizard/package.py b/var/spack/repos/builtin/packages/whizard/package.py new file mode 100644 index 00000000000..b6d4ea0921a --- /dev/null +++ b/var/spack/repos/builtin/packages/whizard/package.py @@ -0,0 +1,81 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Whizard(AutotoolsPackage): + """WHIZARD is a program system designed for the efficient calculation + of multi-particle scattering cross sections + and simulated event samples.""" + + homepage = "whizard.hepforge.org" + url = "https://whizard.hepforge.org/downloads/?f=whizard-2.8.2.tar.gz" + + maintainers = ['vvolkl'] + + version('3.0.0_alpha', sha256='4636e5a10350bb67ccc98cd105bc891ea04f3393c2420f81be3d21240be20009') + version('2.8.2', sha256='32c9be342d01b3fc6f947fddce74bf2d81ece37fb39bca1f37778fb0c07e2568', prefered=True) + version('2.8.1', sha256='0c759ce0598e25f38e04659f745c5963d238c4b5c12209f16449b6c0bc6dc64e') + version('2.8.0', sha256='3b5175eafa879d1baca20237d18fb2b18bee89631e73ada499de9c082d009696') + + variant('hepmc', default=True, + description="builds with hepmc") + + variant('pythia8', default=True, + description="builds with pythia8") + + variant('fastjet', default=False, + description="builds with fastjet") + + variant('lcio', default=False, + description="builds with lcio") + + variant('lhapdf', default=False, + description="builds with fastjet") + + variant('openmp', default=False, + description="builds with openmp") + + variant('latex', default=False, + description="data visualization with latex") + + depends_on('ocaml', type='build', when="@3:") + depends_on('ocaml@:4.8.2', type='build', when="@:2.99.99") + depends_on('hepmc', when="+hepmc") + depends_on('pythia8', when="+pythia8") + depends_on('lhapdf', when="+lhapdf") + depends_on('fastjet', when="+fastjet") + depends_on('texlive', when="+latex") + + def configure_args(self): + spec = self.spec + args = [ + '--enable-hepmc=%s' % ("yes" if "+hepmc" in spec else "no"), + '--enable-fastjet=%s' % ("yes" if "+fastjet" in spec else "no"), + '--enable-pythia8=%s' % ("yes" if "+pythia8" in spec else "no"), + '--enable-lcio=%s' % ("yes" if "+lcio" in spec else "no"), + '--enable-lhapdf=%s' % ("yes" if "+lhapdf" in spec else "no"), + # todo: openloops + # todo: hoppet + # todo: recola + # todo: looptools + # todo: gosam + # todo: pythia6 + ] + if "+openmp" not in spec: + args.append('--disable-openmp') + + return args + + def url_for_version(self, version): + major = str(version[0]) + minor = str(version[1]) + patch = str(version[2]) + if len(version) == 4: + url = "https://whizard.hepforge.org/downloads/?f=whizard-%s.%s.%s_%s.tar.gz" % (major, minor, patch, version[3]) + else: + url = "https://whizard.hepforge.org/downloads/?f=whizard-%s.%s.%s.tar.gz" % (major, minor, patch) + return url From 55f26b0ccb6f53d2a554730c343c6d24a340cc29 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 23 Jun 2020 08:30:45 +0200 Subject: [PATCH 790/802] lua: fix linking to ncurses (#17206) PR #17108 broke the build. Spack's ncurses package does not provide a libtermcap, so we need to use libtinfow. --- var/spack/repos/builtin/packages/lua/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index e00e499abcf..28554dae5b2 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -54,7 +54,7 @@ def install(self, spec, prefix): 'MYLDFLAGS=-L%s -L%s' % ( spec['readline'].prefix.lib, spec['ncurses'].prefix.lib), - 'MYLIBS=-lncursesw -ltermcap', + 'MYLIBS=-lncursesw -ltinfow', 'CC=%s -std=gnu99 %s' % (spack_cc, self.compiler.cc_pic_flag), target) From 1d10c6c73091c6130b3af696d4a9309497dcdd54 Mon Sep 17 00:00:00 2001 From: "Tomoki, Karatsu" <49965247+t-karatsu@users.noreply.github.com> Date: Tue, 23 Jun 2020 15:54:54 +0900 Subject: [PATCH 791/802] caffe: use MPI compiler when using hdf5+mpi (#17125) --- var/spack/repos/builtin/packages/caffe/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/caffe/package.py b/var/spack/repos/builtin/packages/caffe/package.py index 7df83b1d537..187bdc5764e 100644 --- a/var/spack/repos/builtin/packages/caffe/package.py +++ b/var/spack/repos/builtin/packages/caffe/package.py @@ -81,4 +81,10 @@ def cmake_args(self): version = spec['python'].version.up_to(1) args.append('-Dpython_version=%s' % version) + if spec['hdf5'].satisfies('+mpi'): + args.extend([ + '-DCMAKE_C_COMPILER={0}'.format(self.spec['mpi'].mpicc), + '-DCMAKE_CXX_COMPILER={0}'.format(self.spec['mpi'].mpicxx) + ]) + return args From 36e603c7d6189c63caffc4e4b011f1491d543473 Mon Sep 17 00:00:00 2001 From: vvolkl Date: Tue, 23 Jun 2020 08:56:23 +0200 Subject: [PATCH 792/802] whizard: added zlib as a dependency (#17205) --- var/spack/repos/builtin/packages/whizard/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/whizard/package.py b/var/spack/repos/builtin/packages/whizard/package.py index b6d4ea0921a..32271f2df44 100644 --- a/var/spack/repos/builtin/packages/whizard/package.py +++ b/var/spack/repos/builtin/packages/whizard/package.py @@ -49,6 +49,7 @@ class Whizard(AutotoolsPackage): depends_on('lhapdf', when="+lhapdf") depends_on('fastjet', when="+fastjet") depends_on('texlive', when="+latex") + depends_on('zlib') def configure_args(self): spec = self.spec From 0ffbd79bd007d7adfd97900bdd99ebc6cbdec6aa Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 23 Jun 2020 02:44:44 -0500 Subject: [PATCH 793/802] [hepmc3] gcc@9.3.0 patch for @3.1.2:3.2.1, conflicts for earlier @:3.1.1 (#17182) See https://gitlab.cern.ch/hepmc/HepMC3/-/commit/ba38f14d8f56c16cc4105d98f6d4540c928c6150, which is included in master and released as of hepmc3@3.2.2 --- .../ba38f14d8f56c16cc4105d98f6d4540c928c6150.patch | 12 ++++++++++++ var/spack/repos/builtin/packages/hepmc3/package.py | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/hepmc3/ba38f14d8f56c16cc4105d98f6d4540c928c6150.patch diff --git a/var/spack/repos/builtin/packages/hepmc3/ba38f14d8f56c16cc4105d98f6d4540c928c6150.patch b/var/spack/repos/builtin/packages/hepmc3/ba38f14d8f56c16cc4105d98f6d4540c928c6150.patch new file mode 100644 index 00000000000..b09058104fe --- /dev/null +++ b/var/spack/repos/builtin/packages/hepmc3/ba38f14d8f56c16cc4105d98f6d4540c928c6150.patch @@ -0,0 +1,12 @@ +diff --git a/search/include/HepMC3/Feature.h b/search/include/HepMC3/Feature.h +index 0bd4f92b059d315c4a17ab03d49ba5b20af75d8e..e7717516a99c5c3d2553be2aca21378fb1ae7977 100644 +--- a/search/include/HepMC3/Feature.h ++++ b/search/include/HepMC3/Feature.h +@@ -293,7 +293,7 @@ public: + EvaluatorPtr functor = m_internal; + return [value, functor](ConstGenParticlePtr input)->bool{ + Feature_type local = (*functor)(input); +- return fabs(local - value) <= ((fabs(local) < fabs(value))? fabs(value) : fabs(local)) * std::numeric_limits::epsilon(); ++ return std::less_equal{}(fabs(local - value) , std::numeric_limits::epsilon()); + }; + } diff --git a/var/spack/repos/builtin/packages/hepmc3/package.py b/var/spack/repos/builtin/packages/hepmc3/package.py index 95cc4014570..361d3826f5c 100644 --- a/var/spack/repos/builtin/packages/hepmc3/package.py +++ b/var/spack/repos/builtin/packages/hepmc3/package.py @@ -16,6 +16,7 @@ class Hepmc3(CMakePackage): maintainers = ['vvolkl'] + version('3.2.2', sha256='0e8cb4f78f804e38f7d29875db66f65e4c77896749d723548cc70fb7965e2d41') version('3.2.1', sha256='6e4e4bb5708af105d4bf74efc2745e6efe704e942d46a8042f7dcae37a4739fe') version('3.2.0', sha256='f132387763d170f25a7cc9f0bd586b83373c09acf0c3daa5504063ba460f89fc') version('3.1.2', sha256='4133074b3928252877982f3d4b4c6c750bb7a324eb6c7bb2afc6fa256da3ecc7') @@ -32,6 +33,9 @@ class Hepmc3(CMakePackage): depends_on('root', when='+rootio') depends_on('python', when="+python") + conflicts('%gcc@9.3.0', when="@:3.1.1") + patch('ba38f14d8f56c16cc4105d98f6d4540c928c6150.patch', when="@3.1.2:3.2.1 %gcc@9.3.0") + def cmake_args(self): spec = self.spec args = [ From f8e3e8289dca4f2ba73462ef245fb9486e8c3be8 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 23 Jun 2020 02:45:36 -0500 Subject: [PATCH 794/802] py-torchvision: added v0.6.1 (#17203) --- var/spack/repos/builtin/packages/py-torchvision/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index 2105ec19880..4e40117c8d4 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -11,7 +11,7 @@ class PyTorchvision(PythonPackage): architectures, and common image transformations for computer vision.""" homepage = "https://github.com/pytorch/vision" - url = "https://github.com/pytorch/vision/archive/v0.6.0.tar.gz" + url = "https://github.com/pytorch/vision/archive/v0.6.1.tar.gz" maintainers = ['adamjstewart'] import_modules = [ @@ -21,6 +21,7 @@ class PyTorchvision(PythonPackage): 'torchvision.models.detection' ] + version('0.6.1', sha256='8173680a976c833640ecbd0d7e6f0a11047bf8833433e2147180efc905e48656') version('0.6.0', sha256='02de11b3abe6882de4032ce86dab9c7794cbc84369b44d04e667486580f0f1f7') version('0.5.0', sha256='eb9afc93df3d174d975ee0914057a9522f5272310b4d56c150b955c287a4d74d') version('0.4.2', sha256='1184a27eab85c9e784bacc6f9d6fec99e168ab4eda6047ef9f709e7fdb22d8f9') From 07b6834ec5e9b428400de1748e07139324a2b92c Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Tue, 23 Jun 2020 01:46:50 -0600 Subject: [PATCH 795/802] OpenMPI: added v4.0.4 (#17202) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug fix release: 4.0.4 -- June, 2020 ----------------------- - Fix a memory patcher issue intercepting shmat and shmdt. This was observed on RHEL 8.x ppc64le (see README for more info). - Fix an illegal access issue caught using gcc's address sanitizer. Thanks to Georg Geiser for reporting. - Add checks to avoid conflicts with a libevent library shipped with LSF. - Switch to linking against libevent_core rather than libevent, if present. - Add improved support for UCX 1.9 and later. - Fix an ABI compatibility issue with the Fortran 2008 bindings. Thanks to Alastair McKinstry for reporting. - Fix an issue with rpath of /usr/lib64 when building OMPI on systems with Lustre. Thanks to David Shrader for reporting. - Fix a memory leak occurring with certain MPI RMA operations. - Fix an issue with ORTE's mapping of MPI processes to resources. Thanks to Alex Margolin for reporting and providing a fix. - Correct a problem with incorrect error codes being returned by OMPI MPI_T functions. - Fix an issue with debugger tools not being able to attach to mpirun more than once. Thanks to Gregory Lee for reporting. - Fix an issue with the Fortran compiler wrappers when using NAG compilers. Thanks to Peter Brady for reporting. - Fix an issue with the ORTE ssh based process launcher at scale. Thanks to Benjamín Hernández for reporting. - Address an issue when using shared MPI I/O operations. OMPIO will now successfully return from the file open statement but will raise an error if the file system does not supported shared I/O operations. Thanks to Romain Hild for reporting. - Fix an issue with MPI_WIN_DETACH. Thanks to Thomas Naughton for reporting. Signed-off-by: Howard Pritchard --- var/spack/repos/builtin/packages/openmpi/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 4065e85a591..4184e64f021 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -33,9 +33,10 @@ class Openmpi(AutotoolsPackage): version('master', branch='master') # Current - version('4.0.3', sha256='1402feced8c3847b3ab8252165b90f7d1fa28c23b6b2ca4632b6e4971267fd03') # libmpi.so.40.20.3 + version('4.0.4', sha256='47e24eb2223fe5d24438658958a313b6b7a55bb281563542e1afc9dec4a31ac4') # libmpi.so.40.20.4 # Still supported + version('4.0.3', sha256='1402feced8c3847b3ab8252165b90f7d1fa28c23b6b2ca4632b6e4971267fd03') # libmpi.so.40.20.3 version('4.0.2', sha256='900bf751be72eccf06de9d186f7b1c4b5c2fa9fa66458e53b77778dffdfe4057') # libmpi.so.40.20.2 version('4.0.1', sha256='cce7b6d20522849301727f81282201d609553103ac0b09162cf28d102efb9709') # libmpi.so.40.20.1 version('4.0.0', sha256='2f0b8a36cfeb7354b45dda3c5425ef8393c9b04115570b615213faaa3f97366b') # libmpi.so.40.20.0 From 6fdf5913abac23bf5e15457f4c1337f4d2323981 Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Tue, 23 Jun 2020 03:49:05 -0400 Subject: [PATCH 796/802] py-gsd: new package at v1.9.3 (#17200) Co-authored-by: Andrew Elble --- .../repos/builtin/packages/py-gsd/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-gsd/package.py diff --git a/var/spack/repos/builtin/packages/py-gsd/package.py b/var/spack/repos/builtin/packages/py-gsd/package.py new file mode 100644 index 00000000000..f130265d824 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-gsd/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyGsd(PythonPackage): + """The GSD file format is the native file format for HOOMD-blue. GSD files + store trajectories of the HOOMD-blue system state in a binary file with + efficient random access to frames. GSD allows all particle and topology + properties to vary from one frame to the next. Use the GSD Python API to + specify the initial condition for a HOOMD-blue simulation or analyze + trajectory output with a script. Read a GSD trajectory with a visualization + tool to explore the behavior of the simulation.""" + + homepage = "https://gsd.readthedocs.io/en/stable/#" + url = "https://pypi.io/packages/source/g/gsd/gsd-1.9.3.tar.gz" + + version('1.9.3', sha256='c6b37344e69020f69fda2b8d97f894cb41fd720840abeda682edd680d1cff838') + + depends_on('py-setuptools', type='build') + depends_on('py-cython', type='build') + depends_on('py-numpy@1.9.3:1.999999', type=('build', 'run')) From 561f6d6c210f9c7848c9b14f6d9b021217d91fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Tue, 23 Jun 2020 09:17:32 +0100 Subject: [PATCH 797/802] swfft: Add patch to make it build (#17196) --- .../builtin/packages/swfft/include-stdio_h.patch | 11 +++++++++++ var/spack/repos/builtin/packages/swfft/package.py | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/swfft/include-stdio_h.patch diff --git a/var/spack/repos/builtin/packages/swfft/include-stdio_h.patch b/var/spack/repos/builtin/packages/swfft/include-stdio_h.patch new file mode 100644 index 00000000000..86c9390cae1 --- /dev/null +++ b/var/spack/repos/builtin/packages/swfft/include-stdio_h.patch @@ -0,0 +1,11 @@ +--- a/TimingStats.h ++++ b/TimingStats.h +@@ -56,7 +56,7 @@ + #define HACC_TIMINGSTATS_H + + #include +- ++#include + #include + + // lightweight timing statistics from MPI_Wtime() calls diff --git a/var/spack/repos/builtin/packages/swfft/package.py b/var/spack/repos/builtin/packages/swfft/package.py index f6bfae90ec6..3d4766f77b0 100644 --- a/var/spack/repos/builtin/packages/swfft/package.py +++ b/var/spack/repos/builtin/packages/swfft/package.py @@ -21,6 +21,10 @@ class Swfft(MakefilePackage): depends_on('mpi') depends_on('fftw') + # fix error + # TimingStats.h:94:35: error: 'printf' was not declared in this scope + patch('include-stdio_h.patch') + tags = ['proxy-app', 'ecp-proxy-app'] @property From c41f13ef976e2ade652ccb2afbf4624473386f7e Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 23 Jun 2020 10:18:27 +0200 Subject: [PATCH 798/802] parallel-netcdf: add missing perl dependency (#17156) parallel-netcdf's buildiface script needs perl during build. --- var/spack/repos/builtin/packages/parallel-netcdf/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index 722efab16e4..e34b766ec81 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -50,6 +50,8 @@ def url_for_version(self, version): depends_on('automake', when='@master', type='build') depends_on('libtool', when='@master', type='build') + depends_on('perl', type='build') + conflicts('+shared', when='@:1.9%nag+fortran') conflicts('+shared', when='@:1.8') From cfc390b41f28817e7ae99061f4364806844a94ef Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Tue, 23 Jun 2020 10:19:00 +0200 Subject: [PATCH 799/802] r-spatialEco: added v1.3-2 (#17194) --- var/spack/repos/builtin/packages/r-spatialeco/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/r-spatialeco/package.py b/var/spack/repos/builtin/packages/r-spatialeco/package.py index bf93b15a204..f028ebd8d5d 100644 --- a/var/spack/repos/builtin/packages/r-spatialeco/package.py +++ b/var/spack/repos/builtin/packages/r-spatialeco/package.py @@ -15,6 +15,7 @@ class RSpatialeco(RPackage): url = "https://cloud.r-project.org/src/contrib/spatialEco_1.3-1.tar.gz" list_url = "https://cloud.r-project.org/src/contrib/Archive/spatialEco" + version('1.3-2', sha256='9dfa427ee8b112446b582f6739a1c40a6e3ad3d050f522082a28ce47c675e57a') version('1.3-1', sha256='ff12e26cc1bbf7934fbf712c99765d96ce6817e8055faa15a26d9ebade4bbf1c') version('1.3-0', sha256='cfa09673cb3bbed30b243082fc2d63ac09f48b9f072a18d32b95c2c29979d1d0') From 91693ef32e32fac0740bec1987d992bcfd251523 Mon Sep 17 00:00:00 2001 From: darmac Date: Tue, 23 Jun 2020 16:20:28 +0800 Subject: [PATCH 800/802] strace: added v5.3 to v5.7 (#17193) --- var/spack/repos/builtin/packages/strace/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/strace/package.py b/var/spack/repos/builtin/packages/strace/package.py index f1b282e5305..a46a98b2bc5 100644 --- a/var/spack/repos/builtin/packages/strace/package.py +++ b/var/spack/repos/builtin/packages/strace/package.py @@ -17,6 +17,11 @@ class Strace(AutotoolsPackage): conflicts('platform=darwin', msg='strace runs only on Linux.') + version('5.7', sha256='b284b59f9bcd95b9728cea5bd5c0edc5ebe360af73dc76fbf6334f11c777ccd8') + version('5.6', sha256='189968eeae06ed9e20166ec55a830943c84374676a457c9fe010edc7541f1b01') + version('5.5', sha256='9f58958c8e59ea62293d907d10572e352b582bd7948ed21aa28ebb47e5bf30ff') + version('5.4', sha256='f7d00514d51290b6db78ad7a9de709baf93caa5981498924cbc9a744cfd2a741') + version('5.3', sha256='6c131198749656401fe3efd6b4b16a07ea867e8f530867ceae8930bbc937a047') version('5.2', sha256='d513bc085609a9afd64faf2ce71deb95b96faf46cd7bc86048bc655e4e4c24d2') version('5.1', sha256='f5a341b97d7da88ee3760626872a4899bf23cf8dee56901f114be5b1837a9a8b') version('5.0', sha256='3b7ad77eb2b81dc6078046a9cc56eed5242b67b63748e7fc28f7c2daf4e647da') From 404ff9eb326566b98d836af92acf4e91ac419392 Mon Sep 17 00:00:00 2001 From: Justin S <3630356+codeandkey@users.noreply.github.com> Date: Tue, 23 Jun 2020 03:34:47 -0500 Subject: [PATCH 801/802] dock: new package at 6.9 (#17138) --- .../repos/builtin/packages/dock/package.py | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 var/spack/repos/builtin/packages/dock/package.py diff --git a/var/spack/repos/builtin/packages/dock/package.py b/var/spack/repos/builtin/packages/dock/package.py new file mode 100644 index 00000000000..2493be97f1c --- /dev/null +++ b/var/spack/repos/builtin/packages/dock/package.py @@ -0,0 +1,59 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import os + + +class Dock(Package): + """DOCK is a molecular docking program used in drug discovery. + + This program, given a protein binding site and a small molecule, tries + to predict the correct binding mode of the small molecule in the binding + site, and the associated binding energy.""" + + homepage = "http://dock.compbio.ucsf.edu/DOCK_6/index.htm" + url = "file://{0}/dock.6.9_source.tar.gz".format(os.getcwd()) + + version('6.9', sha256='c2caef9b4bb47bb0cb437f6dc21f4c605fd3d0d9cc817fa13748c050dc87a5a8') + + variant('mpi', default=True, description='Enable mpi') + + depends_on('bison', type='build') + depends_on('mpi', when='+mpi') + + def setup_build_environment(self, env): + if '+mpi' in self.spec: + env.set('MPICH_HOME', self.spec['mpi'].prefix) + + def install(self, spec, prefix): + compiler_targets = { + 'gcc': 'gnu', + 'intel': 'intel', + 'pgi': 'pgi', + 'sgi': 'sgi', + } + + if self.compiler.name not in compiler_targets: + template = 'Unsupported compiler {0}! Supported compilers: {1}' + err = template.format(self.compiler.name, + ', '.join(list(compiler_targets.keys()))) + + raise InstallError(err) + + if self.compiler.name == 'pgi' and '+mpi' in spec: + raise InstallError('Parallel output is not supported with pgi.') + + with working_dir('install'): + sh_args = ['./configure', compiler_targets[self.compiler.name]] + + if '+mpi' in spec: + sh_args.append('parallel') + + which('sh')(*sh_args) + which('make')('YACC=bison -o y.tab.c') + + mkdirp(prefix.bin) + install_tree('bin', prefix.bin) From 239b709f97028d3595f615e914fc4662ae48925f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 23 Jun 2020 15:24:02 +0200 Subject: [PATCH 802/802] Added unit tests to Github Actions (#16610) * Added unit tests to Github Actions * Set user e-mail and name for git tests to succeed * Simplify setup.sh logic * Replicate Travis script on Github Actions * Update flags since '.' is not allowed * Added badge, simplified workflow * Remove pinning of coverage * Remove unit tests run on Github Actions from Travis --- .github/workflows/linux_unit_tests.yaml | 61 +++++++++++++++++++++++++ .travis.yml | 21 --------- README.md | 5 +- share/spack/qa/setup.sh | 15 ++---- 4 files changed, 67 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/linux_unit_tests.yaml diff --git a/.github/workflows/linux_unit_tests.yaml b/.github/workflows/linux_unit_tests.yaml new file mode 100644 index 00000000000..0fe20200ad3 --- /dev/null +++ b/.github/workflows/linux_unit_tests.yaml @@ -0,0 +1,61 @@ +name: linux tests + +on: + push: + branches: + - master + - develop + pull_request: + branches: + - master + - develop +jobs: + unittests: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install System packages + run: | + sudo apt-get -y update + sudo apt-get install -y coreutils gfortran graphviz gnupg2 mercurial ninja-build patchelf + # Needed for kcov + sudo apt-get -y install cmake binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev + - name: Install Python packages + run: | + pip install --upgrade pip six setuptools codecov coverage + - name: Setup git configuration + run: | + # Need this for the git tests to succeed. + git --version + git config --global user.email "spack@example.com" + git config --global user.name "Test User" + git fetch -u origin develop:develop + - name: Install kcov for bash script coverage + env: + KCOV_VERSION: 34 + run: | + KCOV_ROOT=$(mktemp -d) + wget --output-document=${KCOV_ROOT}/${KCOV_VERSION}.tar.gz https://github.com/SimonKagstrom/kcov/archive/v${KCOV_VERSION}.tar.gz + tar -C ${KCOV_ROOT} -xzvf ${KCOV_ROOT}/${KCOV_VERSION}.tar.gz + mkdir -p ${KCOV_ROOT}/build + cd ${KCOV_ROOT}/build && cmake -Wno-dev ${KCOV_ROOT}/kcov-${KCOV_VERSION} && cd - + make -C ${KCOV_ROOT}/build && sudo make -C ${KCOV_ROOT}/build install + - name: Run unit tests + env: + COVERAGE: true + run: | + share/spack/qa/run-unit-tests + coverage combine + coverage xml + - name: Upload to codecov.io + uses: codecov/codecov-action@v1 + with: + flags: unittests,linux diff --git a/.travis.yml b/.travis.yml index 8107ad876d8..b59d1666d8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,27 +41,6 @@ jobs: - realpath - zsh env: [ TEST_SUITE=unit, COVERAGE=true ] - - python: '2.7' - os: linux - language: python - env: [ TEST_SUITE=unit, COVERAGE=true, KCOV_VERSION=34 ] - - python: '3.5' - os: linux - dist: xenial - language: python - env: TEST_SUITE=unit - - python: '3.6' - os: linux - language: python - env: TEST_SUITE=unit - - python: '3.7' - os: linux - language: python - env: TEST_SUITE=unit - - python: '3.8' - os: linux - language: python - env: [ TEST_SUITE=unit, COVERAGE=true, KCOV_VERSION=34 ] - python: '3.8' os: linux language: python diff --git a/README.md b/README.md index a2d704e6c24..d278378ce7a 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # Spack Spack -[![](https://github.com/spack/spack/workflows/macos%20tests/badge.svg)](https://github.com/spack/spack/actions) -[![Build Status](https://travis-ci.com/spack/spack.svg?branch=develop)](https://travis-ci.com/spack/spack) +[![MacOS Tests](https://github.com/spack/spack/workflows/macos%20tests/badge.svg)](https://github.com/spack/spack/actions) +[![Linux Tests](https://github.com/spack/spack/workflows/linux%20tests/badge.svg)](https://github.com/spack/spack/actions) [![Linux Builds](https://github.com/spack/spack/workflows/linux%20builds/badge.svg)](https://github.com/spack/spack/actions) [![macOS Builds (nightly)](https://github.com/spack/spack/workflows/macOS%20builds%20nightly/badge.svg?branch=develop)](https://github.com/spack/spack/actions?query=workflow%3A%22macOS+builds+nightly%22) +[![Build Status](https://travis-ci.com/spack/spack.svg?branch=develop)](https://travis-ci.com/spack/spack) [![codecov](https://codecov.io/gh/spack/spack/branch/develop/graph/badge.svg)](https://codecov.io/gh/spack/spack) [![Read the Docs](https://readthedocs.org/projects/spack/badge/?version=latest)](https://spack.readthedocs.io) [![Slack](https://spackpm.herokuapp.com/badge.svg)](https://spackpm.herokuapp.com) diff --git a/share/spack/qa/setup.sh b/share/spack/qa/setup.sh index 61fb2a7706c..65364790154 100755 --- a/share/spack/qa/setup.sh +++ b/share/spack/qa/setup.sh @@ -20,24 +20,15 @@ export SPACK_ROOT=$(realpath "$QA_DIR/../../..") coverage="" coverage_run="" -# bash coverage depends on some other factors -- there are issues with -# kcov for Python 2.6, unit tests, and build tests. -if [[ $TEST_SUITE == unit && # kcov segfaults for the MPICH build test - $TRAVIS_OS_NAME == linux && - $TRAVIS_PYTHON_VERSION != 2.6 ]]; -then - BASH_COVERAGE="true" -else - BASH_COVERAGE="false" -fi - # Set up some variables for running coverage tests. if [[ "$COVERAGE" == "true" ]]; then # these set up coverage for Python coverage=coverage coverage_run="coverage run" - if [ "$BASH_COVERAGE" = true ]; then + # bash coverage depends on some other factors -- there are issues with + # kcov for Python 2.6, unit tests, and build tests. + if [[ $TRAVIS_PYTHON_VERSION != 2.6 ]]; then mkdir -p coverage cc_script="$SPACK_ROOT/lib/spack/env/cc" bashcov=$(realpath ${QA_DIR}/bashcov)