From 36fca2c29a5509ef78914ed76c3e9bfb654279f8 Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Fri, 24 Jan 2020 12:49:05 -0800 Subject: [PATCH 01/36] Updated and cleaned up the recipe for the LBANN and Hydrogen packages. (#14612) * Updated and cleaned up the recipe for the LBANN and Hydrogen packages. * Flake8 * Added type test for catch2 --- .../builtin/packages/hydrogen/package.py | 5 +++++ .../repos/builtin/packages/lbann/package.py | 20 ++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index 87d5f4479f0..1607bc73198 100644 --- a/var/spack/repos/builtin/packages/hydrogen/package.py +++ b/var/spack/repos/builtin/packages/hydrogen/package.py @@ -19,6 +19,7 @@ class Hydrogen(CMakePackage): maintainers = ['bvanessen'] version('develop', branch='hydrogen') + version('1.3.3', sha256='140112066b84d33ca4b75c8e520fb15748fa648c4d2b934c1eb5510173ede5f5') version('1.3.2', sha256='50bc5e87955f8130003d04dfd9dcad63107e92b82704f8107baf95b0ccf98ed6') version('1.3.1', sha256='a8b8521458e9e747f2b24af87c4c2749a06e500019c383e0cefb33e5df6aaa1d') version('1.3.0', sha256='0f3006aa1d8235ecdd621e7344c99f56651c6836c2e1bc0cf006331b70126b36') @@ -58,6 +59,8 @@ class Hydrogen(CMakePackage): description='Builds with Aluminum communication library') variant('omp_taskloops', default=False, description='Use OpenMP taskloops instead of parallel for loops.') + variant('half', default=True, + description='Builds with support for FP16 precision data types') # Note that #1712 forces us to enumerate the different blas variants depends_on('openblas', when='blas=openblas ~openmp_blas ~int64_blas') @@ -94,6 +97,7 @@ class Hydrogen(CMakePackage): depends_on('cuda', when='+cuda') depends_on('cub', when='+cuda') + depends_on('half', when='+half') conflicts('@0:0.98', msg="Hydrogen did not exist before v0.99. " + "Did you mean to use Elemental instead?") @@ -127,6 +131,7 @@ def cmake_args(self): '-DHydrogen_ENABLE_CUB=%s' % ('+cuda' in spec), '-DHydrogen_ENABLE_CUDA=%s' % ('+cuda' in spec), '-DHydrogen_ENABLE_TESTING=%s' % ('+test' in spec), + '-DHydrogen_ENABLE_HALF=%s' % ('+half' in spec), ] # Add support for OS X to find OpenMP diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index f12710763cf..7d4615a65a2 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -48,6 +48,7 @@ class Lbann(CMakePackage): '(note that for v0.99 conduit is required)') variant('vtune', default=False, description='Builds with support for Intel VTune') variant('docs', default=False, description='Builds with support for building documentation') + variant('extras', default=False, description='Add python modules for LBANN related tools') conflicts('@:0.90,0.99:', when='~conduit') @@ -96,7 +97,6 @@ class Lbann(CMakePackage): '~pthreads_pf ~python ~qt ~stitching ~superres ~ts ~video' '~videostab ~videoio ~vtk', when='+opencv') - depends_on('protobuf@3.6.1: build_type=Release') depends_on('cnpy') depends_on('nccl', when='@0.94:0.98.2 +gpu +nccl') @@ -107,20 +107,22 @@ class Lbann(CMakePackage): extends("python") depends_on('py-setuptools', type='build') depends_on('py-argparse', type='run', when='@:0.90,0.99: ^python@:2.6') - depends_on('py-configparser', type='run', when='@:0.90,0.99:') - depends_on('py-graphviz@0.10.1:', type='run', when='@:0.90,0.99:') - depends_on('py-matplotlib@3.0.0:', type='run', when='@:0.90,0.99:') - depends_on('py-numpy@1.16.0:', type=('build', 'run'), when='@:0.90,0.99:') - depends_on('py-onnx@1.3.0:', type='run', when='@:0.90,0.99:') - depends_on('py-pandas@0.24.1:', type='run', when='@:0.90,0.99:') - depends_on('py-texttable@1.4.0:', type='run', when='@:0.90,0.99:') + depends_on('py-configparser', type='run', when='@:0.90,0.99: +extras') + depends_on('py-graphviz@0.10.1:', type='run', when='@:0.90,0.99: +extras') + depends_on('py-matplotlib@3.0.0:', type='run', when='@:0.90,0.99: +extras') + depends_on('py-numpy@1.16.0:', type=('build', 'run'), when='@:0.90,0.99: +extras') + depends_on('py-onnx@1.3.0:', type='run', when='@:0.90,0.99: +extras') + depends_on('py-pandas@0.24.1:', type='run', when='@:0.90,0.99: +extras') + depends_on('py-texttable@1.4.0:', type='run', when='@:0.90,0.99: +extras') depends_on('py-pytest', type='test', when='@:0.90,0.99:') - depends_on('py-protobuf+cpp', type='run', when='@:0.90,0.99:') + depends_on('py-protobuf+cpp@3.6.1:', type=('build', 'run'), when='@:0.90,0.99:') depends_on('py-breathe', type='build', when='+docs') depends_on('py-m2r', type='build', when='+docs') depends_on('cereal') + depends_on('catch2', type='test') + depends_on('clara') generator = 'Ninja' depends_on('ninja', type='build') From d58390dbf7439374b06e8debfc4505d61c1d4043 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 22 Jan 2020 16:35:39 -0700 Subject: [PATCH 02/36] Add version 0.6.3 of yaml-cpp. --- var/spack/repos/builtin/packages/yaml-cpp/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/yaml-cpp/package.py b/var/spack/repos/builtin/packages/yaml-cpp/package.py index e3b6bf8a7b8..321792bd2ef 100644 --- a/var/spack/repos/builtin/packages/yaml-cpp/package.py +++ b/var/spack/repos/builtin/packages/yaml-cpp/package.py @@ -17,6 +17,7 @@ class YamlCpp(CMakePackage): git = "https://github.com/jbeder/yaml-cpp.git" version('develop', branch='master') + version('0.6.3', sha256='77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed') version('0.6.2', sha256='e4d8560e163c3d875fd5d9e5542b5fd5bec810febdcba61481fe5fc4e6b1fd05') version('0.5.3', sha256='decc5beabb86e8ed9ebeb04358d5363a5c4f72d458b2c788cb2f3ac9c19467b2') From d646c8d8d5bf4cf5ddcb4ac04ce29efa5a8cd2df Mon Sep 17 00:00:00 2001 From: Piotr Luszczek Date: Wed, 22 Jan 2020 18:13:01 -0500 Subject: [PATCH 03/36] magma: add new version 2.5.2 --- var/spack/repos/builtin/packages/magma/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/magma/package.py b/var/spack/repos/builtin/packages/magma/package.py index b4cf786d808..27f2f438e97 100644 --- a/var/spack/repos/builtin/packages/magma/package.py +++ b/var/spack/repos/builtin/packages/magma/package.py @@ -17,6 +17,7 @@ class Magma(CMakePackage): url = "http://icl.cs.utk.edu/projectsfiles/magma/downloads/magma-2.2.0.tar.gz" maintainers = ['luszczek'] + version('2.5.2', sha256='065feb85558f9dd6f4cc4db36ac633a3f787827fc832d0b578a049a43a195620') version('2.5.1', sha256='ce32c199131515336b30c92a907effe0c441ebc5c5bdb255e4b06b2508de109f') version('2.5.0', sha256='4fd45c7e46bd9d9124253e7838bbfb9e6003c64c2c67ffcff02e6c36d2bcfa33') version('2.4.0', sha256='4eb839b1295405fd29c8a6f5b4ed578476010bf976af46573f80d1169f1f9a4f') From 4d7d65736687cb03ac3c9b6ca685dca86935227a Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 25 Jan 2020 01:49:45 +0100 Subject: [PATCH 04/36] bugfix: make `_source_single_file` work in venvs (#14569) Using `sys.executable` to run Python in a sub-shell doesn't always work in a virtual environment as the `sys.executable` Python is not necessarily compatible with any loaded spack/other virtual environment. - revert use of sys.executable to print out subshell environment (#14496) - try instead to use an available python, then if there *is not* one, use `sys.executable` - this addresses RHEL8 (where there is no `python` and `PYTHONHOME` issue in a simpler way --- lib/spack/spack/util/environment.py | 11 ++++++++--- lib/spack/spack/util/module_cmd.py | 5 ++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py index 18a365dcefa..248a6d3c8c0 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -17,7 +17,6 @@ import llnl.util.tty as tty import spack.util.executable as executable -from spack.util.module_cmd import py_cmd from llnl.util.lang import dedupe @@ -919,8 +918,14 @@ def _source_single_file(file_and_args, environment): source_file.extend(x for x in file_and_args) source_file = ' '.join(source_file) - dump_environment = 'PYTHONHOME="{0}" "{1}" -c "{2}"'.format( - sys.prefix, sys.executable, py_cmd) + # If the environment contains 'python' use it, if not + # go with sys.executable. Below we just need a working + # Python interpreter, not necessarily sys.executable. + python_cmd = executable.which('python3', 'python', 'python2') + python_cmd = python_cmd.name if python_cmd else sys.executable + + dump_cmd = 'import os, json; print(json.dumps(dict(os.environ)))' + dump_environment = python_cmd + ' -c "{0}"'.format(dump_cmd) # Try to source the file source_file_arguments = ' '.join([ diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py index f7716854c7a..0edf7e6102a 100644 --- a/lib/spack/spack/util/module_cmd.py +++ b/lib/spack/spack/util/module_cmd.py @@ -18,7 +18,7 @@ # This list is not exhaustive. Currently we only use load and unload # If we need another option that changes the environment, add it here. module_change_commands = ['load', 'swap', 'unload', 'purge', 'use', 'unuse'] -py_cmd = 'import os; import json; print(json.dumps(dict(os.environ)))' +py_cmd = "'import os;import json;print(json.dumps(dict(os.environ)))'" # This is just to enable testing. I hate it but we can't find a better way _test_mode = False @@ -32,8 +32,7 @@ def module(*args): if args[0] in module_change_commands: # Do the module manipulation, then output the environment in JSON # and read the JSON back in the parent process to update os.environ - module_cmd += ' > /dev/null; PYTHONHOME="{0}" "{1}" -c "{2}"'.format( - sys.prefix, sys.executable, py_cmd) + module_cmd += ' >/dev/null;' + sys.executable + ' -c %s' % py_cmd module_p = subprocess.Popen(module_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, From 1c9337a5e42d23f952ddc5eea9da5d86ef253ecb Mon Sep 17 00:00:00 2001 From: Jordan Ogas Date: Fri, 24 Jan 2020 17:55:55 -0700 Subject: [PATCH 05/36] charliecloud package: add version 0.13; remove older versions (#14591) * Add version 0.13 and update to use Autotools build system * Remove all versions prior to 0.13 (which do not use Autotools) --- .../builtin/packages/charliecloud/package.py | 35 +++++++------------ 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/var/spack/repos/builtin/packages/charliecloud/package.py b/var/spack/repos/builtin/packages/charliecloud/package.py index dcacf003239..9329455d842 100644 --- a/var/spack/repos/builtin/packages/charliecloud/package.py +++ b/var/spack/repos/builtin/packages/charliecloud/package.py @@ -6,7 +6,7 @@ from spack import * -class Charliecloud(MakefilePackage): +class Charliecloud(AutotoolsPackage): """Lightweight user-defined software stacks for HPC.""" homepage = "https://hpc.github.io/charliecloud" @@ -14,19 +14,7 @@ class Charliecloud(MakefilePackage): git = "https://github.com/hpc/charliecloud.git" version('master', branch='master') - version('0.12', sha256='8a90f33406905cee935b5673a1159232b0b71845f4b6a26d28ca88f5d3f55891') - version('0.11', sha256='942d3c7a74c978fd7420cb2b255e618f4f0acaafb6025160bc3a4deeb687ef3c') - version('0.10', sha256='5cf00b170e7568750ca0b828c43c0857c39674860b480d757057450d69f1a21e') - version('0.9.10', sha256='44e821b62f9c447749d3ed0d2b2e44d374153058814704a5543e83f42db2a45a') - version('0.9.9', sha256='2624c5a0b19a01c9bca0acf873ceeaec401b9185a23e9108fadbcee0b9d74736') - version('0.9.8', sha256='903bcce05b19501b5524ef57a929d2f4c6ddeacb0e8443fcb2fe6963e2f29229') - version('0.9.7', sha256='ec80a4b9bef3a2161a783e11d99cc58e09a32dfbc8a6234c8f7ce7fa76e2f62d') - version('0.9.6', sha256='50e20d5e2a3710cd06e7c999db22495b07ef0fb15ffbc0af3bccac5387f0fddb') - version('0.9.3', sha256='f1bf032377b8845bc9a93b8a4fad6386161e35900223c0acc61d1f3aa3a87bc7') - version('0.9.2', sha256='8d0e4804d412beef720a66f886a0a78bce42f3269e880ebf11f602581f8047d4') - version('0.9.1', sha256='8e69150a271285da71ece7a09b48251ef6593f72207c5126741d9976aa737d95') - version('0.9.0', sha256='7e74cb16e31fd9d502198f7509bab14d1049ec68ba90b15e277e76f805db9458') - version('0.2.4', sha256='b9a8ff54b9d296e30b2cf5d64a7e732ad09e14b989645aaa5eee8a1dc7ee34e5') + version('0.13', sha256='5740bff6e410ca99484c1bdf3dbe834c0f753c846d55c19d6162967a3e2718e0') depends_on('python@3.4:', type=('build', 'run')) @@ -45,13 +33,14 @@ class Charliecloud(MakefilePackage): # bash automated testing harness (bats) depends_on('bats@0.4.0', type='test') - def url_for_version(self, version): - if version >= Version('0.9.8'): - url = "https://github.com/hpc/charliecloud/releases/download/v{0}/charliecloud-{0}.tar.gz" - else: - url = "https://github.com/hpc/charliecloud/archive/v{0}.tar.gz" - return url.format(version) + def configure_args(self): - @property - def install_targets(self): - return ['install', 'PREFIX=%s' % self.prefix] + args = [] + + if '+docs' not in self.spec: + args.append('--disable-html') + + if '+builder' not in self.spec: + args.append('--disable-ch-grow') + + return args From 6fd2c660225fd4fe72679346926e3d8ed58acb1f Mon Sep 17 00:00:00 2001 From: Kevin Manalo Date: Fri, 24 Jan 2020 19:56:59 -0500 Subject: [PATCH 06/36] IOR package: add version 3.2.1 (#14582) --- var/spack/repos/builtin/packages/ior/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/ior/package.py b/var/spack/repos/builtin/packages/ior/package.py index 0f8df49cfba..5a1d3f67dc5 100644 --- a/var/spack/repos/builtin/packages/ior/package.py +++ b/var/spack/repos/builtin/packages/ior/package.py @@ -11,9 +11,10 @@ class Ior(AutotoolsPackage): using POSIX, MPI-IO, or HDF5 interfaces.""" homepage = "https://github.com/hpc/ior" - url = "https://github.com/hpc/ior/archive/3.2.0.tar.gz" + url = "https://github.com/hpc/ior/archive/3.2.1.tar.gz" - version('3.2.0', sha256='91a766fb9c34b5780705d0997b71b236a1120da46652763ba11d9a8c44251852') + version('3.2.1', sha256='ebcf2495aecb357370a91a2d5852cfd83bba72765e586bcfaf15fb79ca46d00e') + version('3.2.0', sha256='91a766fb9c34b5780705d0997b71b236a1120da46652763ba11d9a8c44251852') version('3.0.1', sha256='0cbefbcdb02fb13ba364e102f9e7cc2dcf761698533dac25de446a3a3e81390d') variant('hdf5', default=False, description='support IO with HDF5 backend') From 33d35768e63b225434ec090fbe419115e616d6b1 Mon Sep 17 00:00:00 2001 From: Kevin Huck Date: Tue, 21 Jan 2020 14:58:38 -0800 Subject: [PATCH 07/36] Fixing GCC compiler setting for PDT package --- var/spack/repos/builtin/packages/pdt/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/pdt/package.py b/var/spack/repos/builtin/packages/pdt/package.py index 6d246a9b700..2d099b8dff8 100644 --- a/var/spack/repos/builtin/packages/pdt/package.py +++ b/var/spack/repos/builtin/packages/pdt/package.py @@ -43,6 +43,10 @@ def configure(self, spec, prefix): options.append('-icpc') elif self.compiler.name == 'pgi': options.append('-pgCC') + elif self.compiler.name == 'gcc': + options.append('-GNU') + else: + raise InstallError('Unknown/unsupported compiler family') configure(*options) From 95ddd3d6f2f2ae14127bcaac9e92456a7a5bfda5 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Thu, 16 Jan 2020 10:34:02 +0100 Subject: [PATCH 08/36] sbang: Fix perl binary detection The perl binary can also be called `perlX.Y.Z` if using a development build or simply using the versioned binary. We were also dropping all sbang arguments, since `exec $interpreter_v` was only using the first element of the `interpreter_v` array. --- bin/sbang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/sbang b/bin/sbang index 6ceff42e660..5c9ad37acd6 100755 --- a/bin/sbang +++ b/bin/sbang @@ -103,10 +103,10 @@ interpreter_f="${interpreter_v[0]}" # Invoke any interpreter found, or raise an error if none was found. if [[ -n "$interpreter_f" ]]; then - if [[ "${interpreter_f##*/}" = "perl" ]]; then - exec $interpreter_v -x "$@" + if [[ "${interpreter_f##*/}" = "perl"* ]]; then + exec $interpreter -x "$@" else - exec $interpreter_v "$@" + exec $interpreter "$@" fi else echo "error: sbang found no interpreter in $script" From 12a261523e2d3d21c8ea98eddee581a9fdd4a3ce Mon Sep 17 00:00:00 2001 From: Sajid Ali <30510036+s-sajid-ali@users.noreply.github.com> Date: Fri, 24 Jan 2020 19:20:36 -0600 Subject: [PATCH 09/36] New package: p3dfft3 (#14508) --- .../repos/builtin/packages/p3dfft3/package.py | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 var/spack/repos/builtin/packages/p3dfft3/package.py diff --git a/var/spack/repos/builtin/packages/p3dfft3/package.py b/var/spack/repos/builtin/packages/p3dfft3/package.py new file mode 100644 index 00000000000..a4dfe419411 --- /dev/null +++ b/var/spack/repos/builtin/packages/p3dfft3/package.py @@ -0,0 +1,103 @@ +# 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 P3dfft3(AutotoolsPackage): + """P3DFFT++ (a.k.a. P3DFFT v. 3) is a new generation of P3DFFT library + that aims to provide a comprehensive framework for simulating multiscale + phenomena. It takes the essence of P3DFFT further by creating an + extensible, modular structure uniquely adaptable to a greater range + of use cases.""" + + homepage = "https://www.p3dfft.net" + url = "https://github.com/sdsc/p3dfft.3/archive/v3.0.0.tar.gz" + git = "https://github.com/sdsc/p3dfft.3.git" + + version('develop', branch='master') + version('3.0.0', sha256='1c549e78097d1545d18552b039be0d11cdb96be46efe99a16b65fd5d546dbfa7') + + variant('fftw', default=True, + description='Builds with FFTW library') + variant('essl', default=False, + description='Builds with ESSL library') + variant('mpi', default=True, + description="Enable MPI support.") + variant('measure', default=False, + description="Define if you want to use" + "the measure fftw planner flag") + variant('estimate', default=False, + description="Define if you want to" + "use the estimate fftw planner flag") + variant('patient', default=False, + description="Define if you want to" + "use the patient fftw planner flag") + + # TODO: Add more configure options! + + depends_on('mpi', when='+mpi') + depends_on('fftw', when='+fftw') + depends_on('essl', when='+essl') + + def configure_args(self): + args = [] + + if '%gcc' in self.spec: + args.append('--enable-gnu') + + if '%intel' in self.spec: + args.append('--enable-intel') + + if '%xl' in self.spec: + args.append('--enable-ibm') + + if '%cce' in self.spec: + args.append('--enable-cray') + + if '%pgi' in self.spec: + args.append('--enable-pgi') + + if '+mpi' in self.spec: + args.append('CC=%s' % self.spec['mpi'].mpicc) + args.append('CXX=%s' % self.spec['mpi'].mpicxx) + args.append('FC=%s' % self.spec['mpi'].mpifc) + + if '+openmpi' in self.spec: + args.append('--enable-openmpi') + + if '+fftw' in self.spec: + args.append('--enable-fftw') + + if '@:3.0.0' in self.spec: + args.append('--with-fftw-lib=%s' % + self.spec['fftw'].prefix.lib) + args.append('--with-fftw-inc=%s' % + self.spec['fftw'].prefix.include) + else: + args.append('--with-fftw=%s' % self.spec['fftw'].prefix) + + if 'fftw+measure' in self.spec: + args.append('--enable-fftwmeasure') + if 'fftw+estimate' in self.spec: + args.append('--enable-fftwestimate') + if 'fftw+patient' in self.spec: + args.append('--enable-fftwpatient') + + if '+essl' in self.spec: + args.append('--enable-essl') + args.append('--with-essl-lib=%s' % + self.spec['essl'].prefix.lib) + args.append('--with-essl-inc=%s' % + self.spec['essl'].prefix.include) + + if '+mkl' in self.spec: + args.append('--enable-mkl') + args.append('--with-mkl-lib=%s' % + self.spec['mkl'].prefix.lib) + args.append('--with-mkl-inc=%s' % + self.spec['mkl'].prefix.include) + + return args From dcd8d7a620ad247daf0da771ea22859f9e651ca6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Jan 2020 19:28:20 -0600 Subject: [PATCH 10/36] Add spack config list command for tab completion (#14474) * Add spack config list command for tab completion * Update tab completion scripts --- lib/spack/spack/cmd/config.py | 21 ++++++++++++++++----- lib/spack/spack/test/cmd/config.py | 6 ++++++ share/spack/bash/spack-completion.in | 2 +- share/spack/spack-completion.bash | 8 ++++++-- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/cmd/config.py b/lib/spack/spack/cmd/config.py index b6055a7f6b6..b1a6454555d 100644 --- a/lib/spack/spack/cmd/config.py +++ b/lib/spack/spack/cmd/config.py @@ -56,6 +56,8 @@ def setup_parser(subparser): '--print-file', action='store_true', help="print the file name that would be edited") + sp.add_parser('list', help='list configuration sections') + def _get_scope_and_section(args): """Extract config scope and section from arguments.""" @@ -83,7 +85,6 @@ def config_get(args): With no arguments and an active environment, print the contents of the environment's manifest file (spack.yaml). - """ scope, section = _get_scope_and_section(args) @@ -113,7 +114,6 @@ def config_edit(args): With no arguments and an active environment, edit the spack.yaml for the active environment. - """ scope, section = _get_scope_and_section(args) if not scope and not section: @@ -127,8 +127,19 @@ def config_edit(args): editor(config_file) +def config_list(args): + """List the possible configuration sections. + + Used primarily for shell tab completion scripts. + """ + print(' '.join(list(spack.config.section_schemas))) + + def config(parser, args): - action = {'get': config_get, - 'blame': config_blame, - 'edit': config_edit} + action = { + 'get': config_get, + 'blame': config_blame, + 'edit': config_edit, + 'list': config_list, + } action[args.config_command](args) diff --git a/lib/spack/spack/test/cmd/config.py b/lib/spack/spack/test/cmd/config.py index 34982d46b3a..82a9d814ea9 100644 --- a/lib/spack/spack/test/cmd/config.py +++ b/lib/spack/spack/test/cmd/config.py @@ -91,3 +91,9 @@ def test_config_edit_fails_correctly_with_no_env(mutable_mock_env_path): def test_config_get_fails_correctly_with_no_env(mutable_mock_env_path): output = config('get', fail_on_error=False) assert "requires a section argument or an active environment" in output + + +def test_config_list(): + output = config('list') + assert 'compilers' in output + assert 'packages' in output diff --git a/share/spack/bash/spack-completion.in b/share/spack/bash/spack-completion.in index 2ab39a57a38..ca15b8dfb27 100755 --- a/share/spack/bash/spack-completion.in +++ b/share/spack/bash/spack-completion.in @@ -218,7 +218,7 @@ _keys() { _config_sections() { if [[ -z "${SPACK_CONFIG_SECTIONS:-}" ]] then - SPACK_CONFIG_SECTIONS="compilers mirrors repos packages modules config upstreams" + SPACK_CONFIG_SECTIONS="$(spack config list)" fi SPACK_COMPREPLY="$SPACK_CONFIG_SECTIONS" } diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 9550137bff4..20a5d936ea0 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -218,7 +218,7 @@ _keys() { _config_sections() { if [[ -z "${SPACK_CONFIG_SECTIONS:-}" ]] then - SPACK_CONFIG_SECTIONS="compilers mirrors repos packages modules config upstreams" + SPACK_CONFIG_SECTIONS="$(spack config list)" fi SPACK_COMPREPLY="$SPACK_CONFIG_SECTIONS" } @@ -584,7 +584,7 @@ _spack_config() { then SPACK_COMPREPLY="-h --help --scope" else - SPACK_COMPREPLY="get blame edit" + SPACK_COMPREPLY="get blame edit list" fi } @@ -615,6 +615,10 @@ _spack_config_edit() { fi } +_spack_config_list() { + SPACK_COMPREPLY="-h --help" +} + _spack_configure() { if $list_options then From 80745128b3b4a48356617d4a100003ec22dcf1ed Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Fri, 24 Jan 2020 20:05:50 -0600 Subject: [PATCH 11/36] harfbuzz package: add conflict for @2.3.1: with intel compiler (#14386) harfbuzz 2.3.1 (and presumably all future versions after it) does not build with the Intel compiler --- var/spack/repos/builtin/packages/harfbuzz/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py index 450432c9464..4ab6005dbf0 100644 --- a/var/spack/repos/builtin/packages/harfbuzz/package.py +++ b/var/spack/repos/builtin/packages/harfbuzz/package.py @@ -27,6 +27,9 @@ class Harfbuzz(AutotoolsPackage): depends_on("zlib") depends_on("graphite2", when='+graphite2') + conflicts('%intel', when='@2.3.1:', + msg='harfbuzz-2.3.1 does not build with the Intel compiler') + def configure_args(self): args = [] # disable building of gtk-doc files following #9771 From 9a6b3b3a07eb840a49dafb48234a0bd447021ef3 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, 25 Jan 2020 10:14:14 +0800 Subject: [PATCH 12/36] New package: MBDyn (#14438) --- .../repos/builtin/packages/mbdyn/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mbdyn/package.py diff --git a/var/spack/repos/builtin/packages/mbdyn/package.py b/var/spack/repos/builtin/packages/mbdyn/package.py new file mode 100644 index 00000000000..ccaf44a2620 --- /dev/null +++ b/var/spack/repos/builtin/packages/mbdyn/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 Mbdyn(AutotoolsPackage): + """MBDyn is the first and possibly the only free general purpose + multibody dynamics analysis software.""" + + homepage = "https://www.mbdyn.org/" + url = "https://www.mbdyn.org/userfiles/downloads/mbdyn-1.7.3.tar.gz" + + version('1.7.3', sha256='3cf05cd1cb14c1af3d987aac119b6ecf0d835bc1aee06bc4cf7cc5a245c1f36d') + + # Failed to build mbdyn with gcc@4.8.5 and gcc@9.2.0 + conflicts('%gcc@:5.0,9.0:') From f8e0f4251d6aad243d9bdad792eb90c6170dc0c9 Mon Sep 17 00:00:00 2001 From: plamborn Date: Fri, 24 Jan 2020 19:20:02 -0700 Subject: [PATCH 13/36] libhio: remove autoreconf method (#14283) The autoreconf is not necessary and can cause errors. --- var/spack/repos/builtin/packages/libhio/package.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/libhio/package.py b/var/spack/repos/builtin/packages/libhio/package.py index 352a2d5a2a9..42ef377a5ad 100644 --- a/var/spack/repos/builtin/packages/libhio/package.py +++ b/var/spack/repos/builtin/packages/libhio/package.py @@ -49,10 +49,6 @@ class Libhio(AutotoolsPackage): patch('0001-hdf5-make-docs-optional.patch', when="@1.4.1.0") patch('0001-spack-fix-for-spack-to-work-on-non-cray-systems.patch', when="@1.4.1.2") - def autoreconf(self, spec, prefix): - autoreconf = which('autoreconf') - autoreconf('-ifv') - def configure_args(self): spec = self.spec args = [] From bb29932362b63797049ead92c7c5a65289491a31 Mon Sep 17 00:00:00 2001 From: iarspider Date: Sat, 25 Jan 2020 03:34:37 +0100 Subject: [PATCH 14/36] py-pygdal package: 2.4.0 depends on gdal 2.4.1 (#14075) --- var/spack/repos/builtin/packages/py-pygdal/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-pygdal/package.py b/var/spack/repos/builtin/packages/py-pygdal/package.py index 548c2d9df32..aa3494539d7 100644 --- a/var/spack/repos/builtin/packages/py-pygdal/package.py +++ b/var/spack/repos/builtin/packages/py-pygdal/package.py @@ -29,5 +29,6 @@ class PyPygdal(PythonPackage): depends_on('py-numpy@1.0.0:', type=('build', 'run')) depends_on('gdal@3.0.1', type=('build', 'link', 'run'), when='@3.0.1.5') depends_on('gdal@2.4.2', type=('build', 'link', 'run'), when='@2.4.2.5') + depends_on('gdal@2.4.1', type=('build', 'link', 'run'), when='@2.4.0') depends_on('gdal@1.11.5', type=('build', 'link', 'run'), when='@1.11.5.3') depends_on('gdal@1.11.4', type=('build', 'link', 'run'), when='@1.11.4.3') From 35db2d05b787de449ad2327568b793c75e8eed7e Mon Sep 17 00:00:00 2001 From: Mathew Cleveland Date: Fri, 24 Jan 2020 19:58:22 -0700 Subject: [PATCH 15/36] py-opppy package: add version 0_1_2 (#14229) --- var/spack/repos/builtin/packages/py-opppy/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-opppy/package.py b/var/spack/repos/builtin/packages/py-opppy/package.py index d6f11577c2d..6e512b12c66 100644 --- a/var/spack/repos/builtin/packages/py-opppy/package.py +++ b/var/spack/repos/builtin/packages/py-opppy/package.py @@ -12,10 +12,11 @@ class PyOpppy(PythonPackage): output and dump files generated by scientific software packages.""" homepage = "https://github.com/lanl/opppy" - url = "https://github.com/lanl/OPPPY/archive/OPPPY-0_1_1.tar.gz" + url = "https://github.com/lanl/OPPPY/archive/opppy-0_1_2.tar.gz" git = "https://github.com/lanl/opppy.git" version('master', branch='master') + version('0_1_2', sha256='ef3795d3164fa0aa7ea7da7e223d6d0a48d2960aefd03a7d90cdb8b8f480cd4c') version('0_1_1', sha256='505c023853e75552abc65de9777a125ecb6a99a1cb4e605a4f702af837e3168b') depends_on('py-setuptools', type=('build', 'run')) From 71243f3f7b85ffcd63bf8d54f801fa515458ff07 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Fri, 24 Jan 2020 22:57:16 -0600 Subject: [PATCH 16/36] Get py-torch to build caffe2 (#14619) * Get py-torch to build caffe2 This PR gets the py-torch package to build with caffe2, and closes issue #14576. If building on a machine with CUDA but no GPU the build will try to build with all compute capabilities. Older compute capabilities are not supported so the build will fail. The list of capabilities can be passed to the build using values set in the cuda_arch variant. Likewise, conflicts are also set to catch if the unsupported capabilities are listed in cuda_arch. This PR also sets version constraints on using an external mkldnn for newer versions. Currenly, only versions up to 0.4 use an external mkldnn library. Also, the cuda variant is set to True, which restores previous behavior. * Update var/spack/repos/builtin/packages/py-torch/package.py Fix typo. Co-Authored-By: Adam J. Stewart * Adjust conflicts This commit adjusts the conflicts. There is an issue with the cuda_arch=20 conflicts directive as there is a conflicting dependency with any version >=1.1 and a cuda_arch=20 dependency specified in CudaPackage that gets trapped first. * Use a common message for conflicts This commit adds a variable to contain the bulk of the message stringi for the cuda_arch conflicts. This is used along with a version string in the conflicts directives messages. * Fix the strings - Use a multiline string for the cuda_arch_conflict variable. - No need for format() in the msg value. Co-authored-by: Adam J. Stewart --- .../builtin/packages/py-torch/package.py | 33 +++++++++++++++++-- 1 file changed, 31 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 dcec15dc684..2a20235bef9 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -62,6 +62,7 @@ class PyTorch(PythonPackage, CudaPackage): version('0.4.0', tag='v0.4.0', submodules=True) version('0.3.1', tag='v0.3.1', submodules=True) + variant('cuda', default=True, description='Build with CUDA') variant('cudnn', default=True, description='Enables the cuDNN build') variant('magma', default=False, description='Enables the MAGMA build') variant('fbgemm', default=False, description='Enables the FBGEMM build') @@ -100,6 +101,27 @@ class PyTorch(PythonPackage, CudaPackage): conflicts('+zstd', when='@:1.0') conflicts('+tbb', when='@:1.1') + cuda_arch_conflict = ('This version of Torch/Caffe2 only supports compute ' + 'capabilities ') + + conflicts('cuda_arch=none', when='+cuda+caffe2', + 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+caffe2', + msg=cuda_arch_conflict + '>=5.3') + conflicts('cuda_arch=50', when='@1.3.0:+cuda+caffe2', + msg=cuda_arch_conflict + '>=5.3') + conflicts('cuda_arch=35', when='@1.3.0:+cuda+caffe2', + msg=cuda_arch_conflict + '>=5.3') + conflicts('cuda_arch=32', when='@1.3.0:+cuda+caffe2', + msg=cuda_arch_conflict + '>=5.3') + conflicts('cuda_arch=30', when='@1.3.0:+cuda+caffe2', + msg=cuda_arch_conflict + '>=5.3') + conflicts('cuda_arch=30', when='@1.2.0:+cuda+caffe2', + msg=cuda_arch_conflict + '>=3.2') + conflicts('cuda_arch=20', when='@1.0.0:+cuda+caffe2', + msg=cuda_arch_conflict + '>=3.0') + # Required dependencies depends_on('cmake@3.5:', type='build') # Use Ninja generator to speed up build times @@ -128,7 +150,10 @@ class PyTorch(PythonPackage, CudaPackage): # depends_on('fbgemm', when='+fbgemm') # TODO: add dependency: https://github.com/ROCmSoftwarePlatform/MIOpen # depends_on('miopen', when='+miopen') - depends_on('intel-mkl-dnn', when='+mkldnn') + # TODO: See if there is a way to use an external mkldnn installation. + # Currently, only older versions of py-torch use an external mkldnn + # library. + depends_on('intel-mkl-dnn', when='@0.4:0.4.1+mkldnn') # TODO: add dependency: https://github.com/Maratyszcza/NNPACK # depends_on('nnpack', when='+nnpack') depends_on('qnnpack', when='+qnnpack') @@ -197,6 +222,10 @@ def enable_or_disable(variant, keyword='USE', var=None, newer=False): enable_or_disable('cuda') if '+cuda' in self.spec: env.set('CUDA_HOME', self.spec['cuda'].prefix) + torch_cuda_arch = ';'.join('{0:.1f}'.format(float(i) / 10.0) for i + in + self.spec.variants['cuda_arch'].value) + env.set('TORCH_CUDA_ARCH_LIST', torch_cuda_arch) enable_or_disable('cudnn') if '+cudnn' in self.spec: @@ -213,7 +242,7 @@ def enable_or_disable(variant, keyword='USE', var=None, newer=False): env.set('MIOPEN_LIBRARY', self.spec['miopen'].libs[0]) enable_or_disable('mkldnn') - if '+mkldnn' in self.spec: + if '@0.4:0.4.1+mkldnn' in self.spec: env.set('MKLDNN_HOME', self.spec['intel-mkl-dnn'].prefix) enable_or_disable('nnpack') From a57edb7029ef5946d56a59168c1c8e454677871c Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Fri, 24 Jan 2020 21:16:48 -0800 Subject: [PATCH 17/36] configure z3+python to build python libraries in its own prefix (#14604) --- var/spack/repos/builtin/packages/z3/package.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/z3/package.py b/var/spack/repos/builtin/packages/z3/package.py index 6a47a720a5b..bd02c0c0dbd 100644 --- a/var/spack/repos/builtin/packages/z3/package.py +++ b/var/spack/repos/builtin/packages/z3/package.py @@ -22,6 +22,7 @@ class Z3(MakefilePackage): variant('python', default=False, description='Enable python binding') depends_on('python', type=('build', 'run')) + extends('python', when='+python') # Referenced: https://github.com/Z3Prover/z3/issues/1016 patch('fix_1016_1.patch', when='@:4.4.1') @@ -31,9 +32,18 @@ class Z3(MakefilePackage): def configure_args(self): spec = self.spec - return [ - '--python' if '+python' in spec else '' - ] + + args = [] + + if spec.satisfies('+python'): + args.append('--python') + args.append( + '--pypkgdir=%s' % join_path( + prefix.lib, + 'python%s' % spec['python'].version.up_to(2), + 'site-packages')) + + return args def bootstrap(self, spec, prefix): options = ['--prefix={0}'.format(prefix)] + self.configure_args() From 1e09de73b76ba8b8bbc58d708721371fa7ac61cb Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Sat, 25 Jan 2020 10:22:21 -0800 Subject: [PATCH 18/36] libcircle: add v0.3 (#14611) --- var/spack/repos/builtin/packages/libcircle/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libcircle/package.py b/var/spack/repos/builtin/packages/libcircle/package.py index ffe9ad7cb55..f710d25f24d 100644 --- a/var/spack/repos/builtin/packages/libcircle/package.py +++ b/var/spack/repos/builtin/packages/libcircle/package.py @@ -15,6 +15,7 @@ class Libcircle(AutotoolsPackage): url = "https://github.com/hpc/libcircle/releases/download/0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz" version('master', branch='master') + version('0.3.0', sha256='5ce38eb5b3c2b394bca1316310758f276c893dd3f4c15d7bc14ea05d3110ce58', url='https://github.com/hpc/libcircle/releases/download/v0.3/libcircle-0.3.0.tar.gz') version('0.2.1-rc.1', sha256='5747f91cf4417023304dcc92fd07e3617ac712ca1eeb698880979bbca3f54865') depends_on('mpi') From 1fd335d6549bf731ec36c9b5079bc29328a9c853 Mon Sep 17 00:00:00 2001 From: Brian Homerding Date: Sat, 25 Jan 2020 12:26:11 -0600 Subject: [PATCH 19/36] Removing flang variant from llvm package (#14600) --- .../repos/builtin/packages/llvm/package.py | 89 ++----------------- 1 file changed, 6 insertions(+), 83 deletions(-) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index e31fe1c0a3c..f2356971d5e 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -87,20 +87,16 @@ class Llvm(CMakePackage): variant('omp_tsan', default=False, description="Build with OpenMP capable thread sanitizer") variant('python', default=False, description="Install python bindings") - variant('flang', default=False, - description='Build flang branch version instead') extends('python', when='+python') # Build dependency depends_on('cmake@3.4.3:', type='build') depends_on('python@2.7:2.8', when='@:4.999 ~python', type='build') - depends_on('python@2.7:2.8', when='@5: ~python +flang', type='build') depends_on('python', when='@5: ~python', type='build') # Universal dependency depends_on('python@2.7:2.8', when='@:4.999+python') - depends_on('python@2.7:2.8', when='@5:+python+flang') depends_on('python', when='@5:+python') # openmp dependencies @@ -119,59 +115,6 @@ class Llvm(CMakePackage): depends_on('gmp', when='@:3.6.999 +polly') depends_on('isl', when='@:3.6.999 +polly') - resource(name='flang-llvm', - git='https://github.com/flang-compiler/llvm.git', - branch='release_60', - placement='llvm-flang', - when='llvm@develop+flang') - - resource(name='flang-llvm', - git='https://github.com/flang-compiler/llvm.git', - commit='d8b30082648dc869eba68f9e539605f437d7760c', - placement='llvm-flang', - when='@7.0.1+flang') - - resource(name='flang-llvm', - git='https://github.com/flang-compiler/llvm.git', - commit='f26a3ece4ccd68a52f5aa970ec42837ee0743296', - placement='llvm-flang', - when='@6.0.0+flang') - - resource(name='flang-driver', - git='https://github.com/flang-compiler/flang-driver.git', - branch='release_60', - destination='llvm-flang/tools', - placement='clang', - when='llvm@develop+flang') - - resource(name='flang-driver', - git='https://github.com/flang-compiler/flang-driver.git', - commit='dd7587310ae498c22514a33e1a2546b86af9cf25', - destination='llvm-flang/tools', - placement='clang', - when='@7.0.1+flang') - - resource(name='flang-driver', - git='https://github.com/flang-compiler/flang-driver.git', - commit='e079fa68cb35a53c88c41a1939f90b94d539e984', - destination='llvm-flang/tools', - placement='clang', - when='@6.0.0+flang') - - resource(name='openmp', - git='https://github.com/llvm-mirror/openmp.git', - branch='release_60', - destination='llvm-flang/projects', - placement='openmp', - when='@develop+flang') - - resource(name='openmp', - git='https://github.com/llvm-mirror/openmp.git', - commit='d5aa29cb3bcf51289d326b4e565613db8aff65ef', - destination='llvm-flang/projects', - placement='openmp', - when='@6:7.0.1+flang') - conflicts('+clang_extra', when='~clang') conflicts('+lldb', when='~clang') @@ -182,15 +125,6 @@ class Llvm(CMakePackage): # OMP TSAN exists in > 5.x conflicts('+omp_tsan', when='@:5.99') - # +flang conflicts other variants - conflicts('+gold', when='+flang') - conflicts('+lldb', when='+flang') - conflicts('+lld', when='+flang') - conflicts('+copiler-rt', when='+flang') - conflicts('+libcxx', when='+flang') - conflicts('+polly', when='+flang') - conflicts('+internal_unwind', when='+flang') - # Github issue #4986 patch('llvm_gcc7.patch', when='@4.0.0:4.0.1+lldb %gcc@7.0:') # Backport from llvm master + additional fix @@ -235,13 +169,7 @@ def setup_run_environment(self, env): env.set('CC', join_path(self.spec.prefix.bin, 'clang')) env.set('CXX', join_path(self.spec.prefix.bin, 'clang++')) - # When building flang we do not use the mono repo - @property - def root_cmakelists_dir(self): - if '+flang' in self.spec: - return 'llvm-flang' - else: - return 'llvm' + root_cmakelists_dir = 'llvm' def cmake_args(self): spec = self.spec @@ -283,7 +211,7 @@ def cmake_args(self): if '+libcxx' in spec: projects.append('libcxx') projects.append('libcxxabi') - if spec.satisfies('@3.9.0:') and '+flang' not in spec: + if spec.satisfies('@3.9.0:'): cmake_args.append('-DCLANG_DEFAULT_CXX_STDLIB=libc++') if '+internal_unwind' in spec: projects.append('libunwind') @@ -300,14 +228,10 @@ def cmake_args(self): if '+all_targets' not in spec: # all is default on cmake targets = ['NVPTX', 'AMDGPU'] - if (spec.version < Version('3.9.0') - and '+flang' not in spec): + if (spec.version < Version('3.9.0')): # Starting in 3.9.0 CppBackend is no longer a target (see # LLVM_ALL_TARGETS in llvm's top-level CMakeLists.txt for # the complete list of targets) - - # This also applies to the version of llvm used by flang - # hence the test to see if the version starts with "flang". targets.append('CppBackend') if spec.target.family == 'x86' or spec.target.family == 'x86_64': @@ -340,10 +264,9 @@ def cmake_args(self): spec.satisfies('platform=linux'): cmake_args.append('-DCMAKE_BUILD_WITH_INSTALL_RPATH=1') - if '+flang' not in spec: - # Semicolon seperated list of projects to enable - cmake_args.append( - '-DLLVM_ENABLE_PROJECTS:STRING={0}'.format(';'.join(projects))) + # Semicolon seperated list of projects to enable + cmake_args.append( + '-DLLVM_ENABLE_PROJECTS:STRING={0}'.format(';'.join(projects))) return cmake_args From f569577747dc27da776cb87b8e6d699377921b6c Mon Sep 17 00:00:00 2001 From: Hadrien G Date: Sat, 25 Jan 2020 19:35:53 +0100 Subject: [PATCH 20/36] acts-core: Add and adapt to ACTS v0.14.0 and v0.15.0 (#14580) * Add and adapt to ACTS v0.14.0 * Add v0.15.0 too --- var/spack/repos/builtin/packages/acts-core/package.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/acts-core/package.py b/var/spack/repos/builtin/packages/acts-core/package.py index c1ce827b327..16ecd155bc6 100644 --- a/var/spack/repos/builtin/packages/acts-core/package.py +++ b/var/spack/repos/builtin/packages/acts-core/package.py @@ -34,6 +34,8 @@ class ActsCore(CMakePackage): maintainers = ['HadrienG2'] version('develop', branch='master') + version('0.15.0', commit='267c28f69c561e64369661a6235b03b5a610d6da') + version('0.14.0', commit='38d678fcb205b77d60326eae913fbb1b054acea1') version('0.13.0', commit='b33f7270ddbbb33050b7ec60b4fa255dc2bfdc88') version('0.12.1', commit='a8b3d36e7c6cb86487637589e0eff7bbe626054a') version('0.12.0', commit='f9cda77299606d78c889fb1db2576c1971a271c4') @@ -68,10 +70,11 @@ class ActsCore(CMakePackage): variant('json', default=False, description='Build the Json plugin') variant('tgeo', default=False, description='Build the TGeo plugin') - depends_on('cmake @3.9:', type='build') + depends_on('cmake @3.11:', type='build') depends_on('boost @1.62:1.69.99 +program_options +test', when='@:0.10.3') depends_on('boost @1.62: +program_options +test', when='@0.10.4:') depends_on('eigen @3.2.9:', type='build') + depends_on('nlohmann-json @3.2.0:', when='@0.14.0: +json') depends_on('root @6.10: cxxstd=14', when='+tgeo @:0.8.0') depends_on('root @6.10:', when='+tgeo @0.8.1:') depends_on('dd4hep @1.2:', when='+dd4hep') @@ -99,4 +102,7 @@ def cmake_variant(cmake_label, spack_variant): cxxstd = spec['root'].variants['cxxstd'].value args.append("-DCMAKE_CXX_STANDARD={0}".format(cxxstd)) + if spec.satisfies('@0.14.0: +json'): + args.append("-DACTS_USE_BUNDLED_NLOHMANN_JSON=OFF") + return args From c7002009591c79376f4d4a96d5b45f81b35f9c7f Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 25 Jan 2020 12:44:51 -0600 Subject: [PATCH 21/36] Get vtk-8.2.0 to build (#14562) This PR adds some extra dependencies needed for vtk-8.2.0. It also handles the variable name changes to turn off some of the external libraries. --- .../repos/builtin/packages/vtk/package.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index a1298ea7a73..87fce79af29 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -91,6 +91,9 @@ class Vtk(CMakePackage): depends_on('libpng') depends_on('libtiff') depends_on('zlib') + depends_on('eigen', when='@8.2.0:') + depends_on('double-conversion', when='@8.2.0:') + depends_on('sqlite', when='@8.2.0:') def url_for_version(self, version): url = "http://www.vtk.org/files/release/{0}/VTK-{1}.tar.gz" @@ -117,8 +120,6 @@ def cmake_args(self): # However, in a few cases we can't do without them yet '-DVTK_USE_SYSTEM_GL2PS:BOOL=OFF', '-DVTK_USE_SYSTEM_LIBHARU=OFF', - '-DVTK_USE_SYSTEM_LIBPROJ4:BOOL=OFF', - '-DVTK_USE_SYSTEM_OGGTHEORA:BOOL=OFF', '-DNETCDF_DIR={0}'.format(spec['netcdf-c'].prefix), '-DNETCDF_C_ROOT={0}'.format(spec['netcdf-c'].prefix), @@ -132,6 +133,20 @@ def cmake_args(self): '-DVTK_WRAP_TCL=OFF', ] + # Some variable names have changed + if spec.satisfies('@8.2.0:'): + cmake_args.extend([ + '-DVTK_USE_SYSTEM_OGG:BOOL=OFF', + '-DVTK_USE_SYSTEM_THEORA:BOOL=OFF', + '-DVTK_USE_SYSTEM_LIBPROJ:BOOL=OFF', + '-DVTK_USE_SYSTEM_PUGIXML:BOOL=OFF', + ]) + else: + cmake_args.extend([ + '-DVTK_USE_SYSTEM_OGGTHEORA:BOOL=OFF', + '-DVTK_USE_SYSTEM_LIBPROJ4:BOOL=OFF', + ]) + if '+mpi' in spec: cmake_args.extend([ '-DVTK_Group_MPI:BOOL=ON', From cb3f4081a0c73f0e679ab72e5cf647b79a1ca32e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 25 Jan 2020 12:45:09 -0600 Subject: [PATCH 22/36] Add TensorFlow 2.0.1 (#14623) --- var/spack/repos/builtin/packages/py-tensorflow/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 129110d5c0e..69ae87af45c 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -19,6 +19,7 @@ class PyTensorflow(Package, CudaPackage): import_modules = ['tensorflow'] version('2.1.0', sha256='638e541a4981f52c69da4a311815f1e7989bf1d67a41d204511966e1daed14f7') + version('2.0.1', sha256='29197d30923b9670992ee4b9c6161f50c7452e9a4158c720746e846080ac245a') version('2.0.0', sha256='49b5f0495cd681cbcb5296a4476853d4aea19a43bdd9f179c928a977308a0617') version('1.15.1', sha256='19b6e72bc8675937f618cede364d7228a71c2eeaffc42801bcefd98dda7ca056') version('1.15.0', sha256='a5d49c00a175a61da7431a9b289747d62339be9cf37600330ad63b611f7f5dc9') From a26e5caa572a2c1cb39225bc52f20dc49589fb02 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 25 Jan 2020 19:39:36 -0500 Subject: [PATCH 23/36] h5cpp: Download from github release instead of git repo (#14573) * h5cpp: Download from github release instead of git repo * Correct typo in package description --- var/spack/repos/builtin/packages/h5cpp/package.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/h5cpp/package.py b/var/spack/repos/builtin/packages/h5cpp/package.py index 1e65677e020..373aa1303d7 100644 --- a/var/spack/repos/builtin/packages/h5cpp/package.py +++ b/var/spack/repos/builtin/packages/h5cpp/package.py @@ -7,15 +7,16 @@ class H5cpp(CMakePackage): - """Easy to use HDF5 C++ templates for Serial and Paralell HDF5""" + """Easy to use HDF5 C++ templates for Serial and Parallel HDF5""" homepage = "http://h5cpp.org" - # url = "https://github.com/steven-varga/h5cpp" + url = "https://github.com/steven-varga/h5cpp/archive/v1.10.4-5.tar.gz" git = "https://github.com/steven-varga/h5cpp.git" maintainers = ['eschnett'] - version('master', branch='master') + version('master', branch='master') + version('1.10.4-5', sha256='42d0ca1aaff1ead8998a26d892a51c12b1b89023382f191dc438bd0fa4513455') variant('mpi', default=True, description='Include MPI support') From d2098d337a6cdf9cd58c6c30b4800cbb1682335f Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Sat, 25 Jan 2020 21:15:12 -0600 Subject: [PATCH 24/36] When spack install checks for buildcaches only add urls for current arch. (#14467) --- lib/spack/spack/binary_distribution.py | 12 +++++++++--- lib/spack/spack/package.py | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index acfe6f2cea1..55feacc7c4c 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -663,7 +663,7 @@ def extract_tarball(spec, filename, allow_root=False, unsigned=False, _cached_specs = None -def get_specs(force=False): +def get_specs(force=False, use_arch=False): """ Get spec.yaml's for build caches available on mirror """ @@ -690,7 +690,10 @@ def get_specs(force=False): for file in files: if re.search('spec.yaml', file): link = url_util.join(fetch_url_build_cache, file) - urls.add(link) + if use_arch and re.search(spack.architecture(), file): + urls.add(link) + else: + urls.add(link) else: tty.msg("Finding buildcaches at %s" % url_util.format(fetch_url_build_cache)) @@ -698,7 +701,10 @@ def get_specs(force=False): url_util.join(fetch_url_build_cache, 'index.html')) for link in links: if re.search("spec.yaml", link): - urls.add(link) + if use_arch and re.search(spack.architecture(), link): + urls.add(link) + else: + urls.add(link) _cached_specs = [] for link in urls: diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index ba3cf2961bb..cc13017f4c8 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1507,7 +1507,7 @@ def _update_explicit_entry_in_db(self, rec, explicit): def try_install_from_binary_cache(self, explicit): tty.msg('Searching for binary cache of %s' % self.name) - specs = binary_distribution.get_specs() + specs = binary_distribution.get_specs(use_arch=True) binary_spec = spack.spec.Spec.from_dict(self.spec.to_dict()) binary_spec._mark_concrete() if binary_spec not in specs: From f8be90cf3f00b30cf3a364701008d8680f56f406 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 26 Jan 2020 15:41:09 -0600 Subject: [PATCH 25/36] Add TensorFlow 1.15.2 (#14624) --- var/spack/repos/builtin/packages/py-tensorflow/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 69ae87af45c..d493c32283f 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -21,6 +21,7 @@ class PyTensorflow(Package, CudaPackage): version('2.1.0', sha256='638e541a4981f52c69da4a311815f1e7989bf1d67a41d204511966e1daed14f7') version('2.0.1', sha256='29197d30923b9670992ee4b9c6161f50c7452e9a4158c720746e846080ac245a') version('2.0.0', sha256='49b5f0495cd681cbcb5296a4476853d4aea19a43bdd9f179c928a977308a0617') + version('1.15.2', sha256='d95d75d26a298211b5e802842e87fda5b8b14f6ad83719377b391e5fb71b8746') version('1.15.1', sha256='19b6e72bc8675937f618cede364d7228a71c2eeaffc42801bcefd98dda7ca056') version('1.15.0', sha256='a5d49c00a175a61da7431a9b289747d62339be9cf37600330ad63b611f7f5dc9') version('1.14.0', sha256='aa2a6a1daafa3af66807cfe0bc77bfe1144a9a53df9a96bab52e3e575b3047ed') From 06e100d5ccb99d15cfacebb83a57b3154f2317f8 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 26 Jan 2020 18:06:38 -0500 Subject: [PATCH 26/36] curl: New version 7.68.0 (#14625) --- var/spack/repos/builtin/packages/curl/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py index 95c770463f3..e0e964893f9 100644 --- a/var/spack/repos/builtin/packages/curl/package.py +++ b/var/spack/repos/builtin/packages/curl/package.py @@ -15,6 +15,7 @@ class Curl(AutotoolsPackage): # URL must remain http:// so Spack can bootstrap curl url = "http://curl.haxx.se/download/curl-7.60.0.tar.bz2" + version('7.68.0', sha256='207f54917dd6a2dc733065ccf18d61bb5bebeaceb5df49cd9445483e8623eeb9') version('7.63.0', sha256='9bab7ed4ecff77020a312d84cc5fb7eb02d58419d218f267477a724a17fd8dd8') version('7.60.0', sha256='897dfb2204bd99be328279f88f55b7c61592216b0542fcbe995c60aa92871e9b') version('7.59.0', sha256='b5920ffd6a8c95585fb95070e0ced38322790cb335c39d0dab852d12e157b5a0') From 87c55b79c5bd35f68b98b81e1c7431aa62784530 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 26 Jan 2020 18:22:26 -0500 Subject: [PATCH 27/36] hwloc: New version 2.1.0 (#14627) --- var/spack/repos/builtin/packages/hwloc/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index b87579f38d7..2b7968a37a5 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -28,6 +28,7 @@ class Hwloc(AutotoolsPackage): git = 'https://github.com/open-mpi/hwloc.git' version('master', branch='master') + version('2.1.0', sha256='1fb8cc1438de548e16ec3bb9e4b2abb9f7ce5656f71c0906583819fcfa8c2031') version('2.0.2', sha256='27dcfe42e3fb3422b72ce48b48bf601c0a3e46e850ee72d9bdd17b5863b6e42c') version('2.0.1', sha256='f1156df22fc2365a31a3dc5f752c53aad49e34a5e22d75ed231cd97eaa437f9d') version('2.0.0', sha256='a0d425a0fc7c7e3f2c92a272ffaffbd913005556b4443e1887d2e1718d902887') From 02e077a7fa511a7a02502dd16f2706eae56dfe73 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 26 Jan 2020 18:22:43 -0500 Subject: [PATCH 28/36] simulationio: Correct HDF5 dependency bounds (#14626) The HDF5 dependency bound was inverted. (How did this ever compile? There is a cmake check.) --- var/spack/repos/builtin/packages/simulationio/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/simulationio/package.py b/var/spack/repos/builtin/packages/simulationio/package.py index 7a4894cbf03..352d06e19c5 100644 --- a/var/spack/repos/builtin/packages/simulationio/package.py +++ b/var/spack/repos/builtin/packages/simulationio/package.py @@ -23,7 +23,7 @@ class Simulationio(CMakePackage): variant('pic', default=True, description="Produce position-independent code") - depends_on('hdf5 +cxx @:1.10.0-patch1') + depends_on('hdf5 +cxx @1.10.1:') depends_on('julia', when='+julia', type=('build', 'run')) depends_on('py-h5py', when='+python', type=('build', 'run')) depends_on('py-numpy', when='+python', type=('build', 'run')) From 71f47b3b26a7587e9c52741d60c3542228482195 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 26 Jan 2020 18:34:56 -0600 Subject: [PATCH 29/36] Add py-vermin package (#14631) --- .../builtin/packages/py-vermin/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-vermin/package.py diff --git a/var/spack/repos/builtin/packages/py-vermin/package.py b/var/spack/repos/builtin/packages/py-vermin/package.py new file mode 100644 index 00000000000..97ac237a728 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-vermin/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 PyVermin(PythonPackage): + """Concurrently detect the minimum Python versions needed to run code.""" + + homepage = "https://github.com/netromdk/vermin" + url = "https://github.com/netromdk/vermin/archive/v0.10.0.tar.gz" + + import_modules = ['vermin'] + + version('0.10.0', sha256='3458a4d084bba5c95fd7208888aaf0e324a07ee092786ee4e5529f539ab4951f') + + depends_on('python@2.7:', type=('build', 'run')) + depends_on('py-setuptools', type=('build', 'run')) + + def test(self): + make('test') From 0e86961b842bd818bed37eadfb70914e5332f47f Mon Sep 17 00:00:00 2001 From: Sinan Date: Sun, 26 Jan 2020 16:35:16 -0800 Subject: [PATCH 30/36] pygdal and gdal versions should be in lockstep (#14630) --- var/spack/repos/builtin/packages/py-pygdal/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-pygdal/package.py b/var/spack/repos/builtin/packages/py-pygdal/package.py index aa3494539d7..2374e9cb19c 100644 --- a/var/spack/repos/builtin/packages/py-pygdal/package.py +++ b/var/spack/repos/builtin/packages/py-pygdal/package.py @@ -22,6 +22,8 @@ class PyPygdal(PythonPackage): version('3.0.1.5', sha256='1222f69fe5e6b632d0d2a42d3acb8fac80fb4577c05e01969d8cd5548192ccaa') version('2.4.2.5', sha256='73386683c0b10ab43b6d64257fca2ba812f53ec61b268de8811565fd9ae9bacd') + version('2.4.1.6', sha256='5d1af98ad09f59e34e3b332cf20630b532b33c7120295aaaabbccebf58a11aa4') + version('2.4.0.6', sha256='728d11f3ecae0cd3493cd27dab599a0b6184f5504cc172d49400d88ea2b24a9c') version('1.11.5.3', sha256='746d13b73a284446a1b604772f869789eabfe6e69dee463f537da27845b29fa7') version('1.11.4.3', sha256='99d4b0c94d57ae50592924faaa65cc6a0c0892d83764e9f24ef9270c3a4b111a') @@ -29,6 +31,7 @@ class PyPygdal(PythonPackage): depends_on('py-numpy@1.0.0:', type=('build', 'run')) depends_on('gdal@3.0.1', type=('build', 'link', 'run'), when='@3.0.1.5') depends_on('gdal@2.4.2', type=('build', 'link', 'run'), when='@2.4.2.5') - depends_on('gdal@2.4.1', type=('build', 'link', 'run'), when='@2.4.0') + depends_on('gdal@2.4.1', type=('build', 'link', 'run'), when='@2.4.1.6') + depends_on('gdal@2.4.0', type=('build', 'link', 'run'), when='@2.4.0.6') depends_on('gdal@1.11.5', type=('build', 'link', 'run'), when='@1.11.5.3') depends_on('gdal@1.11.4', type=('build', 'link', 'run'), when='@1.11.4.3') From eb79c82cbae2005ebcbf531879cb293692fa3a30 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 27 Jan 2020 00:31:13 -0600 Subject: [PATCH 31/36] Fix Python version compatibility tests for vermin 0.10.0 (#14632) --- lib/spack/spack/cmd/list.py | 2 +- lib/spack/spack/util/web.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index c4157349d07..656282599dd 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -23,7 +23,7 @@ from spack.version import VersionList if sys.version_info > (3, 1): - from html import escape + from html import escape # novm else: from cgi import escape diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index fbd4ea8c5a4..4fb8c5a5911 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -21,7 +21,7 @@ try: # Python 2 had these in the HTMLParser package. - from HTMLParser import HTMLParser, HTMLParseError + from HTMLParser import HTMLParser, HTMLParseError # novm except ImportError: # In Python 3, things moved to html.parser from html.parser import HTMLParser @@ -80,7 +80,7 @@ class NonDaemonPool(multiprocessing.pool.Pool): Process = NonDaemonProcess else: - class NonDaemonContext(type(multiprocessing.get_context())): + class NonDaemonContext(type(multiprocessing.get_context())): # novm Process = NonDaemonProcess class NonDaemonPool(multiprocessing.pool.Pool): @@ -128,7 +128,7 @@ def read_from_url(url, accept_content_type=None): warn_no_ssl_cert_checking() else: # User wants SSL verification, and it *can* be provided. - context = ssl.create_default_context() + context = ssl.create_default_context() # novm else: # User has explicitly indicated that they do not want SSL # verification. From b7b27d386239847a18ea744dc42172f56b6a3378 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 27 Jan 2020 04:07:46 -0500 Subject: [PATCH 32/36] amrex: Update to version 20.01 (#14635) Now using Github releases instead of git commits. --- var/spack/repos/builtin/packages/amrex/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py index 497fd683b5f..9d552861686 100644 --- a/var/spack/repos/builtin/packages/amrex/package.py +++ b/var/spack/repos/builtin/packages/amrex/package.py @@ -12,11 +12,13 @@ class Amrex(CMakePackage): mesh refinement (AMR) applications.""" homepage = "https://amrex-codes.github.io/amrex/" + url = "https://github.com/AMReX-Codes/amrex/archive/20.01.tar.gz" git = "https://github.com/AMReX-Codes/amrex.git" maintainers = ['mic84', 'asalmgren'] version('develop', branch='development') + version('20.01', sha256='f7026d267ca5de79ec7e740264d54230f419776d40feae705e939be0b1d8e0d3') version('19.10', commit='52844b32b7da11e9733b9a7f4a782e51de7f5e1e') # tag:19.10 version('19.08', commit='bdd1146139e8727a513d451075f900c172eb81fd') # tag:19.08 version('18.10.1', commit='260b53169badaa760b91dfc60ea6b2ea3d9ccf06') # tag:18.10.1 From 0f3ae864a5afb40f5a6ee175867fbd544850432d Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 27 Jan 2020 08:50:18 -0500 Subject: [PATCH 33/36] asdf-cxx: new package (#14637) --- .../builtin/packages/asdf-cxx/package.py | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 var/spack/repos/builtin/packages/asdf-cxx/package.py diff --git a/var/spack/repos/builtin/packages/asdf-cxx/package.py b/var/spack/repos/builtin/packages/asdf-cxx/package.py new file mode 100644 index 00000000000..fadb49714ea --- /dev/null +++ b/var/spack/repos/builtin/packages/asdf-cxx/package.py @@ -0,0 +1,47 @@ +# 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 AsdfCxx(CMakePackage): + """ASDF - Advanced Scientific Data Format, a C++ implementation""" + + homepage = "https://github.com/eschnett/asdf-cxx" + url = "https://github.com/eschnett/asdf-cxx/archive/version/1.0.0.tar.gz" + + maintainers = ['eschnett'] + + version('7.2.1', sha256='40864f4f27d3ce8acb5169b57211ce6ac3805f0a6de9c1dfd5f994f4a5beccda') + version('7.2.0', sha256='faded85d44288afb83f13634d2139adee07e06f7ea60960c6f2ef8d898c0aa09') + version('7.1.0', sha256='81fd8c7f91f8daf0f85a1486480ae9e736b9712e82ccb858271f7ee2c2b425f7') + version('7.0.0', sha256='a50718dfa68b86b0c3e280e6a9d0a4edb03d500ba70244bd38fa86bac1433979') + version('6.3.0', sha256='44a24cc490cf776106edcfded6006d63d28889dfe985cce3bd565d5151add9c8') + version('6.0.0', sha256='76ab0a893191a33a88a753d09a20135470f809c66173794fa3e37a2437ea3cde') + version('5.0.0', sha256='876c83bcc7514f2584dbf5462bd5b7de89b41301ec127451342079e703cd6a67') + version('4.0.1', sha256='c4597b8353b0e181d97c6702dae0cb69a558ae5b553945298757433615bb199b') + version('3.1.0', sha256='15de5156460ed581e1e755955e6a1b557758a6497d083c4873d143c05e720078') + version('3.0.0', sha256='a6d42f7d875eff2f1ff6af836a44e7a44fcc6be3409605d45f236e07d70c65db') + version('2.6.1', sha256='631426bd2784c2175b5a5035c12e91b0b0d36691f9972df427b41080ace43fc3') + version('2.5.1', sha256='d3c1f690716bd0883c4d429c9fa895ce41e6223bafa87624f9f1530c0d2e654c') + version('2.5.0', sha256='916e9021063c41eb7922ed69c958ea87757cdfcb7263d0d3fda31f0233dbbaaf') + version('2.4.1', sha256='a300bf11d4fd9923eb109c5f8e1067f2ef96f284ea43fafd871b469118d42597') + version('2.4.0', sha256='965360858bcacb6df4602fdff55924f7b9daf0750b27ac3f31781e23b54e8f93') + version('2.3.1', sha256='7c3ecf4fdafff5da57edb8b0c75b2e1f9c6bf42097c483025ff49f0a65094e22') + version('2.2.1', sha256='a34679d8690ff118bedd20652caebdb9c3fb5f628aca7ed2f535a026b28b3853') + version('2.1.1', sha256='f1a801b82facb2c0913ca3dce9c62970651e58fae8bc232f5079a1c4773ec6fa') + version('2.1.0', sha256='066c2c1033be41e10b874ceec1e87267fd792c40d46cbc768b05ba94cca234a1') + version('1.1.0', sha256='3e23b9cd16254f5adbf878145e320f56b4d3ad75de23d2c761eb7f04150926c5') + version('1.0.0', sha256='0b63594a1dec27cc85d25adbf900b6e936b5015f579b9b892b983151bec96775') + + variant('python', default=True, description="Enable Python support") + + depends_on('bzip2') + depends_on('openssl') + depends_on('py-numpy', type=('build', 'run'), when='+python') + depends_on('python', type=('build', 'run'), when='+python') + depends_on('swig', type='build', when='+python') + depends_on('yaml-cpp') + depends_on('zlib') From b9629c36f21621991e6c2068de3c8a6b6a91e34b Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 27 Jan 2020 17:40:47 +0100 Subject: [PATCH 34/36] Unified environment modifications in config files (#14372) * Unified environment modifications in config files fixes #13357 This commit factors all the code that is involved in the validation (schema) and parsing of environment modifications from configuration files in a single place. The factored out code is then used for module files and compiler configuration. Attributes were separated by dashes in `compilers.yaml` files and by underscores in `modules.yaml` files. This PR unifies the syntax on attributes separated by underscores. Unit testing of environment modifications in compilers has been refactored and simplified. --- lib/spack/docs/basic_usage.rst | 27 ++--- lib/spack/docs/configuration.rst | 27 +++++ lib/spack/spack/build_environment.py | 18 +-- lib/spack/spack/modules/common.py | 33 ++---- lib/spack/spack/schema/compilers.py | 47 +------- lib/spack/spack/schema/environment.py | 58 ++++++++++ lib/spack/spack/schema/modules.py | 14 +-- lib/spack/spack/test/build_environment.py | 130 ++++++++++------------ 8 files changed, 170 insertions(+), 184 deletions(-) create mode 100644 lib/spack/spack/schema/environment.py diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 8342ab4489a..56d60a29da3 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -929,11 +929,13 @@ in GNU Autotools. If all flags are set, the order is Compiler environment variables and additional RPATHs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -In the exceptional case a compiler requires setting special environment -variables, like an explicit library load path. These can bet set in an -extra section in the compiler configuration (the supported environment -modification commands are: ``set``, ``unset``, ``append-path``, and -``prepend-path``). The user can also specify additional ``RPATHs`` that the +Sometimes compilers require setting special environment variables to +operate correctly. Spack handles these cases by allowing custom environment +modifications in the ``environment`` attribute of the compiler configuration +section. See also the :ref:`configuration_environment_variables` section +of the configuration files docs for more information. + +It is also possible to specify additional ``RPATHs`` that the compiler will add to all executables generated by that compiler. This is useful for forcing certain compilers to RPATH their own runtime libraries, so that executables will run without the need to set ``LD_LIBRARY_PATH``. @@ -950,28 +952,19 @@ that executables will run without the need to set ``LD_LIBRARY_PATH``. fc: /opt/gcc/bin/gfortran environment: unset: - BAD_VARIABLE: # The colon is required but the value must be empty + - BAD_VARIABLE set: GOOD_VARIABLE_NUM: 1 GOOD_VARIABLE_STR: good - prepend-path: + prepend_path: PATH: /path/to/binutils - append-path: + append_path: LD_LIBRARY_PATH: /opt/gcc/lib extra_rpaths: - /path/to/some/compiler/runtime/directory - /path/to/some/other/compiler/runtime/directory -.. note:: - - The section `environment` is interpreted as an ordered dictionary, which - means two things. First, environment modification are applied in the order - they are specified in the configuration file. Second, you cannot express - environment modifications that require mixing different commands, i.e. you - cannot `set` one variable, than `prepend-path` to another one, and than - again `set` a third one. - ^^^^^^^^^^^^^^^^^^^^^^^ Architecture specifiers ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/lib/spack/docs/configuration.rst b/lib/spack/docs/configuration.rst index c3ea125f19b..41c9de79f9f 100644 --- a/lib/spack/docs/configuration.rst +++ b/lib/spack/docs/configuration.rst @@ -427,6 +427,33 @@ home directory, and ``~user`` will expand to a specified user's home directory. The ``~`` must appear at the beginning of the path, or Spack will not expand it. +.. _configuration_environment_variables: + +------------------------- +Environment Modifications +------------------------- + +Spack allows to prescribe custom environment modifications in a few places +within its configuration files. Every time these modifications are allowed +they are specified as a dictionary, like in the following example: + +.. code-block:: yaml + + environment: + set: + LICENSE_FILE: '/path/to/license' + unset: + - CPATH + - LIBRARY_PATH + append_path: + PATH: '/new/bin/dir' + +The possible actions that are permitted are ``set``, ``unset``, ``append_path``, +``prepend_path`` and finally ``remove_path``. They all require a dictionary +of variable names mapped to the values used for the modification. +The only exception is ``unset`` that requires just a list of variable names. +No particular order is ensured on the execution of each of these modifications. + ---------------------------- Seeing Spack's Configuration ---------------------------- diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index f5f55cfd414..4809a1010e4 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -39,7 +39,6 @@ import sys import traceback import types -from six import iteritems from six import StringIO import llnl.util.tty as tty @@ -52,6 +51,7 @@ import spack.config import spack.main import spack.paths +import spack.schema.environment import spack.store from spack.util.string import plural from spack.util.environment import ( @@ -342,21 +342,7 @@ def set_build_environment_variables(pkg, env, dirty): # Set environment variables if specified for # the given compiler compiler = pkg.compiler - environment = compiler.environment - - for command, variable in iteritems(environment): - if command == 'set': - for name, value in iteritems(variable): - env.set(name, value) - elif command == 'unset': - for name, _ in iteritems(variable): - env.unset(name) - elif command == 'prepend-path': - for name, value in iteritems(variable): - env.prepend_path(name, value) - elif command == 'append-path': - for name, value in iteritems(variable): - env.append_path(name, value) + env.extend(spack.schema.environment.parse(compiler.environment)) if compiler.extra_rpaths: extra_rpaths = ':'.join(compiler.extra_rpaths) diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 517c9a02709..d9407a1bf66 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -28,26 +28,24 @@ Each of the four classes needs to be sub-classed when implementing a new module type. """ +import collections import copy import datetime import inspect import os.path import re -import collections -import six import llnl.util.filesystem import llnl.util.tty as tty - -import spack.paths import spack.build_environment as build_environment -import spack.util.environment -import spack.tengine as tengine -import spack.util.path -import spack.util.environment import spack.error -import spack.util.spack_yaml as syaml +import spack.paths +import spack.schema.environment +import spack.tengine as tengine +import spack.util.environment import spack.util.file_permissions as fp +import spack.util.path +import spack.util.spack_yaml as syaml #: config section for this file @@ -415,22 +413,7 @@ def env(self): """List of environment modifications that should be done in the module. """ - env_mods = spack.util.environment.EnvironmentModifications() - actions = self.conf.get('environment', {}) - - def process_arglist(arglist): - if method == 'unset': - for x in arglist: - yield (x,) - else: - for x in six.iteritems(arglist): - yield x - - for method, arglist in actions.items(): - for args in process_arglist(arglist): - getattr(env_mods, method)(*args) - - return env_mods + return spack.schema.environment.parse(self.conf.get('environment', {})) @property def suffixes(self): diff --git a/lib/spack/spack/schema/compilers.py b/lib/spack/spack/schema/compilers.py index ffec5f80721..c994bef8197 100644 --- a/lib/spack/spack/schema/compilers.py +++ b/lib/spack/spack/schema/compilers.py @@ -8,7 +8,7 @@ .. literalinclude:: _spack_root/lib/spack/spack/schema/compilers.py :lines: 13- """ - +import spack.schema.environment #: Properties for inclusion in other schemas properties = { @@ -68,50 +68,7 @@ {'type': 'boolean'} ] }, - 'environment': { - 'type': 'object', - 'default': {}, - 'additionalProperties': False, - 'properties': { - 'set': { - 'type': 'object', - 'patternProperties': { - # Variable name - r'\w[\w-]*': { - 'anyOf': [{'type': 'string'}, - {'type': 'number'}] - } - } - }, - 'unset': { - 'type': 'object', - 'patternProperties': { - # Variable name - r'\w[\w-]*': {'type': 'null'} - } - }, - 'prepend-path': { - 'type': 'object', - 'patternProperties': { - # Variable name - r'\w[\w-]*': { - 'anyOf': [{'type': 'string'}, - {'type': 'number'}] - } - } - }, - 'append-path': { - 'type': 'object', - 'patternProperties': { - # Variable name - r'\w[\w-]*': { - 'anyOf': [{'type': 'string'}, - {'type': 'number'}] - } - } - } - } - }, + 'environment': spack.schema.environment.definition, 'extra_rpaths': { 'type': 'array', 'default': [], diff --git a/lib/spack/spack/schema/environment.py b/lib/spack/spack/schema/environment.py new file mode 100644 index 00000000000..d251aeba96e --- /dev/null +++ b/lib/spack/spack/schema/environment.py @@ -0,0 +1,58 @@ +# 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) +"""Schema for environment modifications. Meant for inclusion in other +schemas. +""" + +array_of_strings_or_num = { + 'type': 'array', 'default': [], 'items': + {'anyOf': [{'type': 'string'}, {'type': 'number'}]} +} + +dictionary_of_strings_or_num = { + 'type': 'object', 'patternProperties': + {r'\w[\w-]*': {'anyOf': [{'type': 'string'}, {'type': 'number'}]}} +} + +definition = { + 'type': 'object', + 'default': {}, + 'additionalProperties': False, + 'properties': { + 'set': dictionary_of_strings_or_num, + 'unset': array_of_strings_or_num, + 'prepend_path': dictionary_of_strings_or_num, + 'append_path': dictionary_of_strings_or_num, + 'remove_path': dictionary_of_strings_or_num + } +} + + +def parse(config_obj): + """Returns an EnvironmentModifications object containing the modifications + parsed from input. + + Args: + config_obj: a configuration dictionary conforming to the + schema definition for environment modifications + """ + import spack.util.environment as ev + try: + from collections import Sequence # novm + except ImportError: + from collections.abc import Sequence # novm + + env = ev.EnvironmentModifications() + for command, variable in config_obj.items(): + # Distinguish between commands that take only a name as argument + # (e.g. unset) and commands that take a name and a value. + if isinstance(variable, Sequence): + for name in variable: + getattr(env, command)(name) + else: + for name, value in variable.items(): + getattr(env, command)(name, value) + + return env diff --git a/lib/spack/spack/schema/modules.py b/lib/spack/spack/schema/modules.py index 7fa2909d40d..1fbbf614c88 100644 --- a/lib/spack/spack/schema/modules.py +++ b/lib/spack/spack/schema/modules.py @@ -8,6 +8,8 @@ .. literalinclude:: _spack_root/lib/spack/spack/schema/modules.py :lines: 13- """ +import spack.schema.environment + #: Matches a spec or a multi-valued variant but not another #: valid keyword. @@ -66,17 +68,7 @@ } } }, - 'environment': { - 'type': 'object', - 'default': {}, - 'additionalProperties': False, - 'properties': { - 'set': dictionary_of_strings, - 'unset': array_of_strings, - 'prepend_path': dictionary_of_strings, - 'append_path': dictionary_of_strings - } - } + 'environment': spack.schema.environment.definition } } diff --git a/lib/spack/spack/test/build_environment.py b/lib/spack/spack/test/build_environment.py index 4d0f09c50f4..a7a55af0cae 100644 --- a/lib/spack/spack/test/build_environment.py +++ b/lib/spack/spack/test/build_environment.py @@ -14,7 +14,6 @@ from spack.paths import build_env_path from spack.build_environment import dso_suffix, _static_to_shared_library from spack.util.executable import Executable -from spack.util.spack_yaml import syaml_dict, syaml_str from spack.util.environment import EnvironmentModifications from llnl.util.filesystem import LibraryList, HeaderList @@ -65,6 +64,18 @@ def build_environment(working_env): del os.environ[name] +@pytest.fixture +def ensure_env_variables(config, mock_packages, monkeypatch, working_env): + """Returns a function that takes a dictionary and updates os.environ + for the test lifetime accordingly. Plugs-in mock config and repo. + """ + def _ensure(env_mods): + for name, value in env_mods.items(): + monkeypatch.setenv(name, value) + + return _ensure + + def test_static_to_shared_library(build_environment): os.environ['SPACK_TEST_COMMAND'] = 'dump-args' @@ -119,79 +130,58 @@ def _set_wrong_cc(x): assert os.environ['ANOTHER_VAR'] == 'THIS_IS_SET' -@pytest.mark.usefixtures('config', 'mock_packages') -def test_compiler_config_modifications(monkeypatch, working_env): - s = spack.spec.Spec('cmake') - s.concretize() - pkg = s.package +@pytest.mark.parametrize('initial,modifications,expected', [ + # Set and unset variables + ({'SOME_VAR_STR': '', 'SOME_VAR_NUM': '0'}, + {'set': {'SOME_VAR_STR': 'SOME_STR', 'SOME_VAR_NUM': 1}}, + {'SOME_VAR_STR': 'SOME_STR', 'SOME_VAR_NUM': '1'}), + ({'SOME_VAR_STR': ''}, + {'unset': ['SOME_VAR_STR']}, + {'SOME_VAR_STR': None}), + ({}, # Set a variable that was not defined already + {'set': {'SOME_VAR_STR': 'SOME_STR'}}, + {'SOME_VAR_STR': 'SOME_STR'}), + # Append and prepend to the same variable + ({'EMPTY_PATH_LIST': '/path/middle'}, + {'prepend_path': {'EMPTY_PATH_LIST': '/path/first'}, + 'append_path': {'EMPTY_PATH_LIST': '/path/last'}}, + {'EMPTY_PATH_LIST': '/path/first:/path/middle:/path/last'}), + # Append and prepend from empty variables + ({'EMPTY_PATH_LIST': '', 'SOME_VAR_STR': ''}, + {'prepend_path': {'EMPTY_PATH_LIST': '/path/first'}, + 'append_path': {'SOME_VAR_STR': '/path/last'}}, + {'EMPTY_PATH_LIST': '/path/first', 'SOME_VAR_STR': '/path/last'}), + ({}, # Same as before but on variables that were not defined + {'prepend_path': {'EMPTY_PATH_LIST': '/path/first'}, + 'append_path': {'SOME_VAR_STR': '/path/last'}}, + {'EMPTY_PATH_LIST': '/path/first', 'SOME_VAR_STR': '/path/last'}), + # Remove a path from a list + ({'EMPTY_PATH_LIST': '/path/first:/path/middle:/path/last'}, + {'remove_path': {'EMPTY_PATH_LIST': '/path/middle'}}, + {'EMPTY_PATH_LIST': '/path/first:/path/last'}), + ({'EMPTY_PATH_LIST': '/only/path'}, + {'remove_path': {'EMPTY_PATH_LIST': '/only/path'}}, + {'EMPTY_PATH_LIST': ''}), +]) +def test_compiler_config_modifications( + initial, modifications, expected, ensure_env_variables, monkeypatch +): + # Set the environment as per prerequisites + ensure_env_variables(initial) - os.environ['SOME_VAR_STR'] = '' - os.environ['SOME_VAR_NUM'] = '0' - os.environ['PATH_LIST'] = '/path/third:/path/forth' - os.environ['EMPTY_PATH_LIST'] = '' - os.environ.pop('NEW_PATH_LIST', None) + # Monkeypatch a pkg.compiler.environment with the required modifications + pkg = spack.spec.Spec('cmake').concretized().package + monkeypatch.setattr(pkg.compiler, 'environment', modifications) - env_mod = syaml_dict() - set_cmd = syaml_dict() - env_mod[syaml_str('set')] = set_cmd - - set_cmd[syaml_str('SOME_VAR_STR')] = syaml_str('SOME_STR') - set_cmd[syaml_str('SOME_VAR_NUM')] = 1 - - monkeypatch.setattr(pkg.compiler, 'environment', env_mod) + # Trigger the modifications spack.build_environment.setup_package(pkg, False) - assert os.environ['SOME_VAR_STR'] == 'SOME_STR' - assert os.environ['SOME_VAR_NUM'] == str(1) - env_mod = syaml_dict() - unset_cmd = syaml_dict() - env_mod[syaml_str('unset')] = unset_cmd - - unset_cmd[syaml_str('SOME_VAR_STR')] = None - - monkeypatch.setattr(pkg.compiler, 'environment', env_mod) - assert 'SOME_VAR_STR' in os.environ - spack.build_environment.setup_package(pkg, False) - assert 'SOME_VAR_STR' not in os.environ - - env_mod = syaml_dict() - set_cmd = syaml_dict() - env_mod[syaml_str('set')] = set_cmd - append_cmd = syaml_dict() - env_mod[syaml_str('append-path')] = append_cmd - unset_cmd = syaml_dict() - env_mod[syaml_str('unset')] = unset_cmd - prepend_cmd = syaml_dict() - env_mod[syaml_str('prepend-path')] = prepend_cmd - - set_cmd[syaml_str('EMPTY_PATH_LIST')] = syaml_str('/path/middle') - - append_cmd[syaml_str('PATH_LIST')] = syaml_str('/path/last') - append_cmd[syaml_str('EMPTY_PATH_LIST')] = syaml_str('/path/last') - append_cmd[syaml_str('NEW_PATH_LIST')] = syaml_str('/path/last') - - unset_cmd[syaml_str('SOME_VAR_NUM')] = None - - prepend_cmd[syaml_str('PATH_LIST')] = syaml_str('/path/first:/path/second') - prepend_cmd[syaml_str('EMPTY_PATH_LIST')] = syaml_str('/path/first') - prepend_cmd[syaml_str('NEW_PATH_LIST')] = syaml_str('/path/first') - prepend_cmd[syaml_str('SOME_VAR_NUM')] = syaml_str('/8') - - assert 'SOME_VAR_NUM' in os.environ - monkeypatch.setattr(pkg.compiler, 'environment', env_mod) - spack.build_environment.setup_package(pkg, False) - # Check that the order of modifications is respected and the - # variable was unset before it was prepended. - assert os.environ['SOME_VAR_NUM'] == '/8' - - expected = '/path/first:/path/second:/path/third:/path/forth:/path/last' - assert os.environ['PATH_LIST'] == expected - - expected = '/path/first:/path/middle:/path/last' - assert os.environ['EMPTY_PATH_LIST'] == expected - - expected = '/path/first:/path/last' - assert os.environ['NEW_PATH_LIST'] == expected + # Check they were applied + for name, value in expected.items(): + if value is not None: + assert os.environ[name] == value + continue + assert name not in os.environ @pytest.mark.regression('9107') From 893b0792e42b3fdaa1fe9d4ea3abd1c691bdd598 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Mon, 27 Jan 2020 14:03:15 -0600 Subject: [PATCH 35/36] Set module_roots in test/config/config.yaml to defaults. (#14517) --- lib/spack/spack/test/data/config/config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/spack/spack/test/data/config/config.yaml b/lib/spack/spack/test/data/config/config.yaml index 06112511895..31e5e36bada 100644 --- a/lib/spack/spack/test/data/config/config.yaml +++ b/lib/spack/spack/test/data/config/config.yaml @@ -12,3 +12,6 @@ config: verify_ssl: true checksum: true dirty: false + module_roots: + tcl: $spack/share/spack/modules + lmod: $spack/share/spack/lmod From 9ffa053f18533a020152ce86e50b32b47720b8c9 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Mon, 27 Jan 2020 14:17:15 -0600 Subject: [PATCH 36/36] Fix bug introduced by pull request 14467 being merged (#14639) * Fix bug introduced by pull request 14467 being merged * Only filter on platform and OS --- lib/spack/spack/binary_distribution.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 55feacc7c4c..64ce23a8d63 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -690,7 +690,10 @@ def get_specs(force=False, use_arch=False): for file in files: if re.search('spec.yaml', file): link = url_util.join(fetch_url_build_cache, file) - if use_arch and re.search(spack.architecture(), file): + if use_arch and re.search('%s-%s' % + (spack.architecture.platform, + spack.architecture.os), + file): urls.add(link) else: urls.add(link) @@ -701,7 +704,10 @@ def get_specs(force=False, use_arch=False): url_util.join(fetch_url_build_cache, 'index.html')) for link in links: if re.search("spec.yaml", link): - if use_arch and re.search(spack.architecture(), link): + if use_arch and re.search('%s-%s' % + (spack.architecture.platform, + spack.architecture.os), + link): urls.add(link) else: urls.add(link)