Basic Installation Tutorial

This tutorial will guide you through the process of installing software using Spack. We will first cover the spack install command, focusing on the power of the spec syntax and the flexibility it gives to users. We will also cover the spack find command for viewing installed packages and the spack uninstall command for uninstalling them. Finally, we will touch on how Spack manages compilers, especially as it relates to using Spack-built compilers within Spack. We will include full output from all of the commands demonstrated, although we will frequently call attention to only small portions of that output (or merely to the fact that it succeeded). The provided output is all from an AWS instance running Ubuntu 18.04.

Installing Spack

Spack works out of the box. Simply clone Spack to get going. We will clone Spack and immediately check out the most recent release, v0.18.

$ git clone -c feature.manyFiles=true https://github.com/spack/spack.git ~/spack
Cloning into '/home/spack/spack'...
remote: Enumerating objects: 373866, done.K
remote: Counting objects: 100% (153/153), done.K
remote: Compressing objects: 100% (107/107), done.K
remote:nTotale3738669(delta055),3reused,985(deltai23),3pack-reused 373713K
Receiving objects: 100% (373866/373866), 171.57 MiB | 34.54 MiB/s, done.
Resolving deltas: 100% (159869/159869), done.
$ cd ~/spack
$ git checkout releases/v0.18
Branch 'releases/v0.18' set up to track remote branch 'releases/v0.18' from 'origin'.
Switched to a new branch 'releases/v0.18'

Next, add Spack to your path. Spack has some nice command-line integration tools, so instead of simply appending to your PATH variable, source the Spack setup script.

$ . share/spack/setup-env.sh

You’re good to go!

What is in Spack?

The spack list command shows available packages.

$ spack list
==> 6416 packages.
3dtk			       ip2				podman					  py-pygtrie					   r-packrat
3proxy			       ipcalc				poke					  py-pyh5md					   r-pacman
abacus			       iperf2				polymake				  py-pyheadtail 				   r-paleotree
abduco			       iperf3				poplddecay				  py-pyinstrument				   r-pamr

The spack list command can also take a query string. Spack automatically adds wildcards to both ends of the string, or you can add your own wildcards. For example, we can view all available Python packages.

$ spack list 'py-*'
==> 1821 packages.
py-3to2 				  py-cinema-lib 	       py-google-auth		    py-msgpack-numpy	       py-pyke			       py-sierrapy
py-4suite-xml				  py-cinemasci		       py-google-auth-httplib2	    py-msrest		       py-pykml 		       py-simplegeneric
py-abcpy				  py-citeproc-py	       py-google-auth-oauthlib	    py-msrestazure	       py-pykokkos-base 	       py-simplejson
py-abipy				  py-clean-text 	       py-google-cloud-core	    py-multi-key-dict	       py-pykwalify		       py-simplekml

Installing Packages

Installing a package with Spack is very simple. To install a piece of software, simply type spack install <package_name>.

$ spack install zlib
==> Bootstrapping clingo from pre-built binaries
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.2/build_cache/linux-centos7-x86_64-gcc-10.2.1-clingo-bootstrap-spack-dzhvhynye4z7oalowdcy5zt25lej3m2n.spec.json
==> Fetching https://mirror.spack.io/bootstrap/github-actions/v0.2/build_cache/linux-centos7-x86_64/gcc-10.2.1/clingo-bootstrap-spack/linux-centos7-x86_64-gcc-10.2.1-clingo-bootstrap-spack-dzhvhynye4z7oalowdcy5zt25lej3m2n.spack
==> Installing "clingo-bootstrap@spack%gcc@10.2.1~docs~ipo+python+static_libstdcpp build_type=Release arch=linux-centos7-x86_64" from a buildcache
==> Warning: This binary package uses a deprecated layout, and support for it will eventually be removed from spack.
==> Bootstrapping patchelf from pre-built binaries
==> Bootstrapping patchelf@0.13.1:0.13.99 %gcc target=x86_64 from sources
==> Installing patchelf-0.13.1-krpxctdud7tcekzjoh2vb4orqwrfqs75
==> No binary for patchelf-0.13.1-krpxctdud7tcekzjoh2vb4orqwrfqs75 found: installing from source
==> Fetching https://mirror.spack.io/_source-cache/archive/08/08c0237e89be74d61ddf8f6ff218439cdd62af572d568fb38913b53e222831de.tar.gz
==> No patches needed for patchelf
==> patchelf: Executing phase: 'autoreconf'
==> patchelf: Executing phase: 'configure'
==> patchelf: Executing phase: 'build'
==> patchelf: Executing phase: 'install'
==> patchelf: Successfully installed patchelf-0.13.1-krpxctdud7tcekzjoh2vb4orqwrfqs75
  Fetch: 0.03s.  Build: 6.19s.	Total: 6.22s.
[+] /home/spack/.spack/bootstrap/store/linux-ubuntu18.04-x86_64/gcc-7.5.0/patchelf-0.13.1-krpxctdud7tcekzjoh2vb4orqwrfqs75
==> Installing zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs
==> No binary for zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs found: installing from source
==> Fetching https://mirror.spack.io/_source-cache/archive/91/91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9.tar.gz
==> Applied patch /home/spack/spack/var/spack/repos/builtin/packages/zlib/configure-cc.patch
==> zlib: Executing phase: 'install'
==> zlib: Successfully installed zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs
  Fetch: 0.05s.  Build: 0.98s.	Total: 1.03s.
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs

Spack can install software either from source or from a binary cache. Packages in the binary cache are signed with GPG for security. For the tutorial we have prepared a binary cache so you don’t have to wait on slow compilation from source. To be able to install from the binary cache, we will need to configure Spack with the location of the binary cache and trust the GPG key that the binary cache was signed with.

$ spack mirror add tutorial /mirror
$ spack buildcache keys --install --trust
gpg: key A8E0CA3C1C2ADA2F: 7 signatures not checked due to missing keys
gpg: key A8E0CA3C1C2ADA2F: public key "Spack Project Official Binaries <maintainers@spack.io>" imported
gpg: Total number processed: 1
gpg:		   imported: 1
gpg: no ultimately trusted keys found
gpg: inserting ownertrust of 6

You’ll learn more about configuring Spack later in the tutorial, but for now you will be able to install the rest of the packages in the tutorial from a binary cache using the same spack install command. By default this will install the binary cached version if it exists and fall back on installing from source if it does not.

Spack’s spec syntax is the interface by which we can request specific configurations of the package. The % sigil is used to specify compilers.

$ spack install zlib %clang
==> Installing zlib-1.2.12-3svypjaie5farii5zcgm6yfu43la2ixs
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-clang-7.0.0-zlib-1.2.12-3svypjaie5farii5zcgm6yfu43la2ixs.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/clang-7.0.0/zlib-1.2.12/linux-ubuntu18.04-x86_64-clang-7.0.0-zlib-1.2.12-3svypjaie5farii5zcgm6yfu43la2ixs.spack
==> Extracting zlib-1.2.12-3svypjaie5farii5zcgm6yfu43la2ixs from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/clang-7.0.0/zlib-1.2.12-3svypjaie5farii5zcgm6yfu43la2ixs

Note that this installation is located separately from the previous one. We will discuss this in more detail later, but this is part of what allows Spack to support arbitrarily versioned software.

You can check for particular versions before requesting them. We will use the spack versions command to see the available versions, and then install a different version of zlib.

$ spack versions zlib
==> Safe versions (already checksummed):
  1.2.12  1.2.11  1.2.8  1.2.3
==> Remote versions (not yet checksummed):
  1.2.10   1.2.7.2  1.2.6.1  1.2.5.2  1.2.4.5  1.2.4.2	1.2.3.9  1.2.3.6  1.2.3.3  1.2.2.4  1.2.2.1  1.2.1.1  1.2.0.7  1.2.0.4	1.2.0.1  1.1.3	1.1.0  1.0.7  1.0.4  1.0-pre  0.94  0.91  0.9
  1.2.9    1.2.7.1  1.2.6    1.2.5.1  1.2.4.4  1.2.4.1	1.2.3.8  1.2.3.5  1.2.3.2  1.2.2.3  1.2.2    1.2.1    1.2.0.6  1.2.0.3	1.2.0	 1.1.2	1.0.9  1.0.6  1.0.2  0.99     0.93  0.79  0.8
  1.2.7.3  1.2.7    1.2.5.3  1.2.5    1.2.4.3  1.2.4	1.2.3.7  1.2.3.4  1.2.3.1  1.2.2.2  1.2.1.2  1.2.0.8  1.2.0.5  1.2.0.2	1.1.4	 1.1.1	1.0.8  1.0.5  1.0.1  0.95     0.92  0.71

The @ sigil is used to specify versions, both of packages and of compilers.

$ spack install zlib@1.2.8
==> Installing zlib-1.2.8-gueun6gngeyk4khe6qqnakxrtgox46sb
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-zlib-1.2.8-gueun6gngeyk4khe6qqnakxrtgox46sb.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.8/linux-ubuntu18.04-x86_64-gcc-7.5.0-zlib-1.2.8-gueun6gngeyk4khe6qqnakxrtgox46sb.spack
==> Extracting zlib-1.2.8-gueun6gngeyk4khe6qqnakxrtgox46sb from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.8-gueun6gngeyk4khe6qqnakxrtgox46sb
$ spack install zlib %gcc@6.5.0
==> Installing zlib-1.2.12-g4z6hjrherdhgref4busphl4zketf47z
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-6.5.0-zlib-1.2.12-g4z6hjrherdhgref4busphl4zketf47z.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-6.5.0/zlib-1.2.12/linux-ubuntu18.04-x86_64-gcc-6.5.0-zlib-1.2.12-g4z6hjrherdhgref4busphl4zketf47z.spack
==> Extracting zlib-1.2.12-g4z6hjrherdhgref4busphl4zketf47z from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-6.5.0/zlib-1.2.12-g4z6hjrherdhgref4busphl4zketf47z

The spec syntax also includes compiler flags. Spack accepts cppflags, cflags, cxxflags, fflags, ldflags, and ldlibs parameters. The values of these fields must be quoted on the command line if they include spaces. These values are injected into the compile line automatically by the Spack compiler wrappers.

$ spack install zlib@1.2.8 cppflags=-O3
==> Installing zlib-1.2.8-2f23wbxhtydzawd2lsdiw3a6rdop4o4p
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-zlib-1.2.8-2f23wbxhtydzawd2lsdiw3a6rdop4o4p.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.8/linux-ubuntu18.04-x86_64-gcc-7.5.0-zlib-1.2.8-2f23wbxhtydzawd2lsdiw3a6rdop4o4p.spack
==> Extracting zlib-1.2.8-2f23wbxhtydzawd2lsdiw3a6rdop4o4p from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.8-2f23wbxhtydzawd2lsdiw3a6rdop4o4p

The spack find command is used to query installed packages. Note that some packages appear identical with the default output. The -l flag shows the hash of each package, and the -f flag shows any non-empty compiler flags of those packages.

$ spack find
==> 5 installed packages
-- linux-ubuntu18.04-x86_64 / clang@7.0.0 -----------------------
zlib@1.2.12

-- linux-ubuntu18.04-x86_64 / gcc@6.5.0 -------------------------
zlib@1.2.12

-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
zlib@1.2.8  zlib@1.2.8	zlib@1.2.12
$ spack find -lf
==> 5 installed packages
-- linux-ubuntu18.04-x86_64 / clang@7.0.0 -----------------------
3svypja zlib@1.2.12%clang

-- linux-ubuntu18.04-x86_64 / gcc@6.5.0 -------------------------
g4z6hjr zlib@1.2.12%gcc

-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
gueun6g zlib@1.2.8%gcc	 2f23wbx zlib@1.2.8%gcc  cppflags="-O3"   fntvsj6 zlib@1.2.12%gcc

Spack generates a hash for each spec. This hash is a function of the full provenance of the package, so any change to the spec affects the hash. Spack uses this value to compare specs and to generate unique installation directories for every combinatorial version. As we move into more complicated packages with software dependencies, we can see that Spack reuses existing packages to satisfy a dependency. By default, Spack tries hard to reuse existing installations as dependencies, either from a local store or from configured remote buildcaches. This minimizes unwanted rebuilds of common dependencies, in particular if you update Spack frequently.

$ spack install tcl
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs
==> Installing tcl-8.6.12-6m3sqvrf3udchwj2hgutj2ftnmyp544m
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-tcl-8.6.12-6m3sqvrf3udchwj2hgutj2ftnmyp544m.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/tcl-8.6.12/linux-ubuntu18.04-x86_64-gcc-7.5.0-tcl-8.6.12-6m3sqvrf3udchwj2hgutj2ftnmyp544m.spack
==> Extracting tcl-8.6.12-6m3sqvrf3udchwj2hgutj2ftnmyp544m from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/tcl-8.6.12-6m3sqvrf3udchwj2hgutj2ftnmyp544m

Dependencies can be explicitly requested using the ^ sigil. Note that the spec syntax is recursive. Anything we could specify about the top-level package, we can also specify about a dependency using ^.

$ spack install tcl ^zlib@1.2.8 %clang
==> Installing zlib-1.2.8-3en3ddq56wgg3we6jwklzwb7cfe7uwjm
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-clang-7.0.0-zlib-1.2.8-3en3ddq56wgg3we6jwklzwb7cfe7uwjm.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/clang-7.0.0/zlib-1.2.8/linux-ubuntu18.04-x86_64-clang-7.0.0-zlib-1.2.8-3en3ddq56wgg3we6jwklzwb7cfe7uwjm.spack
==> Extracting zlib-1.2.8-3en3ddq56wgg3we6jwklzwb7cfe7uwjm from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/clang-7.0.0/zlib-1.2.8-3en3ddq56wgg3we6jwklzwb7cfe7uwjm
==> Installing tcl-8.6.12-zeszs45honfyebjf35oturm437m6a2qj
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-clang-7.0.0-tcl-8.6.12-zeszs45honfyebjf35oturm437m6a2qj.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/clang-7.0.0/tcl-8.6.12/linux-ubuntu18.04-x86_64-clang-7.0.0-tcl-8.6.12-zeszs45honfyebjf35oturm437m6a2qj.spack
==> Extracting tcl-8.6.12-zeszs45honfyebjf35oturm437m6a2qj from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/clang-7.0.0/tcl-8.6.12-zeszs45honfyebjf35oturm437m6a2qj

Packages can also be referred to from the command line by their package hash. Using the spack find -lf command earlier we saw that the hash of our optimized installation of zlib (cppflags="-O3") began with 2f2. We can now explicitly build with that package without typing the entire spec, by using the / sigil to refer to it by hash. As with other tools like Git, you do not need to specify an entire hash on the command line. You can specify just enough digits to identify a hash uniquely. If a hash prefix is ambiguous (i.e., two or more installed packages share the prefix) then Spack will report an error.

$ spack install tcl ^/2f2
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.8-2f23wbxhtydzawd2lsdiw3a6rdop4o4p
==> Installing tcl-8.6.12-rwnzcphwbxhbp4csrkr7huv6edmjehwm
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-tcl-8.6.12-rwnzcphwbxhbp4csrkr7huv6edmjehwm.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/tcl-8.6.12/linux-ubuntu18.04-x86_64-gcc-7.5.0-tcl-8.6.12-rwnzcphwbxhbp4csrkr7huv6edmjehwm.spack
==> Extracting tcl-8.6.12-rwnzcphwbxhbp4csrkr7huv6edmjehwm from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/tcl-8.6.12-rwnzcphwbxhbp4csrkr7huv6edmjehwm

The spack find command can also take a -d flag, which can show dependency information. Note that each package has a top-level entry, even if it also appears as a dependency.

$ spack find -ldf
==> 9 installed packages
-- linux-ubuntu18.04-x86_64 / clang@7.0.0 -----------------------
zeszs45 tcl@8.6.12%clang
3en3ddq     zlib@1.2.8%clang

3en3ddq zlib@1.2.8%clang

3svypja zlib@1.2.12%clang


-- linux-ubuntu18.04-x86_64 / gcc@6.5.0 -------------------------
g4z6hjr zlib@1.2.12%gcc


-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
rwnzcph tcl@8.6.12%gcc
2f23wbx     zlib@1.2.8%gcc  cppflags="-O3"

6m3sqvr tcl@8.6.12%gcc
fntvsj6     zlib@1.2.12%gcc

gueun6g zlib@1.2.8%gcc

2f23wbx zlib@1.2.8%gcc	cppflags="-O3"

fntvsj6 zlib@1.2.12%gcc

Let’s move on to slightly more complicated packages. HDF5 is a good example of a more complicated package, with an MPI dependency. If we install it “out of the box,” it will build with OpenMPI.

$ spack install hdf5
==> Installing pkgconf-1.8.0-i5po27g2n6zrzxnhxdy2fnpaai7xsdaw
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-pkgconf-1.8.0-i5po27g2n6zrzxnhxdy2fnpaai7xsdaw.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/pkgconf-1.8.0/linux-ubuntu18.04-x86_64-gcc-7.5.0-pkgconf-1.8.0-i5po27g2n6zrzxnhxdy2fnpaai7xsdaw.spack
==> Extracting pkgconf-1.8.0-i5po27g2n6zrzxnhxdy2fnpaai7xsdaw from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/pkgconf-1.8.0-i5po27g2n6zrzxnhxdy2fnpaai7xsdaw
==> Installing berkeley-db-18.1.40-q6tqmmmitkatscuadcwn6ea32iscs55k
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-berkeley-db-18.1.40-q6tqmmmitkatscuadcwn6ea32iscs55k.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/berkeley-db-18.1.40/linux-ubuntu18.04-x86_64-gcc-7.5.0-berkeley-db-18.1.40-q6tqmmmitkatscuadcwn6ea32iscs55k.spack
==> Extracting berkeley-db-18.1.40-q6tqmmmitkatscuadcwn6ea32iscs55k from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/berkeley-db-18.1.40-q6tqmmmitkatscuadcwn6ea32iscs55k
==> Installing libiconv-1.16-dr56jt456uiebij2mkueldmejdxftigc
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libiconv-1.16-dr56jt456uiebij2mkueldmejdxftigc.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libiconv-1.16/linux-ubuntu18.04-x86_64-gcc-7.5.0-libiconv-1.16-dr56jt456uiebij2mkueldmejdxftigc.spack
==> Extracting libiconv-1.16-dr56jt456uiebij2mkueldmejdxftigc from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libiconv-1.16-dr56jt456uiebij2mkueldmejdxftigc
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs
==> Installing libsigsegv-2.13-ubezeychw4iojr3tg6wbsnvp6s3s2qwd
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libsigsegv-2.13-ubezeychw4iojr3tg6wbsnvp6s3s2qwd.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libsigsegv-2.13/linux-ubuntu18.04-x86_64-gcc-7.5.0-libsigsegv-2.13-ubezeychw4iojr3tg6wbsnvp6s3s2qwd.spack
==> Extracting libsigsegv-2.13-ubezeychw4iojr3tg6wbsnvp6s3s2qwd from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libsigsegv-2.13-ubezeychw4iojr3tg6wbsnvp6s3s2qwd
==> Installing util-macros-1.19.3-vkk73ww5p7g4u6lpnay5hcclsckcihtt
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-util-macros-1.19.3-vkk73ww5p7g4u6lpnay5hcclsckcihtt.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/util-macros-1.19.3/linux-ubuntu18.04-x86_64-gcc-7.5.0-util-macros-1.19.3-vkk73ww5p7g4u6lpnay5hcclsckcihtt.spack
==> Extracting util-macros-1.19.3-vkk73ww5p7g4u6lpnay5hcclsckcihtt from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/util-macros-1.19.3-vkk73ww5p7g4u6lpnay5hcclsckcihtt
==> Installing xz-5.2.5-olptpbsse74hpreilbfo4qmlqexihzye
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-xz-5.2.5-olptpbsse74hpreilbfo4qmlqexihzye.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/xz-5.2.5/linux-ubuntu18.04-x86_64-gcc-7.5.0-xz-5.2.5-olptpbsse74hpreilbfo4qmlqexihzye.spack
==> Extracting xz-5.2.5-olptpbsse74hpreilbfo4qmlqexihzye from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/xz-5.2.5-olptpbsse74hpreilbfo4qmlqexihzye
==> Installing ncurses-6.2-frwzsc4jrou7efe7huyzeownqfjvsrfd
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-ncurses-6.2-frwzsc4jrou7efe7huyzeownqfjvsrfd.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/ncurses-6.2/linux-ubuntu18.04-x86_64-gcc-7.5.0-ncurses-6.2-frwzsc4jrou7efe7huyzeownqfjvsrfd.spack
==> Extracting ncurses-6.2-frwzsc4jrou7efe7huyzeownqfjvsrfd from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/ncurses-6.2-frwzsc4jrou7efe7huyzeownqfjvsrfd
==> Installing diffutils-3.8-k22pe4rhr7yllf5pojl75veh5gkjdglq
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-diffutils-3.8-k22pe4rhr7yllf5pojl75veh5gkjdglq.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/diffutils-3.8/linux-ubuntu18.04-x86_64-gcc-7.5.0-diffutils-3.8-k22pe4rhr7yllf5pojl75veh5gkjdglq.spack
==> Extracting diffutils-3.8-k22pe4rhr7yllf5pojl75veh5gkjdglq from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/diffutils-3.8-k22pe4rhr7yllf5pojl75veh5gkjdglq
==> Installing m4-1.4.19-uadbn2a64h744jto2xqy6u2wmujcww6v
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-m4-1.4.19-uadbn2a64h744jto2xqy6u2wmujcww6v.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/m4-1.4.19/linux-ubuntu18.04-x86_64-gcc-7.5.0-m4-1.4.19-uadbn2a64h744jto2xqy6u2wmujcww6v.spack
==> Extracting m4-1.4.19-uadbn2a64h744jto2xqy6u2wmujcww6v from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/m4-1.4.19-uadbn2a64h744jto2xqy6u2wmujcww6v
==> Installing libxml2-2.9.13-4run532u4c6iy5th5gkpgm26tr4vajc4
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libxml2-2.9.13-4run532u4c6iy5th5gkpgm26tr4vajc4.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libxml2-2.9.13/linux-ubuntu18.04-x86_64-gcc-7.5.0-libxml2-2.9.13-4run532u4c6iy5th5gkpgm26tr4vajc4.spack
==> Extracting libxml2-2.9.13-4run532u4c6iy5th5gkpgm26tr4vajc4 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libxml2-2.9.13-4run532u4c6iy5th5gkpgm26tr4vajc4
==> Installing libedit-3.1-20210216-zc56lv6gyjpfvi4tpdtmx5yb7ljfnlrb
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libedit-3.1-20210216-zc56lv6gyjpfvi4tpdtmx5yb7ljfnlrb.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libedit-3.1-20210216/linux-ubuntu18.04-x86_64-gcc-7.5.0-libedit-3.1-20210216-zc56lv6gyjpfvi4tpdtmx5yb7ljfnlrb.spack
==> Extracting libedit-3.1-20210216-zc56lv6gyjpfvi4tpdtmx5yb7ljfnlrb from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libedit-3.1-20210216-zc56lv6gyjpfvi4tpdtmx5yb7ljfnlrb
==> Installing readline-8.1-ls6erxwsj2ubsfzt4x5mblj6nrab5jkp
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-readline-8.1-ls6erxwsj2ubsfzt4x5mblj6nrab5jkp.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/readline-8.1/linux-ubuntu18.04-x86_64-gcc-7.5.0-readline-8.1-ls6erxwsj2ubsfzt4x5mblj6nrab5jkp.spack
==> Extracting readline-8.1-ls6erxwsj2ubsfzt4x5mblj6nrab5jkp from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/readline-8.1-ls6erxwsj2ubsfzt4x5mblj6nrab5jkp
==> Installing bzip2-1.0.8-cyn2yamiu26ofxwgxzxbioreuwigzl6f
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-bzip2-1.0.8-cyn2yamiu26ofxwgxzxbioreuwigzl6f.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/bzip2-1.0.8/linux-ubuntu18.04-x86_64-gcc-7.5.0-bzip2-1.0.8-cyn2yamiu26ofxwgxzxbioreuwigzl6f.spack
==> Extracting bzip2-1.0.8-cyn2yamiu26ofxwgxzxbioreuwigzl6f from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/bzip2-1.0.8-cyn2yamiu26ofxwgxzxbioreuwigzl6f
==> Installing libtool-2.4.7-7fhdrxxizepvvkxrfaaizhzkwx2sjzbt
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libtool-2.4.7-7fhdrxxizepvvkxrfaaizhzkwx2sjzbt.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libtool-2.4.7/linux-ubuntu18.04-x86_64-gcc-7.5.0-libtool-2.4.7-7fhdrxxizepvvkxrfaaizhzkwx2sjzbt.spack
==> Extracting libtool-2.4.7-7fhdrxxizepvvkxrfaaizhzkwx2sjzbt from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libtool-2.4.7-7fhdrxxizepvvkxrfaaizhzkwx2sjzbt
==> Installing gdbm-1.19-xub4jsy5pz5qjf6vooropf2shkigy5pm
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-gdbm-1.19-xub4jsy5pz5qjf6vooropf2shkigy5pm.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/gdbm-1.19/linux-ubuntu18.04-x86_64-gcc-7.5.0-gdbm-1.19-xub4jsy5pz5qjf6vooropf2shkigy5pm.spack
==> Extracting gdbm-1.19-xub4jsy5pz5qjf6vooropf2shkigy5pm from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gdbm-1.19-xub4jsy5pz5qjf6vooropf2shkigy5pm
==> Installing libpciaccess-0.16-csp5gvqmwcmqsd4al5iafotfk5fqh3uf
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libpciaccess-0.16-csp5gvqmwcmqsd4al5iafotfk5fqh3uf.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libpciaccess-0.16/linux-ubuntu18.04-x86_64-gcc-7.5.0-libpciaccess-0.16-csp5gvqmwcmqsd4al5iafotfk5fqh3uf.spack
==> Extracting libpciaccess-0.16-csp5gvqmwcmqsd4al5iafotfk5fqh3uf from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libpciaccess-0.16-csp5gvqmwcmqsd4al5iafotfk5fqh3uf
==> Installing perl-5.34.1-pn5mteswujdkuong6mbqaush54rdas7c
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-perl-5.34.1-pn5mteswujdkuong6mbqaush54rdas7c.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/perl-5.34.1/linux-ubuntu18.04-x86_64-gcc-7.5.0-perl-5.34.1-pn5mteswujdkuong6mbqaush54rdas7c.spack
==> Extracting perl-5.34.1-pn5mteswujdkuong6mbqaush54rdas7c from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/perl-5.34.1-pn5mteswujdkuong6mbqaush54rdas7c
==> Installing hwloc-2.7.1-oixja6dnsnc4mydqswdya2nyt4rlcxpa
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-hwloc-2.7.1-oixja6dnsnc4mydqswdya2nyt4rlcxpa.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/hwloc-2.7.1/linux-ubuntu18.04-x86_64-gcc-7.5.0-hwloc-2.7.1-oixja6dnsnc4mydqswdya2nyt4rlcxpa.spack
==> Extracting hwloc-2.7.1-oixja6dnsnc4mydqswdya2nyt4rlcxpa from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hwloc-2.7.1-oixja6dnsnc4mydqswdya2nyt4rlcxpa
==> Installing autoconf-2.69-hlj3ujmrsu5gs7uhfdotozzg6ipys45b
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-autoconf-2.69-hlj3ujmrsu5gs7uhfdotozzg6ipys45b.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/autoconf-2.69/linux-ubuntu18.04-x86_64-gcc-7.5.0-autoconf-2.69-hlj3ujmrsu5gs7uhfdotozzg6ipys45b.spack
==> Extracting autoconf-2.69-hlj3ujmrsu5gs7uhfdotozzg6ipys45b from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/autoconf-2.69-hlj3ujmrsu5gs7uhfdotozzg6ipys45b
==> Installing openssl-1.1.1o-hqlqpsnqoifap6mlkbr5fyxoaq3gynbk
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-openssl-1.1.1o-hqlqpsnqoifap6mlkbr5fyxoaq3gynbk.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/openssl-1.1.1o/linux-ubuntu18.04-x86_64-gcc-7.5.0-openssl-1.1.1o-hqlqpsnqoifap6mlkbr5fyxoaq3gynbk.spack
==> Extracting openssl-1.1.1o-hqlqpsnqoifap6mlkbr5fyxoaq3gynbk from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openssl-1.1.1o-hqlqpsnqoifap6mlkbr5fyxoaq3gynbk
==> Installing automake-1.16.5-6vk5ehdtjzgcvug6vuwh2mmkjhg2pn2z
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-automake-1.16.5-6vk5ehdtjzgcvug6vuwh2mmkjhg2pn2z.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/automake-1.16.5/linux-ubuntu18.04-x86_64-gcc-7.5.0-automake-1.16.5-6vk5ehdtjzgcvug6vuwh2mmkjhg2pn2z.spack
==> Extracting automake-1.16.5-6vk5ehdtjzgcvug6vuwh2mmkjhg2pn2z from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/automake-1.16.5-6vk5ehdtjzgcvug6vuwh2mmkjhg2pn2z
==> Installing libevent-2.1.12-hlnkgmrdcycqf65n6vrvoraq4dhddagv
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libevent-2.1.12-hlnkgmrdcycqf65n6vrvoraq4dhddagv.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libevent-2.1.12/linux-ubuntu18.04-x86_64-gcc-7.5.0-libevent-2.1.12-hlnkgmrdcycqf65n6vrvoraq4dhddagv.spack
==> Extracting libevent-2.1.12-hlnkgmrdcycqf65n6vrvoraq4dhddagv from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libevent-2.1.12-hlnkgmrdcycqf65n6vrvoraq4dhddagv
==> Installing openssh-9.0p1-3ez3d3jtc4f7bph5suuzqebujp3gppwv
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-openssh-9.0p1-3ez3d3jtc4f7bph5suuzqebujp3gppwv.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/openssh-9.0p1/linux-ubuntu18.04-x86_64-gcc-7.5.0-openssh-9.0p1-3ez3d3jtc4f7bph5suuzqebujp3gppwv.spack
==> Extracting openssh-9.0p1-3ez3d3jtc4f7bph5suuzqebujp3gppwv from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openssh-9.0p1-3ez3d3jtc4f7bph5suuzqebujp3gppwv
==> Installing cmake-3.23.1-tulqz4nxor764kgeij23tfap4ddgpgvh
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-cmake-3.23.1-tulqz4nxor764kgeij23tfap4ddgpgvh.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/cmake-3.23.1/linux-ubuntu18.04-x86_64-gcc-7.5.0-cmake-3.23.1-tulqz4nxor764kgeij23tfap4ddgpgvh.spack
==> Extracting cmake-3.23.1-tulqz4nxor764kgeij23tfap4ddgpgvh from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/cmake-3.23.1-tulqz4nxor764kgeij23tfap4ddgpgvh
==> Installing numactl-2.0.14-wfnw532l74emh6rwx4mrvot3huyiq53t
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-numactl-2.0.14-wfnw532l74emh6rwx4mrvot3huyiq53t.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/numactl-2.0.14/linux-ubuntu18.04-x86_64-gcc-7.5.0-numactl-2.0.14-wfnw532l74emh6rwx4mrvot3huyiq53t.spack
==> Extracting numactl-2.0.14-wfnw532l74emh6rwx4mrvot3huyiq53t from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/numactl-2.0.14-wfnw532l74emh6rwx4mrvot3huyiq53t
==> Installing pmix-4.1.2-e4fax4744gqg222snd6da55c3xq3zu34
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-pmix-4.1.2-e4fax4744gqg222snd6da55c3xq3zu34.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/pmix-4.1.2/linux-ubuntu18.04-x86_64-gcc-7.5.0-pmix-4.1.2-e4fax4744gqg222snd6da55c3xq3zu34.spack
==> Extracting pmix-4.1.2-e4fax4744gqg222snd6da55c3xq3zu34 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/pmix-4.1.2-e4fax4744gqg222snd6da55c3xq3zu34
==> Installing openmpi-4.1.3-jfxctqwar7wb65rn7wf5mot7m4jxmsey
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-openmpi-4.1.3-jfxctqwar7wb65rn7wf5mot7m4jxmsey.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/openmpi-4.1.3/linux-ubuntu18.04-x86_64-gcc-7.5.0-openmpi-4.1.3-jfxctqwar7wb65rn7wf5mot7m4jxmsey.spack
==> Extracting openmpi-4.1.3-jfxctqwar7wb65rn7wf5mot7m4jxmsey from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openmpi-4.1.3-jfxctqwar7wb65rn7wf5mot7m4jxmsey
==> Installing hdf5-1.12.2-rh2gilz6xlosoeuldxtgeyz65wsualsj
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-hdf5-1.12.2-rh2gilz6xlosoeuldxtgeyz65wsualsj.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/hdf5-1.12.2/linux-ubuntu18.04-x86_64-gcc-7.5.0-hdf5-1.12.2-rh2gilz6xlosoeuldxtgeyz65wsualsj.spack
==> Extracting hdf5-1.12.2-rh2gilz6xlosoeuldxtgeyz65wsualsj from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hdf5-1.12.2-rh2gilz6xlosoeuldxtgeyz65wsualsj

Spack packages can also have build options, called variants. Boolean variants can be specified using the + (enable) and ~ or - (disable) sigils. There are two sigils for “disable” to avoid conflicts with shell parsing in different situations. Variants (boolean or otherwise) can also be specified using the same syntax as compiler flags. Here we can install HDF5 without MPI support.

$ spack install hdf5~mpi
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/pkgconf-1.8.0-i5po27g2n6zrzxnhxdy2fnpaai7xsdaw
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/berkeley-db-18.1.40-q6tqmmmitkatscuadcwn6ea32iscs55k
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libiconv-1.16-dr56jt456uiebij2mkueldmejdxftigc
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/ncurses-6.2-frwzsc4jrou7efe7huyzeownqfjvsrfd
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/diffutils-3.8-k22pe4rhr7yllf5pojl75veh5gkjdglq
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/readline-8.1-ls6erxwsj2ubsfzt4x5mblj6nrab5jkp
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/bzip2-1.0.8-cyn2yamiu26ofxwgxzxbioreuwigzl6f
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gdbm-1.19-xub4jsy5pz5qjf6vooropf2shkigy5pm
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/perl-5.34.1-pn5mteswujdkuong6mbqaush54rdas7c
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openssl-1.1.1o-hqlqpsnqoifap6mlkbr5fyxoaq3gynbk
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/cmake-3.23.1-tulqz4nxor764kgeij23tfap4ddgpgvh
==> Installing hdf5-1.12.2-4fertwtoydeiwythyrla63mm55ynphd5
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-hdf5-1.12.2-4fertwtoydeiwythyrla63mm55ynphd5.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/hdf5-1.12.2/linux-ubuntu18.04-x86_64-gcc-7.5.0-hdf5-1.12.2-4fertwtoydeiwythyrla63mm55ynphd5.spack
==> Extracting hdf5-1.12.2-4fertwtoydeiwythyrla63mm55ynphd5 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hdf5-1.12.2-4fertwtoydeiwythyrla63mm55ynphd5

We might also want to install HDF5 with a different MPI implementation. While MPI is not a package itself, packages can depend on abstract interfaces like MPI. Spack handles these through “virtual dependencies.” A package, such as HDF5, can depend on the MPI interface. Other packages (openmpi, mpich, mvapich2, etc.) provide the MPI interface. Any of these providers can be requested for an MPI dependency. For example, we can build HDF5 with MPI support provided by MPICH by specifying a dependency on mpich. Spack also supports versioning of virtual dependencies. A package can depend on the MPI interface at version 3, and provider packages specify what version of the interface they provide. The partial spec ^mpi@3 can be satisfied by any of several providers.

$ spack install hdf5+hl+mpi ^mpich
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/pkgconf-1.8.0-i5po27g2n6zrzxnhxdy2fnpaai7xsdaw
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/berkeley-db-18.1.40-q6tqmmmitkatscuadcwn6ea32iscs55k
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libiconv-1.16-dr56jt456uiebij2mkueldmejdxftigc
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs
==> Installing findutils-4.9.0-bliztd7xzj5jwwvtxywu6cmr3hurdg7g
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-findutils-4.9.0-bliztd7xzj5jwwvtxywu6cmr3hurdg7g.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/findutils-4.9.0/linux-ubuntu18.04-x86_64-gcc-7.5.0-findutils-4.9.0-bliztd7xzj5jwwvtxywu6cmr3hurdg7g.spack
==> Extracting findutils-4.9.0-bliztd7xzj5jwwvtxywu6cmr3hurdg7g from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/findutils-4.9.0-bliztd7xzj5jwwvtxywu6cmr3hurdg7g
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libsigsegv-2.13-ubezeychw4iojr3tg6wbsnvp6s3s2qwd
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/util-macros-1.19.3-vkk73ww5p7g4u6lpnay5hcclsckcihtt
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/xz-5.2.5-olptpbsse74hpreilbfo4qmlqexihzye
==> Installing libfabric-1.14.1-aeocsliasnj2v6ew43otburjccdzd3t3
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libfabric-1.14.1-aeocsliasnj2v6ew43otburjccdzd3t3.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libfabric-1.14.1/linux-ubuntu18.04-x86_64-gcc-7.5.0-libfabric-1.14.1-aeocsliasnj2v6ew43otburjccdzd3t3.spack
==> Extracting libfabric-1.14.1-aeocsliasnj2v6ew43otburjccdzd3t3 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libfabric-1.14.1-aeocsliasnj2v6ew43otburjccdzd3t3
==> Installing libmd-1.0.4-llu53coteiredy5c6ofn56usb3uhoubq
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libmd-1.0.4-llu53coteiredy5c6ofn56usb3uhoubq.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libmd-1.0.4/linux-ubuntu18.04-x86_64-gcc-7.5.0-libmd-1.0.4-llu53coteiredy5c6ofn56usb3uhoubq.spack
==> Extracting libmd-1.0.4-llu53coteiredy5c6ofn56usb3uhoubq from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libmd-1.0.4-llu53coteiredy5c6ofn56usb3uhoubq
==> Installing zstd-1.5.2-w4beu34gabq6d5az524xpja7i5lrgh7w
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-zstd-1.5.2-w4beu34gabq6d5az524xpja7i5lrgh7w.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/zstd-1.5.2/linux-ubuntu18.04-x86_64-gcc-7.5.0-zstd-1.5.2-w4beu34gabq6d5az524xpja7i5lrgh7w.spack
==> Extracting zstd-1.5.2-w4beu34gabq6d5az524xpja7i5lrgh7w from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zstd-1.5.2-w4beu34gabq6d5az524xpja7i5lrgh7w
==> Installing libffi-3.4.2-tkru6n3q7cytihfaayxe3r6zxjevfzvr
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libffi-3.4.2-tkru6n3q7cytihfaayxe3r6zxjevfzvr.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libffi-3.4.2/linux-ubuntu18.04-x86_64-gcc-7.5.0-libffi-3.4.2-tkru6n3q7cytihfaayxe3r6zxjevfzvr.spack
==> Extracting libffi-3.4.2-tkru6n3q7cytihfaayxe3r6zxjevfzvr from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libffi-3.4.2-tkru6n3q7cytihfaayxe3r6zxjevfzvr
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/ncurses-6.2-frwzsc4jrou7efe7huyzeownqfjvsrfd
==> Installing util-linux-uuid-2.37.4-7fulw7ltpkq3t6edfpx3yhqsikyuevi6
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-util-linux-uuid-2.37.4-7fulw7ltpkq3t6edfpx3yhqsikyuevi6.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/util-linux-uuid-2.37.4/linux-ubuntu18.04-x86_64-gcc-7.5.0-util-linux-uuid-2.37.4-7fulw7ltpkq3t6edfpx3yhqsikyuevi6.spack
==> Extracting util-linux-uuid-2.37.4-7fulw7ltpkq3t6edfpx3yhqsikyuevi6 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/util-linux-uuid-2.37.4-7fulw7ltpkq3t6edfpx3yhqsikyuevi6
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/diffutils-3.8-k22pe4rhr7yllf5pojl75veh5gkjdglq
==> Installing pigz-2.7-i74tgiq3mfpjl2zih7gdmaaxrspwpuph
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-pigz-2.7-i74tgiq3mfpjl2zih7gdmaaxrspwpuph.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/pigz-2.7/linux-ubuntu18.04-x86_64-gcc-7.5.0-pigz-2.7-i74tgiq3mfpjl2zih7gdmaaxrspwpuph.spack
==> Extracting pigz-2.7-i74tgiq3mfpjl2zih7gdmaaxrspwpuph from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/pigz-2.7-i74tgiq3mfpjl2zih7gdmaaxrspwpuph
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/m4-1.4.19-uadbn2a64h744jto2xqy6u2wmujcww6v
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libxml2-2.9.13-4run532u4c6iy5th5gkpgm26tr4vajc4
==> Installing libbsd-0.11.5-zliunm4fyuu772mhwsxf46t7se5sssu5
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-libbsd-0.11.5-zliunm4fyuu772mhwsxf46t7se5sssu5.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/libbsd-0.11.5/linux-ubuntu18.04-x86_64-gcc-7.5.0-libbsd-0.11.5-zliunm4fyuu772mhwsxf46t7se5sssu5.spack
==> Extracting libbsd-0.11.5-zliunm4fyuu772mhwsxf46t7se5sssu5 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libbsd-0.11.5-zliunm4fyuu772mhwsxf46t7se5sssu5
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/readline-8.1-ls6erxwsj2ubsfzt4x5mblj6nrab5jkp
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/bzip2-1.0.8-cyn2yamiu26ofxwgxzxbioreuwigzl6f
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libtool-2.4.7-7fhdrxxizepvvkxrfaaizhzkwx2sjzbt
==> Installing expat-2.4.8-5grv4owq6nvy77lqtfcngmvfywc7lzh7
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-expat-2.4.8-5grv4owq6nvy77lqtfcngmvfywc7lzh7.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/expat-2.4.8/linux-ubuntu18.04-x86_64-gcc-7.5.0-expat-2.4.8-5grv4owq6nvy77lqtfcngmvfywc7lzh7.spack
==> Extracting expat-2.4.8-5grv4owq6nvy77lqtfcngmvfywc7lzh7 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/expat-2.4.8-5grv4owq6nvy77lqtfcngmvfywc7lzh7
==> Installing sqlite-3.38.5-zbjzhlerhmb2liwt2zh4krac2i5hfftt
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-sqlite-3.38.5-zbjzhlerhmb2liwt2zh4krac2i5hfftt.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/sqlite-3.38.5/linux-ubuntu18.04-x86_64-gcc-7.5.0-sqlite-3.38.5-zbjzhlerhmb2liwt2zh4krac2i5hfftt.spack
==> Extracting sqlite-3.38.5-zbjzhlerhmb2liwt2zh4krac2i5hfftt from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/sqlite-3.38.5-zbjzhlerhmb2liwt2zh4krac2i5hfftt
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gdbm-1.19-xub4jsy5pz5qjf6vooropf2shkigy5pm
==> Installing tar-1.34-3f62lojkrsldeu6yhdyvcucb37txnl53
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-tar-1.34-3f62lojkrsldeu6yhdyvcucb37txnl53.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/tar-1.34/linux-ubuntu18.04-x86_64-gcc-7.5.0-tar-1.34-3f62lojkrsldeu6yhdyvcucb37txnl53.spack
==> Extracting tar-1.34-3f62lojkrsldeu6yhdyvcucb37txnl53 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/tar-1.34-3f62lojkrsldeu6yhdyvcucb37txnl53
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libpciaccess-0.16-csp5gvqmwcmqsd4al5iafotfk5fqh3uf
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/perl-5.34.1-pn5mteswujdkuong6mbqaush54rdas7c
==> Installing gettext-0.21-wuasyuujhovdcl4ymsayv65phrx35bpf
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-gettext-0.21-wuasyuujhovdcl4ymsayv65phrx35bpf.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/gettext-0.21/linux-ubuntu18.04-x86_64-gcc-7.5.0-gettext-0.21-wuasyuujhovdcl4ymsayv65phrx35bpf.spack
==> Extracting gettext-0.21-wuasyuujhovdcl4ymsayv65phrx35bpf from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gettext-0.21-wuasyuujhovdcl4ymsayv65phrx35bpf
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hwloc-2.7.1-oixja6dnsnc4mydqswdya2nyt4rlcxpa
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/autoconf-2.69-hlj3ujmrsu5gs7uhfdotozzg6ipys45b
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openssl-1.1.1o-hqlqpsnqoifap6mlkbr5fyxoaq3gynbk
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/automake-1.16.5-6vk5ehdtjzgcvug6vuwh2mmkjhg2pn2z
==> Installing python-3.9.12-t3ey2gas2y5iuiyitsjpthff55p55k3g
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-python-3.9.12-t3ey2gas2y5iuiyitsjpthff55p55k3g.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/python-3.9.12/linux-ubuntu18.04-x86_64-gcc-7.5.0-python-3.9.12-t3ey2gas2y5iuiyitsjpthff55p55k3g.spack
==> Extracting python-3.9.12-t3ey2gas2y5iuiyitsjpthff55p55k3g from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/python-3.9.12-t3ey2gas2y5iuiyitsjpthff55p55k3g
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/cmake-3.23.1-tulqz4nxor764kgeij23tfap4ddgpgvh
==> Installing yaksa-0.2-gcyym67wei3yuiqc6ksp2trfqmprw227
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-yaksa-0.2-gcyym67wei3yuiqc6ksp2trfqmprw227.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/yaksa-0.2/linux-ubuntu18.04-x86_64-gcc-7.5.0-yaksa-0.2-gcyym67wei3yuiqc6ksp2trfqmprw227.spack
==> Extracting yaksa-0.2-gcyym67wei3yuiqc6ksp2trfqmprw227 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/yaksa-0.2-gcyym67wei3yuiqc6ksp2trfqmprw227
==> Installing mpich-4.0.2-merlslkviub4yswlbzlssjw7giodwjja
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-mpich-4.0.2-merlslkviub4yswlbzlssjw7giodwjja.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/mpich-4.0.2/linux-ubuntu18.04-x86_64-gcc-7.5.0-mpich-4.0.2-merlslkviub4yswlbzlssjw7giodwjja.spack
==> Extracting mpich-4.0.2-merlslkviub4yswlbzlssjw7giodwjja from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/mpich-4.0.2-merlslkviub4yswlbzlssjw7giodwjja
==> Installing hdf5-1.12.2-e3cws2t4ibe2xo2ltmhvzvtvmh6et47k
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-hdf5-1.12.2-e3cws2t4ibe2xo2ltmhvzvtvmh6et47k.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/hdf5-1.12.2/linux-ubuntu18.04-x86_64-gcc-7.5.0-hdf5-1.12.2-e3cws2t4ibe2xo2ltmhvzvtvmh6et47k.spack
==> Extracting hdf5-1.12.2-e3cws2t4ibe2xo2ltmhvzvtvmh6et47k from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hdf5-1.12.2-e3cws2t4ibe2xo2ltmhvzvtvmh6et47k

We’ll do a quick check in on what we have installed so far.

$ spack find -ldf
==> 54 installed packages
-- linux-ubuntu18.04-x86_64 / clang@7.0.0 -----------------------
zeszs45 tcl@8.6.12%clang
3en3ddq     zlib@1.2.8%clang

3en3ddq zlib@1.2.8%clang

3svypja zlib@1.2.12%clang


-- linux-ubuntu18.04-x86_64 / gcc@6.5.0 -------------------------
g4z6hjr zlib@1.2.12%gcc


-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
hlj3ujm autoconf@2.69%gcc
uadbn2a     m4@1.4.19%gcc
ubezeyc 	libsigsegv@2.13%gcc
pn5mtes     perl@5.34.1%gcc
q6tqmmm 	berkeley-db@18.1.40%gcc
cyn2yam 	bzip2@1.0.8%gcc
k22pe4r 	    diffutils@3.8%gcc
dr56jt4 		libiconv@1.16%gcc
xub4jsy 	gdbm@1.19%gcc
ls6erxw 	    readline@8.1%gcc
frwzsc4 		ncurses@6.2%gcc
i5po27g 		    pkgconf@1.8.0%gcc
fntvsj6 	zlib@1.2.12%gcc

6vk5ehd automake@1.16.5%gcc
hlj3ujm     autoconf@2.69%gcc
uadbn2a 	m4@1.4.19%gcc
ubezeyc 	    libsigsegv@2.13%gcc
pn5mtes 	perl@5.34.1%gcc
q6tqmmm 	    berkeley-db@18.1.40%gcc
cyn2yam 	    bzip2@1.0.8%gcc
k22pe4r 		diffutils@3.8%gcc
dr56jt4 		    libiconv@1.16%gcc
xub4jsy 	    gdbm@1.19%gcc
ls6erxw 		readline@8.1%gcc
frwzsc4 		    ncurses@6.2%gcc
i5po27g 			pkgconf@1.8.0%gcc
fntvsj6 	    zlib@1.2.12%gcc

q6tqmmm berkeley-db@18.1.40%gcc

cyn2yam bzip2@1.0.8%gcc
k22pe4r     diffutils@3.8%gcc
dr56jt4 	libiconv@1.16%gcc

tulqz4n cmake@3.23.1%gcc
frwzsc4     ncurses@6.2%gcc
i5po27g 	pkgconf@1.8.0%gcc
hqlqpsn     openssl@1.1.1o%gcc
pn5mtes 	perl@5.34.1%gcc
q6tqmmm 	    berkeley-db@18.1.40%gcc
cyn2yam 	    bzip2@1.0.8%gcc
k22pe4r 		diffutils@3.8%gcc
dr56jt4 		    libiconv@1.16%gcc
xub4jsy 	    gdbm@1.19%gcc
ls6erxw 		readline@8.1%gcc
fntvsj6 	    zlib@1.2.12%gcc

k22pe4r diffutils@3.8%gcc
dr56jt4     libiconv@1.16%gcc

5grv4ow expat@2.4.8%gcc
zliunm4     libbsd@0.11.5%gcc
llu53co 	libmd@1.0.4%gcc

bliztd7 findutils@4.9.0%gcc

xub4jsy gdbm@1.19%gcc
ls6erxw     readline@8.1%gcc
frwzsc4 	ncurses@6.2%gcc
i5po27g 	    pkgconf@1.8.0%gcc

wuasyuu gettext@0.21%gcc
cyn2yam     bzip2@1.0.8%gcc
k22pe4r 	diffutils@3.8%gcc
dr56jt4 	    libiconv@1.16%gcc
4run532     libxml2@2.9.13%gcc
i5po27g 	pkgconf@1.8.0%gcc
olptpbs 	xz@5.2.5%gcc
fntvsj6 	zlib@1.2.12%gcc
frwzsc4     ncurses@6.2%gcc
3f62loj     tar@1.34%gcc
i74tgiq 	pigz@2.7%gcc
w4beu34 	zstd@1.5.2%gcc

4fertwt hdf5@1.12.2%gcc
tulqz4n     cmake@3.23.1%gcc
frwzsc4 	ncurses@6.2%gcc
i5po27g 	    pkgconf@1.8.0%gcc
hqlqpsn 	openssl@1.1.1o%gcc
pn5mtes 	    perl@5.34.1%gcc
q6tqmmm 		berkeley-db@18.1.40%gcc
cyn2yam 		bzip2@1.0.8%gcc
k22pe4r 		    diffutils@3.8%gcc
dr56jt4 			libiconv@1.16%gcc
xub4jsy 		gdbm@1.19%gcc
ls6erxw 		    readline@8.1%gcc
fntvsj6 		zlib@1.2.12%gcc

rh2gilz hdf5@1.12.2%gcc
tulqz4n     cmake@3.23.1%gcc
frwzsc4 	ncurses@6.2%gcc
i5po27g 	    pkgconf@1.8.0%gcc
hqlqpsn 	openssl@1.1.1o%gcc
pn5mtes 	    perl@5.34.1%gcc
q6tqmmm 		berkeley-db@18.1.40%gcc
cyn2yam 		bzip2@1.0.8%gcc
k22pe4r 		    diffutils@3.8%gcc
dr56jt4 			libiconv@1.16%gcc
xub4jsy 		gdbm@1.19%gcc
ls6erxw 		    readline@8.1%gcc
fntvsj6 		zlib@1.2.12%gcc
jfxctqw     openmpi@4.1.3%gcc
oixja6d 	hwloc@2.7.1%gcc
csp5gvq 	    libpciaccess@0.16%gcc
7fhdrxx 		libtool@2.4.7%gcc
uadbn2a 		    m4@1.4.19%gcc
ubezeyc 			libsigsegv@2.13%gcc
vkk73ww 		util-macros@1.19.3%gcc
4run532 	    libxml2@2.9.13%gcc
olptpbs 		xz@5.2.5%gcc
wfnw532 	numactl@2.0.14%gcc
hlj3ujm 	    autoconf@2.69%gcc
6vk5ehd 	    automake@1.16.5%gcc
3ez3d3j 	openssh@9.0p1%gcc
zc56lv6 	    libedit@3.1-20210216%gcc
e4fax47 	pmix@4.1.2%gcc
hlnkgmr 	    libevent@2.1.12%gcc

e3cws2t hdf5@1.12.2%gcc
tulqz4n     cmake@3.23.1%gcc
frwzsc4 	ncurses@6.2%gcc
i5po27g 	    pkgconf@1.8.0%gcc
hqlqpsn 	openssl@1.1.1o%gcc
pn5mtes 	    perl@5.34.1%gcc
q6tqmmm 		berkeley-db@18.1.40%gcc
cyn2yam 		bzip2@1.0.8%gcc
k22pe4r 		    diffutils@3.8%gcc
dr56jt4 			libiconv@1.16%gcc
xub4jsy 		gdbm@1.19%gcc
ls6erxw 		    readline@8.1%gcc
fntvsj6 		zlib@1.2.12%gcc
merlslk     mpich@4.0.2%gcc
bliztd7 	findutils@4.9.0%gcc
oixja6d 	hwloc@2.7.1%gcc
csp5gvq 	    libpciaccess@0.16%gcc
7fhdrxx 		libtool@2.4.7%gcc
uadbn2a 		    m4@1.4.19%gcc
ubezeyc 			libsigsegv@2.13%gcc
vkk73ww 		util-macros@1.19.3%gcc
4run532 	    libxml2@2.9.13%gcc
olptpbs 		xz@5.2.5%gcc
aeocsli 	libfabric@1.14.1%gcc
gcyym67 	yaksa@0.2%gcc
hlj3ujm 	    autoconf@2.69%gcc
6vk5ehd 	    automake@1.16.5%gcc
t3ey2ga 	    python@3.9.12%gcc
5grv4ow 		expat@2.4.8%gcc
zliunm4 		    libbsd@0.11.5%gcc
llu53co 			libmd@1.0.4%gcc
wuasyuu 		gettext@0.21%gcc
3f62loj 		    tar@1.34%gcc
i74tgiq 			pigz@2.7%gcc
w4beu34 			zstd@1.5.2%gcc
tkru6n3 		libffi@3.4.2%gcc
zbjzhle 		sqlite@3.38.5%gcc
7fulw7l 		util-linux-uuid@2.37.4%gcc

oixja6d hwloc@2.7.1%gcc
csp5gvq     libpciaccess@0.16%gcc
7fhdrxx 	libtool@2.4.7%gcc
uadbn2a 	    m4@1.4.19%gcc
ubezeyc 		libsigsegv@2.13%gcc
i5po27g 	pkgconf@1.8.0%gcc
vkk73ww 	util-macros@1.19.3%gcc
4run532     libxml2@2.9.13%gcc
dr56jt4 	libiconv@1.16%gcc
olptpbs 	xz@5.2.5%gcc
fntvsj6 	zlib@1.2.12%gcc
frwzsc4     ncurses@6.2%gcc

zliunm4 libbsd@0.11.5%gcc
llu53co     libmd@1.0.4%gcc

zc56lv6 libedit@3.1-20210216%gcc
frwzsc4     ncurses@6.2%gcc
i5po27g 	pkgconf@1.8.0%gcc

hlnkgmr libevent@2.1.12%gcc
hqlqpsn     openssl@1.1.1o%gcc
pn5mtes 	perl@5.34.1%gcc
q6tqmmm 	    berkeley-db@18.1.40%gcc
cyn2yam 	    bzip2@1.0.8%gcc
k22pe4r 		diffutils@3.8%gcc
dr56jt4 		    libiconv@1.16%gcc
xub4jsy 	    gdbm@1.19%gcc
ls6erxw 		readline@8.1%gcc
frwzsc4 		    ncurses@6.2%gcc
i5po27g 			pkgconf@1.8.0%gcc
fntvsj6 	    zlib@1.2.12%gcc

aeocsli libfabric@1.14.1%gcc

tkru6n3 libffi@3.4.2%gcc

dr56jt4 libiconv@1.16%gcc

llu53co libmd@1.0.4%gcc

csp5gvq libpciaccess@0.16%gcc
7fhdrxx     libtool@2.4.7%gcc
uadbn2a 	m4@1.4.19%gcc
ubezeyc 	    libsigsegv@2.13%gcc
i5po27g     pkgconf@1.8.0%gcc
vkk73ww     util-macros@1.19.3%gcc

ubezeyc libsigsegv@2.13%gcc

7fhdrxx libtool@2.4.7%gcc
uadbn2a     m4@1.4.19%gcc
ubezeyc 	libsigsegv@2.13%gcc

4run532 libxml2@2.9.13%gcc
dr56jt4     libiconv@1.16%gcc
i5po27g     pkgconf@1.8.0%gcc
olptpbs     xz@5.2.5%gcc
fntvsj6     zlib@1.2.12%gcc

uadbn2a m4@1.4.19%gcc
ubezeyc     libsigsegv@2.13%gcc

merlslk mpich@4.0.2%gcc
bliztd7     findutils@4.9.0%gcc
oixja6d     hwloc@2.7.1%gcc
csp5gvq 	libpciaccess@0.16%gcc
7fhdrxx 	    libtool@2.4.7%gcc
uadbn2a 		m4@1.4.19%gcc
ubezeyc 		    libsigsegv@2.13%gcc
i5po27g 	    pkgconf@1.8.0%gcc
vkk73ww 	    util-macros@1.19.3%gcc
4run532 	libxml2@2.9.13%gcc
dr56jt4 	    libiconv@1.16%gcc
olptpbs 	    xz@5.2.5%gcc
fntvsj6 	    zlib@1.2.12%gcc
frwzsc4 	ncurses@6.2%gcc
aeocsli     libfabric@1.14.1%gcc
gcyym67     yaksa@0.2%gcc
hlj3ujm 	autoconf@2.69%gcc
pn5mtes 	    perl@5.34.1%gcc
q6tqmmm 		berkeley-db@18.1.40%gcc
cyn2yam 		bzip2@1.0.8%gcc
k22pe4r 		    diffutils@3.8%gcc
xub4jsy 		gdbm@1.19%gcc
ls6erxw 		    readline@8.1%gcc
6vk5ehd 	automake@1.16.5%gcc
t3ey2ga 	python@3.9.12%gcc
5grv4ow 	    expat@2.4.8%gcc
zliunm4 		libbsd@0.11.5%gcc
llu53co 		    libmd@1.0.4%gcc
wuasyuu 	    gettext@0.21%gcc
3f62loj 		tar@1.34%gcc
i74tgiq 		    pigz@2.7%gcc
w4beu34 		    zstd@1.5.2%gcc
tkru6n3 	    libffi@3.4.2%gcc
hqlqpsn 	    openssl@1.1.1o%gcc
zbjzhle 	    sqlite@3.38.5%gcc
7fulw7l 	    util-linux-uuid@2.37.4%gcc

frwzsc4 ncurses@6.2%gcc
i5po27g     pkgconf@1.8.0%gcc

wfnw532 numactl@2.0.14%gcc
hlj3ujm     autoconf@2.69%gcc
uadbn2a 	m4@1.4.19%gcc
ubezeyc 	    libsigsegv@2.13%gcc
pn5mtes 	perl@5.34.1%gcc
q6tqmmm 	    berkeley-db@18.1.40%gcc
cyn2yam 	    bzip2@1.0.8%gcc
k22pe4r 		diffutils@3.8%gcc
dr56jt4 		    libiconv@1.16%gcc
xub4jsy 	    gdbm@1.19%gcc
ls6erxw 		readline@8.1%gcc
frwzsc4 		    ncurses@6.2%gcc
i5po27g 			pkgconf@1.8.0%gcc
fntvsj6 	    zlib@1.2.12%gcc
6vk5ehd     automake@1.16.5%gcc
7fhdrxx     libtool@2.4.7%gcc

jfxctqw openmpi@4.1.3%gcc
oixja6d     hwloc@2.7.1%gcc
csp5gvq 	libpciaccess@0.16%gcc
7fhdrxx 	    libtool@2.4.7%gcc
uadbn2a 		m4@1.4.19%gcc
ubezeyc 		    libsigsegv@2.13%gcc
i5po27g 	    pkgconf@1.8.0%gcc
vkk73ww 	    util-macros@1.19.3%gcc
4run532 	libxml2@2.9.13%gcc
dr56jt4 	    libiconv@1.16%gcc
olptpbs 	    xz@5.2.5%gcc
fntvsj6 	    zlib@1.2.12%gcc
frwzsc4 	ncurses@6.2%gcc
wfnw532     numactl@2.0.14%gcc
hlj3ujm 	autoconf@2.69%gcc
pn5mtes 	    perl@5.34.1%gcc
q6tqmmm 		berkeley-db@18.1.40%gcc
cyn2yam 		bzip2@1.0.8%gcc
k22pe4r 		    diffutils@3.8%gcc
xub4jsy 		gdbm@1.19%gcc
ls6erxw 		    readline@8.1%gcc
6vk5ehd 	automake@1.16.5%gcc
3ez3d3j     openssh@9.0p1%gcc
zc56lv6 	libedit@3.1-20210216%gcc
hqlqpsn 	openssl@1.1.1o%gcc
e4fax47     pmix@4.1.2%gcc
hlnkgmr 	libevent@2.1.12%gcc

3ez3d3j openssh@9.0p1%gcc
zc56lv6     libedit@3.1-20210216%gcc
frwzsc4 	ncurses@6.2%gcc
i5po27g 	    pkgconf@1.8.0%gcc
hqlqpsn     openssl@1.1.1o%gcc
pn5mtes 	perl@5.34.1%gcc
q6tqmmm 	    berkeley-db@18.1.40%gcc
cyn2yam 	    bzip2@1.0.8%gcc
k22pe4r 		diffutils@3.8%gcc
dr56jt4 		    libiconv@1.16%gcc
xub4jsy 	    gdbm@1.19%gcc
ls6erxw 		readline@8.1%gcc
fntvsj6 	    zlib@1.2.12%gcc

hqlqpsn openssl@1.1.1o%gcc
pn5mtes     perl@5.34.1%gcc
q6tqmmm 	berkeley-db@18.1.40%gcc
cyn2yam 	bzip2@1.0.8%gcc
k22pe4r 	    diffutils@3.8%gcc
dr56jt4 		libiconv@1.16%gcc
xub4jsy 	gdbm@1.19%gcc
ls6erxw 	    readline@8.1%gcc
frwzsc4 		ncurses@6.2%gcc
i5po27g 		    pkgconf@1.8.0%gcc
fntvsj6 	zlib@1.2.12%gcc

pn5mtes perl@5.34.1%gcc
q6tqmmm     berkeley-db@18.1.40%gcc
cyn2yam     bzip2@1.0.8%gcc
k22pe4r 	diffutils@3.8%gcc
dr56jt4 	    libiconv@1.16%gcc
xub4jsy     gdbm@1.19%gcc
ls6erxw 	readline@8.1%gcc
frwzsc4 	    ncurses@6.2%gcc
i5po27g 		pkgconf@1.8.0%gcc
fntvsj6     zlib@1.2.12%gcc

i74tgiq pigz@2.7%gcc
fntvsj6     zlib@1.2.12%gcc

i5po27g pkgconf@1.8.0%gcc

e4fax47 pmix@4.1.2%gcc
oixja6d     hwloc@2.7.1%gcc
csp5gvq 	libpciaccess@0.16%gcc
7fhdrxx 	    libtool@2.4.7%gcc
uadbn2a 		m4@1.4.19%gcc
ubezeyc 		    libsigsegv@2.13%gcc
i5po27g 	    pkgconf@1.8.0%gcc
vkk73ww 	    util-macros@1.19.3%gcc
4run532 	libxml2@2.9.13%gcc
dr56jt4 	    libiconv@1.16%gcc
olptpbs 	    xz@5.2.5%gcc
fntvsj6 	    zlib@1.2.12%gcc
frwzsc4 	ncurses@6.2%gcc
hlnkgmr     libevent@2.1.12%gcc
hqlqpsn 	openssl@1.1.1o%gcc
pn5mtes 	    perl@5.34.1%gcc
q6tqmmm 		berkeley-db@18.1.40%gcc
cyn2yam 		bzip2@1.0.8%gcc
k22pe4r 		    diffutils@3.8%gcc
xub4jsy 		gdbm@1.19%gcc
ls6erxw 		    readline@8.1%gcc

t3ey2ga python@3.9.12%gcc
cyn2yam     bzip2@1.0.8%gcc
k22pe4r 	diffutils@3.8%gcc
dr56jt4 	    libiconv@1.16%gcc
5grv4ow     expat@2.4.8%gcc
zliunm4 	libbsd@0.11.5%gcc
llu53co 	    libmd@1.0.4%gcc
xub4jsy     gdbm@1.19%gcc
ls6erxw 	readline@8.1%gcc
frwzsc4 	    ncurses@6.2%gcc
i5po27g 		pkgconf@1.8.0%gcc
wuasyuu     gettext@0.21%gcc
4run532 	libxml2@2.9.13%gcc
olptpbs 	    xz@5.2.5%gcc
fntvsj6 	    zlib@1.2.12%gcc
3f62loj 	tar@1.34%gcc
i74tgiq 	    pigz@2.7%gcc
w4beu34 	    zstd@1.5.2%gcc
tkru6n3     libffi@3.4.2%gcc
hqlqpsn     openssl@1.1.1o%gcc
pn5mtes 	perl@5.34.1%gcc
q6tqmmm 	    berkeley-db@18.1.40%gcc
zbjzhle     sqlite@3.38.5%gcc
7fulw7l     util-linux-uuid@2.37.4%gcc

ls6erxw readline@8.1%gcc
frwzsc4     ncurses@6.2%gcc
i5po27g 	pkgconf@1.8.0%gcc

zbjzhle sqlite@3.38.5%gcc
ls6erxw     readline@8.1%gcc
frwzsc4 	ncurses@6.2%gcc
i5po27g 	    pkgconf@1.8.0%gcc
fntvsj6     zlib@1.2.12%gcc

3f62loj tar@1.34%gcc
cyn2yam     bzip2@1.0.8%gcc
k22pe4r 	diffutils@3.8%gcc
dr56jt4 	    libiconv@1.16%gcc
i74tgiq     pigz@2.7%gcc
fntvsj6 	zlib@1.2.12%gcc
olptpbs     xz@5.2.5%gcc
w4beu34     zstd@1.5.2%gcc

rwnzcph tcl@8.6.12%gcc
2f23wbx     zlib@1.2.8%gcc  cppflags="-O3"

6m3sqvr tcl@8.6.12%gcc
fntvsj6     zlib@1.2.12%gcc

7fulw7l util-linux-uuid@2.37.4%gcc
i5po27g     pkgconf@1.8.0%gcc

vkk73ww util-macros@1.19.3%gcc

olptpbs xz@5.2.5%gcc

gcyym67 yaksa@0.2%gcc
hlj3ujm     autoconf@2.69%gcc
uadbn2a 	m4@1.4.19%gcc
ubezeyc 	    libsigsegv@2.13%gcc
pn5mtes 	perl@5.34.1%gcc
q6tqmmm 	    berkeley-db@18.1.40%gcc
cyn2yam 	    bzip2@1.0.8%gcc
k22pe4r 		diffutils@3.8%gcc
dr56jt4 		    libiconv@1.16%gcc
xub4jsy 	    gdbm@1.19%gcc
ls6erxw 		readline@8.1%gcc
frwzsc4 		    ncurses@6.2%gcc
i5po27g 			pkgconf@1.8.0%gcc
fntvsj6 	    zlib@1.2.12%gcc
6vk5ehd     automake@1.16.5%gcc
7fhdrxx     libtool@2.4.7%gcc
t3ey2ga     python@3.9.12%gcc
5grv4ow 	expat@2.4.8%gcc
zliunm4 	    libbsd@0.11.5%gcc
llu53co 		libmd@1.0.4%gcc
wuasyuu 	gettext@0.21%gcc
4run532 	    libxml2@2.9.13%gcc
olptpbs 		xz@5.2.5%gcc
3f62loj 	    tar@1.34%gcc
i74tgiq 		pigz@2.7%gcc
w4beu34 		zstd@1.5.2%gcc
tkru6n3 	libffi@3.4.2%gcc
hqlqpsn 	openssl@1.1.1o%gcc
zbjzhle 	sqlite@3.38.5%gcc
7fulw7l 	util-linux-uuid@2.37.4%gcc

gueun6g zlib@1.2.8%gcc

2f23wbx zlib@1.2.8%gcc	cppflags="-O3"

fntvsj6 zlib@1.2.12%gcc

w4beu34 zstd@1.5.2%gcc

Spack models the dependencies of packages as a directed acyclic graph (DAG). The spack find -d command shows the tree representation of that graph. We can also use the spack graph command to view the entire DAG as a graph.

$ spack graph hdf5+hl+mpi ^mpich
o hdf5@1.12.2/e3cws2t
|\
| |\
| | |\
| | o | mpich@4.0.2/merlslk
| |/| |
| | |\ \
| | | |\ \
| | | | |\ \
| | | | | |\ \
| | | | | | |\ \
| | o | | | | | | yaksa@0.2/gcyym67
| | |\ \ \ \ \ \ \
| | | |\ \ \ \ \ \ \
| | | | |\ \ \ \ \ \ \
| | | | | |\ \ \ \ \ \ \
| | o | | | | | | | | | | python@3.9.12/t3ey2ga
| |/| | | | | | | | | | |
|/|/| | | | | | | | | | |
| | |\ \ \ \ \ \ \ \ \ \ \
| | | |\ \ \ \ \ \ \ \ \ \ \
| | | | |\ \ \ \ \ \ \ \ \ \ \
| | | | | |\ \ \ \ \ \ \ \ \ \ \
| | | | | | |\ \ \ \ \ \ \ \ \ \ \
| | | | | | | |\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | |\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | o | | | | | | | | | | | | | gettext@0.21/wuasyuu
| | | |_|_|_|_|_|/| | | | | | | | | | | | | |
| | |/| | | | | |/| | | | | | | | | | | | | |
| | | | | | | |/| | | | | | | | | | | | | | |
| | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |_|_|_|_|_|_|_|/ / / / / /
| | | | | | | | | | |/| | | | | | | | | | | | |
| | | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | |_|/ / / / / / / / / /
| | | | | | | | | | | | |/| | | | | | | | | | |
| | | | | | | | | o | | | | | | | | | | | | | | tar@1.34/3f62loj
| | | |_|_|_|_|_|/| | | | | | | | | | | | | | |
| | |/| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |_|/ / / / / / / / / / / / /
| | | | | | | | | | | |/| | | | | | | | | | | | | |
| | | | | | | | | | | | |/ / / / / / / / / / / / /
| | | | | | | | | o | | | | | | | | | | | | | | | zstd@1.5.2/w4beu34
| | | | | | | | |  / / / / / / / / / / / / / / /
| | | | o | | | | | | | | | | | | | | | | | | | sqlite@3.38.5/zbjzhle
| |_|_|/| | | | | | | | | | | | | | | | | | | |
|/| | | | | | | | | | | | | | | | | | | | | | |
| | | | |/ / / / / / / / / / / / / / / / / / /
| | | | | | | | o | | | | | | | | | | | | | | pigz@2.7/i74tgiq
| |_|_|_|_|_|_|/ / / / / / / / / / / / / / /
|/| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | o cmake@3.23.1/tulqz4n
| | | | | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|/|
| | | | | |/| |_|_|_|_|_|_|_|_|_|_|_|_|_|/
| | | | | | |/| | | | | | | | | | | | | |
| | | | | o | | | | | | | | | | | | | | | openssl@1.1.1o/hqlqpsn
| |_|_|_|/| | | | | | | | | | | | | | | |
|/| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | o | | | | | automake@1.16.5/6vk5ehd
| | | | | | |_|_|_|_|_|_|_|_|/| | | | | |
| | | | | |/| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |/ / / / /
| | | | | | | | | | | | | | | o | | | | autoconf@2.69/hlj3ujm
| | | | | | |_|_|_|_|_|_|_|_|/| | | | |
| | | | | |/| | | | | | | | |/ / / / /
| | | | | | | | | | | | | |/| | | | |
| | | | | o | | | | | | | | | | | | | perl@5.34.1/pn5mtes
| |_|_|_|/| | | | | | | | | | | | | |
|/| | | | | | | | | | | | | | | | | |
| | | | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | |_|_|_|_|_|/ / / / / / / /
| | | | | |/| | | | | | | | | | | | |
| | | | | | |\ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | |_|_|_|/ / / / / / / / /
| | | | | | |/| | | | | | | | | | | |
| | | | | | | | | | | | | | | | | o | hwloc@2.7.1/oixja6d
| | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|/| |
| |/| | | | | | | |_|_|_|_|_|_|_|/| |
| | | | | | | | |/| | | |_|_|_|_|/| |
| | | | | | | | | | | |/| | | | |/ /
| | | | | | | | | | | | | | | |/| |
| | | | | | | | | | | o | | | | | | libxml2@2.9.13/4run532
| |_|_|_|_|_|_|_|_|_|/| | | | | | |
|/| |_|_|_|_|_|_|_|_|/| | | | | | |
| |/| |_|_|_|_|_|_|_|/| | | | | | |
| | |/| | | | | | | |/ / / / / / /
o | | | | | | | | | | | | | | | | zlib@1.2.12/fntvsj6
 / / / / / / / / / / / / / / / /
| o | | | | | | | | | | | | | | xz@5.2.5/olptpbs
|  / / / / / / / / / / / / / /
| | | | | | | | | | | | o | | libpciaccess@0.16/csp5gvq
| |_|_|_|_|_|_|_|_|_|_|/| | |
|/| | | | | | | | | | |/| | |
| | | | | | | | | | | | o | | util-macros@1.19.3/vkk73ww
| | | | | | | | | | | |  / /
| o | | | | | | | | | | | | util-linux-uuid@2.37.4/7fulw7l
|/ / / / / / / / / / / / /
| | o | | | | | | | | | | gdbm@1.19/xub4jsy
| |/ / / / / / / / / / /
| o | | | | | | | | | | readline@8.1/ls6erxw
| | |_|/ / / / / / / /
| |/| | | | | | | | |
| o | | | | | | | | | ncurses@6.2/frwzsc4
|/ / / / / / / / / /
o | | | | | | | | | pkgconf@1.8.0/i5po27g
 / / / / / / / / /
| | | | | | o | | libtool@2.4.7/7fhdrxx
| | | | | |/ / /
| | | | | o | | m4@1.4.19/uadbn2a
| | | | | o | | libsigsegv@2.13/ubezeyc
| | | | |  / /
| | | | o | | expat@2.4.8/5grv4ow
| | | | o | | libbsd@0.11.5/zliunm4
| | | | o | | libmd@1.0.4/llu53co
| | | |  / /
o | | | | | bzip2@1.0.8/cyn2yam
o | | | | | diffutils@3.8/k22pe4r
| |_|/ / /
|/| | | |
o | | | | libiconv@1.16/dr56jt4
 / / / /
| o | | libffi@3.4.2/tkru6n3
|  / /
| o | libfabric@1.14.1/aeocsli
|  /
| o findutils@4.9.0/bliztd7
|
o berkeley-db@18.1.40/q6tqmmm

You may also have noticed that there are some packages shown in the spack find -d output that we didn’t install explicitly. These are dependencies that were installed implicitly. A few packages installed implicitly are not shown as dependencies in the spack find -d output. These are build dependencies. For example, hdf5 requires cmake to build. Spack will build cmake as part of the installation of hdf5, but it does not become a part of the DAG because it is not linked in at run time. Spack handles build dependencies differently because of their different (less strict) consistency requirements. It is entirely possible to have two packages using different versions of a dependency to build, which obviously cannot be done with linked dependencies.

HDF5 is more complicated than our basic example of zlib and Tcl, but it’s still within the realm of software that an experienced HPC user could reasonably expect to manually install given a bit of time. Now let’s look at an even more complicated package.

$ spack install trilinos
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/pkgconf-1.8.0-i5po27g2n6zrzxnhxdy2fnpaai7xsdaw
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/berkeley-db-18.1.40-q6tqmmmitkatscuadcwn6ea32iscs55k
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libiconv-1.16-dr56jt456uiebij2mkueldmejdxftigc
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libsigsegv-2.13-ubezeychw4iojr3tg6wbsnvp6s3s2qwd
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/util-macros-1.19.3-vkk73ww5p7g4u6lpnay5hcclsckcihtt
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/xz-5.2.5-olptpbsse74hpreilbfo4qmlqexihzye
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/ncurses-6.2-frwzsc4jrou7efe7huyzeownqfjvsrfd
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/diffutils-3.8-k22pe4rhr7yllf5pojl75veh5gkjdglq
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/m4-1.4.19-uadbn2a64h744jto2xqy6u2wmujcww6v
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libxml2-2.9.13-4run532u4c6iy5th5gkpgm26tr4vajc4
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/readline-8.1-ls6erxwsj2ubsfzt4x5mblj6nrab5jkp
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libedit-3.1-20210216-zc56lv6gyjpfvi4tpdtmx5yb7ljfnlrb
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/bzip2-1.0.8-cyn2yamiu26ofxwgxzxbioreuwigzl6f
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libtool-2.4.7-7fhdrxxizepvvkxrfaaizhzkwx2sjzbt
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gdbm-1.19-xub4jsy5pz5qjf6vooropf2shkigy5pm
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libpciaccess-0.16-csp5gvqmwcmqsd4al5iafotfk5fqh3uf
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/perl-5.34.1-pn5mteswujdkuong6mbqaush54rdas7c
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hwloc-2.7.1-oixja6dnsnc4mydqswdya2nyt4rlcxpa
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openssl-1.1.1o-hqlqpsnqoifap6mlkbr5fyxoaq3gynbk
==> Installing openblas-0.3.20-dydujpzz2yqemiiboxdl2qb5e73wqesm
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-openblas-0.3.20-dydujpzz2yqemiiboxdl2qb5e73wqesm.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/openblas-0.3.20/linux-ubuntu18.04-x86_64-gcc-7.5.0-openblas-0.3.20-dydujpzz2yqemiiboxdl2qb5e73wqesm.spack
==> Extracting openblas-0.3.20-dydujpzz2yqemiiboxdl2qb5e73wqesm from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openblas-0.3.20-dydujpzz2yqemiiboxdl2qb5e73wqesm
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/autoconf-2.69-hlj3ujmrsu5gs7uhfdotozzg6ipys45b
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libevent-2.1.12-hlnkgmrdcycqf65n6vrvoraq4dhddagv
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/cmake-3.23.1-tulqz4nxor764kgeij23tfap4ddgpgvh
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openssh-9.0p1-3ez3d3jtc4f7bph5suuzqebujp3gppwv
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/automake-1.16.5-6vk5ehdtjzgcvug6vuwh2mmkjhg2pn2z
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/pmix-4.1.2-e4fax4744gqg222snd6da55c3xq3zu34
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/numactl-2.0.14-wfnw532l74emh6rwx4mrvot3huyiq53t
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openmpi-4.1.3-jfxctqwar7wb65rn7wf5mot7m4jxmsey
==> Installing trilinos-13.0.1-6t2acz7flltuohbhadoelljcn6te2hm2
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-trilinos-13.0.1-6t2acz7flltuohbhadoelljcn6te2hm2.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/trilinos-13.0.1/linux-ubuntu18.04-x86_64-gcc-7.5.0-trilinos-13.0.1-6t2acz7flltuohbhadoelljcn6te2hm2.spack
==> Extracting trilinos-13.0.1-6t2acz7flltuohbhadoelljcn6te2hm2 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/trilinos-13.0.1-6t2acz7flltuohbhadoelljcn6te2hm2

Now we’re starting to see the power of Spack. Trilinos in its default configuration has 23 top level dependencies, many of which have dependencies of their own. Installing more complex packages can take days or weeks even for an experienced user. Although we’ve done a binary installation for the tutorial, a source installation of Trilinos using Spack takes about 3 hours (depending on the system), but only 20 seconds of programmer time.

Spack manages consistency of the entire DAG. Every MPI dependency will be satisfied by the same configuration of MPI, etc. If we install Trilinos again specifying a dependency on our previous HDF5 built with MPICH:

$ spack install trilinos +hdf5 ^hdf5+hl+mpi ^mpich
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/pkgconf-1.8.0-i5po27g2n6zrzxnhxdy2fnpaai7xsdaw
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/berkeley-db-18.1.40-q6tqmmmitkatscuadcwn6ea32iscs55k
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libiconv-1.16-dr56jt456uiebij2mkueldmejdxftigc
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/findutils-4.9.0-bliztd7xzj5jwwvtxywu6cmr3hurdg7g
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libsigsegv-2.13-ubezeychw4iojr3tg6wbsnvp6s3s2qwd
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/util-macros-1.19.3-vkk73ww5p7g4u6lpnay5hcclsckcihtt
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/xz-5.2.5-olptpbsse74hpreilbfo4qmlqexihzye
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libfabric-1.14.1-aeocsliasnj2v6ew43otburjccdzd3t3
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libmd-1.0.4-llu53coteiredy5c6ofn56usb3uhoubq
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zstd-1.5.2-w4beu34gabq6d5az524xpja7i5lrgh7w
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libffi-3.4.2-tkru6n3q7cytihfaayxe3r6zxjevfzvr
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/util-linux-uuid-2.37.4-7fulw7ltpkq3t6edfpx3yhqsikyuevi6
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/ncurses-6.2-frwzsc4jrou7efe7huyzeownqfjvsrfd
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/diffutils-3.8-k22pe4rhr7yllf5pojl75veh5gkjdglq
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/pigz-2.7-i74tgiq3mfpjl2zih7gdmaaxrspwpuph
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/m4-1.4.19-uadbn2a64h744jto2xqy6u2wmujcww6v
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libxml2-2.9.13-4run532u4c6iy5th5gkpgm26tr4vajc4
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libbsd-0.11.5-zliunm4fyuu772mhwsxf46t7se5sssu5
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/readline-8.1-ls6erxwsj2ubsfzt4x5mblj6nrab5jkp
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/bzip2-1.0.8-cyn2yamiu26ofxwgxzxbioreuwigzl6f
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libtool-2.4.7-7fhdrxxizepvvkxrfaaizhzkwx2sjzbt
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/expat-2.4.8-5grv4owq6nvy77lqtfcngmvfywc7lzh7
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gdbm-1.19-xub4jsy5pz5qjf6vooropf2shkigy5pm
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/sqlite-3.38.5-zbjzhlerhmb2liwt2zh4krac2i5hfftt
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/tar-1.34-3f62lojkrsldeu6yhdyvcucb37txnl53
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libpciaccess-0.16-csp5gvqmwcmqsd4al5iafotfk5fqh3uf
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/perl-5.34.1-pn5mteswujdkuong6mbqaush54rdas7c
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gettext-0.21-wuasyuujhovdcl4ymsayv65phrx35bpf
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hwloc-2.7.1-oixja6dnsnc4mydqswdya2nyt4rlcxpa
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openssl-1.1.1o-hqlqpsnqoifap6mlkbr5fyxoaq3gynbk
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/autoconf-2.69-hlj3ujmrsu5gs7uhfdotozzg6ipys45b
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/openblas-0.3.20-dydujpzz2yqemiiboxdl2qb5e73wqesm
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/cmake-3.23.1-tulqz4nxor764kgeij23tfap4ddgpgvh
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/python-3.9.12-t3ey2gas2y5iuiyitsjpthff55p55k3g
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/automake-1.16.5-6vk5ehdtjzgcvug6vuwh2mmkjhg2pn2z
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/yaksa-0.2-gcyym67wei3yuiqc6ksp2trfqmprw227
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/mpich-4.0.2-merlslkviub4yswlbzlssjw7giodwjja
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hdf5-1.12.2-e3cws2t4ibe2xo2ltmhvzvtvmh6et47k
==> Installing trilinos-13.0.1-nk6x6g4mmxv4ahmnxf7xzx4mrvmxoant
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-trilinos-13.0.1-nk6x6g4mmxv4ahmnxf7xzx4mrvmxoant.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/trilinos-13.0.1/linux-ubuntu18.04-x86_64-gcc-7.5.0-trilinos-13.0.1-nk6x6g4mmxv4ahmnxf7xzx4mrvmxoant.spack
==> Extracting trilinos-13.0.1-nk6x6g4mmxv4ahmnxf7xzx4mrvmxoant from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/trilinos-13.0.1-nk6x6g4mmxv4ahmnxf7xzx4mrvmxoant

We see that every package in the Trilinos DAG that depends on MPI now uses MPICH.

$ spack find -d trilinos
==> 2 installed packages
-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
trilinos@13.0.1
    cmake@3.23.1
	ncurses@6.2
	    pkgconf@1.8.0
	openssl@1.1.1o
	    perl@5.34.1
		berkeley-db@18.1.40
		bzip2@1.0.8
		    diffutils@3.8
			libiconv@1.16
		gdbm@1.19
		    readline@8.1
		zlib@1.2.12
    hwloc@2.7.1
	libpciaccess@0.16
	    libtool@2.4.7
		m4@1.4.19
		    libsigsegv@2.13
	    util-macros@1.19.3
	libxml2@2.9.13
	    xz@5.2.5
    openblas@0.3.20
    openmpi@4.1.3
	numactl@2.0.14
	    autoconf@2.69
	    automake@1.16.5
	openssh@9.0p1
	    libedit@3.1-20210216
	pmix@4.1.2
	    libevent@2.1.12

trilinos@13.0.1
    cmake@3.23.1
	ncurses@6.2
	    pkgconf@1.8.0
	openssl@1.1.1o
	    perl@5.34.1
		berkeley-db@18.1.40
		bzip2@1.0.8
		    diffutils@3.8
			libiconv@1.16
		gdbm@1.19
		    readline@8.1
		zlib@1.2.12
    hdf5@1.12.2
	mpich@4.0.2
	    findutils@4.9.0
	    hwloc@2.7.1
		libpciaccess@0.16
		    libtool@2.4.7
			m4@1.4.19
			    libsigsegv@2.13
		    util-macros@1.19.3
		libxml2@2.9.13
		    xz@5.2.5
	    libfabric@1.14.1
	    yaksa@0.2
		autoconf@2.69
		automake@1.16.5
		python@3.9.12
		    expat@2.4.8
			libbsd@0.11.5
			    libmd@1.0.4
		    gettext@0.21
			tar@1.34
			    pigz@2.7
			    zstd@1.5.2
		    libffi@3.4.2
		    sqlite@3.38.5
		    util-linux-uuid@2.37.4
    openblas@0.3.20

As we discussed before, the spack find -d command shows the dependency information as a tree. While that is often sufficient, many complicated packages, including Trilinos, have dependencies that cannot be fully represented as a tree. Again, the spack graph command shows the full DAG of the dependency information.

$ spack graph trilinos
o trilinos@13.0.1/6t2acz7
|\
| |\
| | |\
o | | | openmpi@4.1.3/jfxctqw
|\ \ \ \
| |\ \ \ \
| | |\ \ \ \
| | | |\ \ \ \
| | | | |\ \ \ \
| | | | | |\ \ \ \
| | | | | | | |/ /
| | | | | | |/| |
| o | | | | | | | pmix@4.1.2/e4fax47
| |\ \ \ \ \ \ \ \
| | | |_|_|_|/ / /
| | |/| | | | | |
| | | | | o | | | openssh@9.0p1/3ez3d3j
| |_|_|_|/| | | |
|/| | | | | | | |
| | | | | |\ \ \ \
| | | | | | |\ \ \ \
| o | | | | | | | | | libevent@2.1.12/hlnkgmr
| | |_|_|/ / / / / /
| |/| | | | | | | |
| | | | | | | | | o cmake@3.23.1/tulqz4n
| | |_|_|_|_|_|_|/|
| |/| | | | |_|_|/
| | | | | |/| | |
| o | | | | | | | openssl@1.1.1o/hqlqpsn
|/| | | | | | | |
| | |_|/ / / / /
| |/| | | | | |
| | | | | | | o openblas@0.3.20/dydujpz
| | |_|_|_|_|/
| |/| | | | |
| | | | | | o numactl@2.0.14/wfnw532
| | | | | | |\
| | | | | | | |\
| | | | | | | | |\
| | | | | | | | o | automake@1.16.5/6vk5ehd
| | |_|_|_|_|_|/| |
| |/| | | | | | | |
| | | | | | | | |/
| | | | | | | | o autoconf@2.69/hlj3ujm
| | |_|_|_|_|_|/|
| |/| | | | | |/
| | | | | | |/|
| o | | | | | | perl@5.34.1/pn5mtes
|/| | | | | | |
| |\ \ \ \ \ \ \
| | |\ \ \ \ \ \ \
| | | | o | | | | | hwloc@2.7.1/oixja6d
| | | | |\| | | | |
| | | | |\ \ \ \ \ \
| | | | | |_|/ / / /
| | | | |/| | | | |
| | | | | |\ \ \ \ \
| | | | | o | | | | | libxml2@2.9.13/4run532
| |_|_|_|/| | | | | |
|/| | | | | | | | | |
| | | | | |\ \ \ \ \ \
| | | | | | |\ \ \ \ \ \
| | | | | | | |_|/ / / /
| | | | | | |/| | | | |
o | | | | | | | | | | | zlib@1.2.12/fntvsj6
 / / / / / / / / / / /
| | | | o | | | | | | xz@5.2.5/olptpbs
| | | |  / / / / / /
| | | | | | o | | | libpciaccess@0.16/csp5gvq
| | | | | |/| | | |
| | | | |/| | | | |
| | | | | | |\ \ \ \
| | | | | | | | |_|/
| | | | | | | |/| |
| | | | | | o | | | util-macros@1.19.3/vkk73ww
| | | | | |  / / /
o | | | | | | | | gdbm@1.19/xub4jsy
o | | | | | | | | readline@8.1/ls6erxw
| |_|/ / / / / /
|/| | | | | | |
| | | | | | o | libedit@3.1-20210216/zc56lv6
| |_|_|_|_|/| |
|/| | | |_|/ /
| | | |/| | |
o | | | | | | ncurses@6.2/frwzsc4
| |_|/ / / /
|/| | | | |
o | | | | | pkgconf@1.8.0/i5po27g
 / / / / /
| | | o | libtool@2.4.7/7fhdrxx
| | | |/
| | | o m4@1.4.19/uadbn2a
| | | o libsigsegv@2.13/ubezeyc
| | |
o | | bzip2@1.0.8/cyn2yam
o | | diffutils@3.8/k22pe4r
| |/
|/|
o | libiconv@1.16/dr56jt4
 /
o berkeley-db@18.1.40/q6tqmmm

You can control how the output is displayed with a number of options.

The ASCII output from spack graph can be difficult to parse for complicated packages. The output can be changed to the Graphviz .dot format using the --dot flag.

$ spack graph --dot trilinos | dot -Tpdf > trilinos_graph.pdf

Uninstalling Packages

Earlier we installed many configurations each of zlib and Tcl. Now we will go through and uninstall some of those packages that we didn’t really need.

$ spack find -d tcl
==> 3 installed packages
-- linux-ubuntu18.04-x86_64 / clang@7.0.0 -----------------------
tcl@8.6.12
    zlib@1.2.8


-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
tcl@8.6.12
    zlib@1.2.8

tcl@8.6.12
    zlib@1.2.12
$ spack find zlib
==> 6 installed packages
-- linux-ubuntu18.04-x86_64 / clang@7.0.0 -----------------------
zlib@1.2.8  zlib@1.2.12

-- linux-ubuntu18.04-x86_64 / gcc@6.5.0 -------------------------
zlib@1.2.12

-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
zlib@1.2.8  zlib@1.2.8	zlib@1.2.12

We can uninstall packages by spec using the same syntax as install.

$ spack uninstall zlib %gcc@6.5.0
==> The following packages will be uninstalled:

    -- linux-ubuntu18.04-x86_64 / gcc@6.5.0 -------------------------
    g4z6hjr zlib@1.2.12

==> Do you want to proceed? [y/N] y
==> Successfully uninstalled zlib@1.2.12%gcc@6.5.0+optimize+pic+shared patches=0d38234 arch=linux-ubuntu18.04-x86_64/g4z6hjr
$ spack find -lf zlib
==> 5 installed packages
-- linux-ubuntu18.04-x86_64 / clang@7.0.0 -----------------------
3en3ddq zlib@1.2.8%clang   3svypja zlib@1.2.12%clang

-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
gueun6g zlib@1.2.8%gcc	 2f23wbx zlib@1.2.8%gcc  cppflags="-O3"   fntvsj6 zlib@1.2.12%gcc

We can also uninstall packages by referring only to their hash.

We can use either -f (force) or -R (remove dependents as well) to remove packages that are required by another installed package.

$ spack uninstall zlib/3en
==> Will not uninstall zlib@1.2.8%clang@7.0.0/3en3ddq
The following packages depend on it:
    -- linux-ubuntu18.04-x86_64 / clang@7.0.0 -----------------------
    zeszs45 tcl@8.6.12

==> Error: There are still dependents.
  use `spack uninstall --dependents` to remove dependents too
$ spack uninstall -R zlib/3en
==> The following packages will be uninstalled:

    -- linux-ubuntu18.04-x86_64 / clang@7.0.0 -----------------------
    zeszs45 tcl@8.6.12
    3en3ddq zlib@1.2.8

==> Do you want to proceed? [y/N] y
==> Successfully uninstalled tcl@8.6.12%clang@7.0.0 arch=linux-ubuntu18.04-x86_64/zeszs45
==> Successfully uninstalled zlib@1.2.8%clang@7.0.0+optimize+pic+shared arch=linux-ubuntu18.04-x86_64/3en3ddq

Spack will not uninstall packages that are not sufficiently specified. The -a (all) flag can be used to uninstall multiple packages at once.

$ spack uninstall trilinos
==> Error: trilinos matches multiple packages:

    -- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
    6t2acz7 trilinos@13.0.1  nk6x6g4 trilinos@13.0.1

==> Error: You can either:
    a) use a more specific spec, or
    b) specify the spec by its hash (e.g. `spack uninstall /hash`), or
    c) use `spack uninstall --all` to uninstall ALL matching specs.
$ spack uninstall /6t2
==> The following packages will be uninstalled:

    -- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
    6t2acz7 trilinos@13.0.1

==> Do you want to proceed? [y/N] y
==> Successfully uninstalled trilinos@13.0.1%gcc@7.5.0~adelus~adios2+amesos+amesos2+anasazi+aztec~basker+belos~boost~chaco~complex~cuda~cuda_rdc~debug~dtk+epetra+epetraext~epetraextbtf~epetraextexperimental~epetraextgraphreorderings~exodus+explicit_template_instantiation~float+fortran~gtest~hdf5~hypre+ifpack+ifpack2~intrepid~intrepid2~ipo~isorropia+kokkos~mesquite~minitensor+ml+mpi+muelu~mumps~nox~openmp~panzer~phalanx~piro~python~rocm~rocm_rdc~rol~rythmos+sacado~scorec~shards+shared~shylu~stk~stokhos~stratimikos~strumpack~suite-sparse~superlu~superlu-dist~teko~tempus~thyra+tpetra~trilinoscouplings~wrapper~x11~zoltan~zoltan2 build_type=RelWithDebInfo cxxstd=14 gotype=long_long arch=linux-ubuntu18.04-x86_64/6t2acz7

Advanced spack find Usage

We will go over some additional uses for the spack find command not already covered in the Installing Spack and Uninstalling Packages sections.

The spack find command can accept what we call “anonymous specs.” These are expressions in spec syntax that do not contain a package name. For example, spack find ^mpich will return every installed package that depends on MPICH, and spack find cppflags="-O3" will return every package which was built with cppflags="-O3".

$ spack find ^mpich
==> 2 installed packages
-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
hdf5@1.12.2  trilinos@13.0.1
$ spack find cppflags=-O3
==> 1 installed package
-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
zlib@1.2.8

The find command can also show which packages were installed explicitly (rather than pulled in as a dependency) using the -x flag. The -X flag shows implicit installs only. The find command can also show the path to which a Spack package was installed using the -p flag.

$ spack find -px
==> 10 installed packages
-- linux-ubuntu18.04-x86_64 / clang@7.0.0 -----------------------
zlib@1.2.12  /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/clang-7.0.0/zlib-1.2.12-3svypjaie5farii5zcgm6yfu43la2ixs

-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
hdf5@1.12.2	 /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hdf5-1.12.2-4fertwtoydeiwythyrla63mm55ynphd5
hdf5@1.12.2	 /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hdf5-1.12.2-rh2gilz6xlosoeuldxtgeyz65wsualsj
hdf5@1.12.2	 /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/hdf5-1.12.2-e3cws2t4ibe2xo2ltmhvzvtvmh6et47k
tcl@8.6.12	 /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/tcl-8.6.12-rwnzcphwbxhbp4csrkr7huv6edmjehwm
tcl@8.6.12	 /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/tcl-8.6.12-6m3sqvrf3udchwj2hgutj2ftnmyp544m
trilinos@13.0.1  /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/trilinos-13.0.1-nk6x6g4mmxv4ahmnxf7xzx4mrvmxoant
zlib@1.2.8	 /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.8-gueun6gngeyk4khe6qqnakxrtgox46sb
zlib@1.2.8	 /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.8-2f23wbxhtydzawd2lsdiw3a6rdop4o4p
zlib@1.2.12	 /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs

Customizing Compilers

Spack manages a list of available compilers on the system, detected automatically from from the user’s PATH variable. The spack compilers command is an alias for the command spack compiler list.

$ spack compilers
==> Available compilers
-- clang ubuntu18.04-x86_64 -------------------------------------
clang@7.0.0

-- gcc ubuntu18.04-x86_64 ---------------------------------------
gcc@7.5.0  gcc@6.5.0

The compilers are maintained in a YAML file. Later in the tutorial you will learn how to configure compilers by hand for special cases. Spack also has tools to add compilers, and compilers built with Spack can be added to the configuration.

$ spack install gcc@8.4.0
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libiconv-1.16-dr56jt456uiebij2mkueldmejdxftigc
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libsigsegv-2.13-ubezeychw4iojr3tg6wbsnvp6s3s2qwd
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/berkeley-db-18.1.40-q6tqmmmitkatscuadcwn6ea32iscs55k
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/pkgconf-1.8.0-i5po27g2n6zrzxnhxdy2fnpaai7xsdaw
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/zlib-1.2.12-fntvsj6xevbz5gyq7kfa4xg7oxnaolxs
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/diffutils-3.8-k22pe4rhr7yllf5pojl75veh5gkjdglq
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/m4-1.4.19-uadbn2a64h744jto2xqy6u2wmujcww6v
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/ncurses-6.2-frwzsc4jrou7efe7huyzeownqfjvsrfd
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/bzip2-1.0.8-cyn2yamiu26ofxwgxzxbioreuwigzl6f
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/libtool-2.4.7-7fhdrxxizepvvkxrfaaizhzkwx2sjzbt
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/readline-8.1-ls6erxwsj2ubsfzt4x5mblj6nrab5jkp
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gdbm-1.19-xub4jsy5pz5qjf6vooropf2shkigy5pm
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/perl-5.34.1-pn5mteswujdkuong6mbqaush54rdas7c
==> Installing texinfo-6.5-ot5b2akcfzwtenwectaigwxaruyjiu6z
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-texinfo-6.5-ot5b2akcfzwtenwectaigwxaruyjiu6z.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/texinfo-6.5/linux-ubuntu18.04-x86_64-gcc-7.5.0-texinfo-6.5-ot5b2akcfzwtenwectaigwxaruyjiu6z.spack
==> Extracting texinfo-6.5-ot5b2akcfzwtenwectaigwxaruyjiu6z from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/texinfo-6.5-ot5b2akcfzwtenwectaigwxaruyjiu6z
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/autoconf-2.69-hlj3ujmrsu5gs7uhfdotozzg6ipys45b
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/automake-1.16.5-6vk5ehdtjzgcvug6vuwh2mmkjhg2pn2z
==> Installing gmp-6.2.1-lf7yoxuyeqnnrkialyjgl5g6jgfk3i6y
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-gmp-6.2.1-lf7yoxuyeqnnrkialyjgl5g6jgfk3i6y.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/gmp-6.2.1/linux-ubuntu18.04-x86_64-gcc-7.5.0-gmp-6.2.1-lf7yoxuyeqnnrkialyjgl5g6jgfk3i6y.spack
==> Extracting gmp-6.2.1-lf7yoxuyeqnnrkialyjgl5g6jgfk3i6y from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gmp-6.2.1-lf7yoxuyeqnnrkialyjgl5g6jgfk3i6y
==> Installing mpfr-3.1.6-vmql5cb4vcdkgkonkqgzdkryyb5dy7jl
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-mpfr-3.1.6-vmql5cb4vcdkgkonkqgzdkryyb5dy7jl.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/mpfr-3.1.6/linux-ubuntu18.04-x86_64-gcc-7.5.0-mpfr-3.1.6-vmql5cb4vcdkgkonkqgzdkryyb5dy7jl.spack
==> Extracting mpfr-3.1.6-vmql5cb4vcdkgkonkqgzdkryyb5dy7jl from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/mpfr-3.1.6-vmql5cb4vcdkgkonkqgzdkryyb5dy7jl
==> Installing gawk-5.1.1-ejl2btvxakqcim65p4wjs7jmq4enhgcy
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-gawk-5.1.1-ejl2btvxakqcim65p4wjs7jmq4enhgcy.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/gawk-5.1.1/linux-ubuntu18.04-x86_64-gcc-7.5.0-gawk-5.1.1-ejl2btvxakqcim65p4wjs7jmq4enhgcy.spack
==> Extracting gawk-5.1.1-ejl2btvxakqcim65p4wjs7jmq4enhgcy from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gawk-5.1.1-ejl2btvxakqcim65p4wjs7jmq4enhgcy
==> Installing mpc-1.1.0-lmcyfxqrg6f3s4uexhxifsdgcnlg2fn6
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-mpc-1.1.0-lmcyfxqrg6f3s4uexhxifsdgcnlg2fn6.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/mpc-1.1.0/linux-ubuntu18.04-x86_64-gcc-7.5.0-mpc-1.1.0-lmcyfxqrg6f3s4uexhxifsdgcnlg2fn6.spack
==> Extracting mpc-1.1.0-lmcyfxqrg6f3s4uexhxifsdgcnlg2fn6 from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/mpc-1.1.0-lmcyfxqrg6f3s4uexhxifsdgcnlg2fn6
==> Installing gcc-8.4.0-pufwwwg4qlpjsgg6oy5yzk7hpgi5kdkl
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64-gcc-7.5.0-gcc-8.4.0-pufwwwg4qlpjsgg6oy5yzk7hpgi5kdkl.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu18.04-x86_64/gcc-7.5.0/gcc-8.4.0/linux-ubuntu18.04-x86_64-gcc-7.5.0-gcc-8.4.0-pufwwwg4qlpjsgg6oy5yzk7hpgi5kdkl.spack
==> Extracting gcc-8.4.0-pufwwwg4qlpjsgg6oy5yzk7hpgi5kdkl from binary cache
[+] /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gcc-8.4.0-pufwwwg4qlpjsgg6oy5yzk7hpgi5kdkl
$ spack find -p gcc
==> 1 installed package
-- linux-ubuntu18.04-x86_64 / gcc@7.5.0 -------------------------
gcc@8.4.0  /home/spack/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gcc-8.4.0-pufwwwg4qlpjsgg6oy5yzk7hpgi5kdkl

We can add GCC to Spack as an available compiler using the spack compiler add command. This will allow future packages to build with gcc@8.4.0. To avoid having to copy and paste GCC’s path, we can use spack location -i to get the installation prefix.

$ spack compiler add $(spack location -i gcc@8.4.0)
==> Added 1 new compiler to /home/spack/.spack/linux/compilers.yaml
    gcc@8.4.0
==> Compilers are defined in the following files:
    /home/spack/.spack/linux/compilers.yaml

We can also remove compilers from our configuration using spack compiler remove <compiler_spec>

$ spack compiler remove gcc@8.4.0
==> Removed compiler gcc@8.4.0