diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2020-11-17 02:41:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 02:41:07 -0800 |
commit | 6fa6af1070908895b77d0ee35650b499971e2719 (patch) | |
tree | cf7abb82084026a8b57105fbe7b18cece9a7776a /var | |
parent | 423e80af23cc9ff54b14fc268434c38fc9f7f050 (diff) | |
download | spack-6fa6af1070908895b77d0ee35650b499971e2719.tar.gz spack-6fa6af1070908895b77d0ee35650b499971e2719.tar.bz2 spack-6fa6af1070908895b77d0ee35650b499971e2719.tar.xz spack-6fa6af1070908895b77d0ee35650b499971e2719.zip |
Support parallel environment builds (#18131)
As of #13100, Spack installs the dependencies of a _single_ spec in parallel.
Environments, when installed, can only get parallelism from each individual
spec, as they're installed in order. This PR makes entire environments build
in parallel by extending Spack's package installer to accept multiple root
specs. The install command and Environment class have been updated to use
the new parallel install method.
The specs and kwargs for each *uninstalled* package (when not force-replacing
installations) of an environment are collected, passed to the `PackageInstaller`,
and processed using a single build queue.
This introduces a `BuildRequest` class to track install arguments, and it
significantly cleans up the code used to track package ids during installation.
Package ids in the build queue are now just DAG hashes as you would expect,
Other tasks:
- [x] Finish updating the unit tests based on `PackageInstaller`'s use of
`BuildRequest` and the associated changes
- [x] Change `environment.py`'s `install_all` to use the `PackageInstaller` directly
- [x] Change the `install` command to leverage the new installation process for multiple specs
- [x] Change install output messages for external packages, e.g.:
`[+] /usr` -> `[+] /usr (external bzip2-1.0.8-<dag-hash>`
- [x] Fix incomplete environment install's view setup/update and not confirming all
packages are installed (?)
- [x] Ensure externally installed package dependencies are properly accounted for in
remaining build tasks
- [x] Add tests for coverage (if insufficient and can identity the appropriate, uncovered non-comment lines)
- [x] Add documentation
- [x] Resolve multi-compiler environment install issues
- [x] Fix issue with environment installation reporting (restore CDash/JUnit reports)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin.mock/packages/depb/package.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/depb/package.py b/var/spack/repos/builtin.mock/packages/depb/package.py new file mode 100644 index 0000000000..4af71848d3 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/depb/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 Depb(AutotoolsPackage): + """Simple package with one build dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/a-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('b') + + def install(self, spec, prefix): + # sanity_check_prefix requires something in the install directory + # Test requires overriding the one provided by `AutotoolsPackage` + mkdirp(prefix.bin) |