summaryrefslogtreecommitdiff
path: root/lib/spack/docs/environments.rst
diff options
context:
space:
mode:
authorTamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>2020-11-17 02:41:07 -0800
committerGitHub <noreply@github.com>2020-11-17 02:41:07 -0800
commit6fa6af1070908895b77d0ee35650b499971e2719 (patch)
treecf7abb82084026a8b57105fbe7b18cece9a7776a /lib/spack/docs/environments.rst
parent423e80af23cc9ff54b14fc268434c38fc9f7f050 (diff)
downloadspack-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 'lib/spack/docs/environments.rst')
-rw-r--r--lib/spack/docs/environments.rst47
1 files changed, 16 insertions, 31 deletions
diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst
index 55ac458a3c..65eec36581 100644
--- a/lib/spack/docs/environments.rst
+++ b/lib/spack/docs/environments.rst
@@ -191,44 +191,24 @@ Environment has been activated. Similarly, the ``install`` and
==> 0 installed packages
$ spack install zlib@1.2.11
- ==> Installing zlib
- ==> Searching for binary cache of zlib
- ==> Warning: No Spack mirrors are currently configured
- ==> No binary for zlib found: installing from source
- ==> Fetching http://zlib.net/fossils/zlib-1.2.11.tar.gz
- ######################################################################## 100.0%
- ==> Staging archive: /spack/var/spack/stage/zlib-1.2.11-3r4cfkmx3wwfqeof4bc244yduu2mz4ur/zlib-1.2.11.tar.gz
- ==> Created stage in /spack/var/spack/stage/zlib-1.2.11-3r4cfkmx3wwfqeof4bc244yduu2mz4ur
- ==> No patches needed for zlib
- ==> Building zlib [Package]
- ==> Executing phase: 'install'
- ==> Successfully installed zlib
- Fetch: 0.36s. Build: 11.58s. Total: 11.93s.
- [+] /spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/zlib-1.2.11-3r4cfkmx3wwfqeof4bc244yduu2mz4ur
+ ==> Installing zlib-1.2.11-q6cqrdto4iktfg6qyqcc5u4vmfmwb7iv
+ ==> No binary for zlib-1.2.11-q6cqrdto4iktfg6qyqcc5u4vmfmwb7iv found: installing from source
+ ==> zlib: Executing phase: 'install'
+ [+] ~/spack/opt/spack/linux-rhel7-broadwell/gcc-8.1.0/zlib-1.2.11-q6cqrdto4iktfg6qyqcc5u4vmfmwb7iv
$ spack env activate myenv
$ spack find
==> In environment myenv
==> No root specs
-
==> 0 installed packages
$ spack install zlib@1.2.8
- ==> Installing zlib
- ==> Searching for binary cache of zlib
- ==> Warning: No Spack mirrors are currently configured
- ==> No binary for zlib found: installing from source
- ==> Fetching http://zlib.net/fossils/zlib-1.2.8.tar.gz
- ######################################################################## 100.0%
- ==> Staging archive: /spack/var/spack/stage/zlib-1.2.8-y2t6kq3s23l52yzhcyhbpovswajzi7f7/zlib-1.2.8.tar.gz
- ==> Created stage in /spack/var/spack/stage/zlib-1.2.8-y2t6kq3s23l52yzhcyhbpovswajzi7f7
- ==> No patches needed for zlib
- ==> Building zlib [Package]
- ==> Executing phase: 'install'
- ==> Successfully installed zlib
- Fetch: 0.26s. Build: 2.08s. Total: 2.35s.
- [+] /spack/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/zlib-1.2.8-y2t6kq3s23l52yzhcyhbpovswajzi7f7
+ ==> Installing zlib-1.2.8-yfc7epf57nsfn2gn4notccaiyxha6z7x
+ ==> No binary for zlib-1.2.8-yfc7epf57nsfn2gn4notccaiyxha6z7x found: installing from source
+ ==> zlib: Executing phase: 'install'
+ [+] ~/spack/opt/spack/linux-rhel7-broadwell/gcc-8.1.0/zlib-1.2.8-yfc7epf57nsfn2gn4notccaiyxha6z7x
+ ==> Updating view at ~/spack/var/spack/environments/myenv/.spack-env/view
$ spack find
==> In environment myenv
@@ -236,15 +216,17 @@ Environment has been activated. Similarly, the ``install`` and
zlib@1.2.8
==> 1 installed package
- -- linux-rhel7-x86_64 / gcc@4.9.3 -------------------------------
+ -- linux-rhel7-broadwell / gcc@8.1.0 ----------------------------
zlib@1.2.8
$ despacktivate
+
$ spack find
==> 2 installed packages
- -- linux-rhel7-x86_64 / gcc@4.9.3 -------------------------------
+ -- linux-rhel7-broadwell / gcc@8.1.0 ----------------------------
zlib@1.2.8 zlib@1.2.11
+
Note that when we installed the abstract spec ``zlib@1.2.8``, it was
presented as a root of the Environment. All explicitly installed
packages will be listed as roots of the Environment.
@@ -349,6 +331,9 @@ installed specs using the ``-c`` (``--concretized``) flag.
==> 0 installed packages
+
+.. _installing-environment:
+
^^^^^^^^^^^^^^^^^^^^^^^^^
Installing an Environment
^^^^^^^^^^^^^^^^^^^^^^^^^