Tutorial setup
If you have not done the prior sections, you’ll need to start the docker image:
docker run -it ghcr.io/spack/tutorial:pearc25
and then set Spack up like this:
git clone --depth=20 --branch=releases/v0.23 https://github.com/spack/spack
. spack/share/spack/setup-env.sh
spack tutorial -y
spack bootstrap now
spack compiler find
See the Basic Installation Tutorial for full details on setup. For more
help, join us in the #tutorial channel on Slack – get an
invitation at slack.spack.io
Environments Tutorial
So far in this tutorial, we’ve covered the basic commands for managing individual packages:
spack install to install packages
spack uninstall to remove them
spack find to view and query installed packages
Now we’ll explore Spack Environments — a powerful feature that let’s us manage collections of packages together in a documented and reproducible way. Spack environments are similar to virtual environments in other package managers (e.g., Python venv, Conda Environments, or nix-env).
What Makes a Spack Environment?
Spack environments are based around two key files that can be easily shared and reused across different systems:
spack.yaml– The main configuration file where we specify which packages to install, compilers to use, and other Spack settings.spack.lock– A lockfile that captures the complete provenance of your environment, enabling reproduction of software environments.
Why Use Environments?
Managing complex software setups with multiple packages and varying configuration (like different MPI) can quickly become overwhelming. Spack environments solve this by letting you:
Establish standard software requirements for your project(s)
Set up consistent runtime environments for your users
Maintain reproducible development environments
Configure packages for CI/CD pipelines
Share and reproduce builds across different machines
Document your software stack for collaboration
And much more
Goals of this Tutorial
This tutorial will teach you the fundamentals of creating and using Spack environments.
We’ll cover:
Command line basics – Creating and managing environments with Spack commands.
Configuration files – Editing
spack.yamland understandingspack.lock.Environment types – Understanding Spack-managed vs. independent environments.
Reproducible builds – Sharing and recreating environments across systems.
Environment Basics
Let’s look at the output of spack find at this point in the tutorial.
$ spack find
-- linux-ubuntu22.04-x86_64_v3 / clang@14.0.0 -------------------
glibc@2.35 gmake@4.4.1 zlib-ng@2.2.1
-- linux-ubuntu22.04-x86_64_v3 / gcc@10.5.0 ---------------------
gcc-runtime@10.5.0 glibc@2.35 gmake@4.4.1
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
autoconf@2.72 curl@8.10.1 gettext@0.22.5 kokkos@4.3.01 libmd@1.0.4 mpfr@4.2.1 openssl@3.4.0 tar@1.34 yaksa@0.3
autoconf-archive@2023.02.20 diffutils@3.10 glibc@2.35 krb5@1.21.3 libpciaccess@0.17 mpich@4.2.3 perl@5.40.0 tcl@8.6.12 zlib-ng@2.0.7
automake@1.16.5 expat@2.6.4 gmake@4.4.1 libbsd@0.12.2 libsigsegv@2.14 ncurses@6.5 pigz@2.8 tcl@8.6.12 zlib-ng@2.0.7
berkeley-db@18.1.40 findutils@4.9.0 gmp@6.3.0 libedit@3.1-20240808 libtool@2.4.7 nghttp2@1.63.0 pkgconf@2.2.0 texinfo@7.1 zlib-ng@2.2.1
bison@3.8.2 gawk@5.3.1 hdf5@1.14.5 libevent@2.1.12 libxcrypt@4.4.35 numactl@2.0.18 pmix@5.0.3 trilinos@16.0.0 zstd@1.5.6
bzip2@1.0.8 gcc@12.3.0 hdf5@1.14.5 libfabric@1.22.0 libxml2@2.13.4 openblas@0.3.28 python@3.13.0 util-linux-uuid@2.40.2
ca-certificates-mozilla@2023-05-30 gcc-runtime@11.4.0 hdf5@1.14.5 libffi@3.4.6 m4@1.4.19 openmpi@5.0.5 readline@8.2 util-macros@1.20.1
cmake@3.30.5 gdbm@1.23 hwloc@2.11.1 libiconv@1.17 mpc@1.3.1 openssh@9.9p1 sqlite@3.46.0 xz@5.4.6
==> 75 installed packages
This is a complete, but cluttered list of all our installed packages and their dependencies.
It contains packages built with both openmpi and mpich, as well as multiple variants of other packages, like hdf5 and zlib-ng.
The query mechanism we learned about with spack find can help, but it would be nice if we could see only the software that is relevant to our current project instead of seeing everything on the machine.
Creating and Activating Environments
Let’s create a new environment called myproject using the spack env create command:
$ spack env create myproject
==> Created environment myproject in: /home/spack5/spack/var/spack/environments/myproject
==> Activate with: spack env activate myproject
To see all of our environments we’ve created so far we can run spack env list:
$ spack env list
==> 1 environments
myproject
Note
Once we activate an environment it will show up highlighted in green in the list of environments.
Now let’s activate our environment by running the spack env activate command or spacktivate alias:
$ spack env activate myproject
Note
If we use the -p option for spack env activate, Spack
will prepend the environment name to our shell prompt. This is a handy
way to be reminded if and which environment you are in.
Once we activate an environment, spack find will only show what is in the current environment.
For example, because we just created this environment the output below doesn’t show any installed packages.
$ spack find
==> In environment myproject
==> No root specs
==> 0 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
Note
Although Spack doesn’t show all installed software packages when in an active environment, Spack will reuse packages across environments to save disk space and reduce build times.
Additionally the output now tells us that we’re in the myproject environment, so there is no need to panic when we no longer see our previously installed packages.
It also states that there are no root specs.
We’ll get back to what that means later.
While this detailed output is useful, if we only want to check what environment we’re are in, we can use spack env status:
$ spack env status
==> In environment myproject
To now exit out of this environment, we can use spack env deactivate or despacktivate if we’re feeling fancy.
After deactivating, we can see everything installed in this Spack instance:
$ despacktivate # short alias for 'spack env deactivate'
$ spack env status
==> No active environment
$ spack find
-- linux-ubuntu22.04-x86_64_v3 / clang@14.0.0 -------------------
glibc@2.35 gmake@4.4.1 zlib-ng@2.2.1
-- linux-ubuntu22.04-x86_64_v3 / gcc@10.5.0 ---------------------
gcc-runtime@10.5.0 glibc@2.35 gmake@4.4.1
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
autoconf@2.72 curl@8.10.1 gettext@0.22.5 kokkos@4.3.01 libmd@1.0.4 mpfr@4.2.1 openssl@3.4.0 tar@1.34 yaksa@0.3
autoconf-archive@2023.02.20 diffutils@3.10 glibc@2.35 krb5@1.21.3 libpciaccess@0.17 mpich@4.2.3 perl@5.40.0 tcl@8.6.12 zlib-ng@2.0.7
automake@1.16.5 expat@2.6.4 gmake@4.4.1 libbsd@0.12.2 libsigsegv@2.14 ncurses@6.5 pigz@2.8 tcl@8.6.12 zlib-ng@2.0.7
berkeley-db@18.1.40 findutils@4.9.0 gmp@6.3.0 libedit@3.1-20240808 libtool@2.4.7 nghttp2@1.63.0 pkgconf@2.2.0 texinfo@7.1 zlib-ng@2.2.1
bison@3.8.2 gawk@5.3.1 hdf5@1.14.5 libevent@2.1.12 libxcrypt@4.4.35 numactl@2.0.18 pmix@5.0.3 trilinos@16.0.0 zstd@1.5.6
bzip2@1.0.8 gcc@12.3.0 hdf5@1.14.5 libfabric@1.22.0 libxml2@2.13.4 openblas@0.3.28 python@3.13.0 util-linux-uuid@2.40.2
ca-certificates-mozilla@2023-05-30 gcc-runtime@11.4.0 hdf5@1.14.5 libffi@3.4.6 m4@1.4.19 openmpi@5.0.5 readline@8.2 util-macros@1.20.1
cmake@3.30.5 gdbm@1.23 hwloc@2.11.1 libiconv@1.17 mpc@1.3.1 openssh@9.9p1 sqlite@3.46.0 xz@5.4.6
==> 75 installed packages
Installing packages
Now that we understand how creation and activation work, let’s go back to our myproject environment and install a couple of packages, specifically, tcl and trilinos.
Let’s try the usual install commands we learned earlier:
$ spack env activate myproject
$ spack install tcl
==> Error: Cannot install 'tcl' because no matching specs are in the current environment. You can add specs to the environment with 'spack add tcl', or as part of the install command with 'spack install --add tcl'
Environments are special in that we must add specs to the an environment before we can install them. This additional step helps prevent us from accidentally modifying a shared environment when installing new software.
spack add allows us to queue up several specs to be installed together.
Let’s try it:
$ spack add tcl
==> Adding tcl to environment myproject
$ spack add trilinos
==> Adding trilinos to environment myproject
$ spack find
==> In environment myproject
==> 2 root specs
- tcl - trilinos
==> 0 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
Now, tcl and trilinos have been registered as root specs in our environment. Root specs are packages that we’ve explicitly requested to be installed in an environment.
They’re called “roots” because they sit at the top of the dependency graph—when Spack installs these packages, with their respective dependency packages sitting below them.
Now, let’s install:
$ spack install
==> Concretized 2 specs
[+] w4gwr4e tcl@8.6.12%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hshzy76 ^gcc-runtime@11.4.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[e] a7drdl4 ^glibc@2.35%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] srkzfjr ^gmake@4.4.1%gcc@11.4.0~guile build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] fhud6vq ^zlib-ng@2.2.1%gcc@11.4.0+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
- ney6hmm trilinos@16.0.0%gcc@11.4.0~adelus~adios2+amesos+amesos2+anasazi+aztec~basker+belos~boost~chaco~complex~cuda~cuda_constexpr~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~pamgen~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~test~thyra+tpetra~trilinoscouplings~wrapper~x11~zoltan~zoltan2 build_system=cmake build_type=Release cxxstd=17 generator=make gotype=long_long arch=linux-ubuntu22.04-x86_64_v3
[+] d2nwbxl ^cmake@3.30.5%gcc@11.4.0~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release patches=dbc3892 arch=linux-ubuntu22.04-x86_64_v3
[+] fpywomo ^curl@8.10.1%gcc@11.4.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs=shared,static tls=openssl arch=linux-ubuntu22.04-x86_64_v3
[+] t2qkug7 ^nghttp2@1.63.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] lljulvx ^diffutils@3.10%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 5gigqgw ^openssl@3.4.0%gcc@11.4.0~docs+shared build_system=generic certs=mozilla arch=linux-ubuntu22.04-x86_64_v3
[+] t2brqss ^ca-certificates-mozilla@2023-05-30%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] rvg7j6b ^ncurses@6.5%gcc@11.4.0~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=linux-ubuntu22.04-x86_64_v3
[+] fwtuzgp ^hwloc@2.11.1%gcc@11.4.0~cairo~cuda~gl~libudev+libxml2~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] omw5cc4 ^libpciaccess@0.17%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] vdnwjqe ^util-macros@1.20.1%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] wozcmyn ^libxml2@2.13.4%gcc@11.4.0+pic~python+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bsga3no ^libiconv@1.17%gcc@11.4.0 build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] 2fvrfr6 ^xz@5.4.6%gcc@11.4.0~pic build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] oplsmxr ^pkgconf@2.2.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] nxt5zth ^kokkos@4.3.01%gcc@11.4.0~aggressive_vectorization~cmake_lang~compiler_warnings~cuda~debug~debug_bounds_check~debug_dualview_modify_check~deprecated_code~examples~hpx~hpx_async_dispatch~hwloc~ipo~memkind~numactl~openmp~openmptarget~pic~rocm+serial+shared~sycl~tests~threads~tuning~wrapper build_system=cmake build_type=Release cxxstd=17 generator=make intel_gpu_arch=none arch=linux-ubuntu22.04-x86_64_v3
[+] w2fghgh ^openblas@0.3.28%gcc@11.4.0~bignuma~consistent_fpcsr+dynamic_dispatch+fortran~ilp64+locking+pic+shared build_system=makefile patches=d0b9276 symbol_suffix=none threads=none arch=linux-ubuntu22.04-x86_64_v3
[+] jvwxvxe ^openmpi@5.0.5%gcc@11.4.0+atomics~cuda~debug~gpfs~internal-hwloc~internal-libevent~internal-pmix~java~lustre~memchecker~openshmem~romio+rsh~static~two_level_namespace+vt+wrapper-rpath build_system=autotools fabrics=none romio-filesystem=none schedulers=none arch=linux-ubuntu22.04-x86_64_v3
[+] vgucajy ^autoconf@2.72%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] qaspjyq ^m4@1.4.19%gcc@11.4.0+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-ubuntu22.04-x86_64_v3
[+] ea6qziv ^libsigsegv@2.14%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] awgfaon ^automake@1.16.5%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] xbwxobi ^libevent@2.1.12%gcc@11.4.0+openssl build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] tt3byem ^libtool@2.4.7%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 2sbkhch ^findutils@4.9.0%gcc@11.4.0 build_system=autotools patches=440b954 arch=linux-ubuntu22.04-x86_64_v3
[+] euqyy3h ^numactl@2.0.18%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] wz7w27t ^openssh@9.9p1%gcc@11.4.0+gssapi build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] pq3as37 ^krb5@1.21.3%gcc@11.4.0+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] sllhx5n ^bison@3.8.2%gcc@11.4.0~color build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bexdfw2 ^gettext@0.22.5%gcc@11.4.0+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] mmv6i4n ^tar@1.34%gcc@11.4.0 build_system=autotools zip=pigz arch=linux-ubuntu22.04-x86_64_v3
[+] pcwnu2w ^pigz@2.8%gcc@11.4.0 build_system=makefile arch=linux-ubuntu22.04-x86_64_v3
[+] t7h6imj ^zstd@1.5.6%gcc@11.4.0+programs build_system=makefile compression=none libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] nhrbcom ^libedit@3.1-20240808%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] v64tnmr ^libxcrypt@4.4.35%gcc@11.4.0~obsolete_api build_system=autotools patches=4885da3 arch=linux-ubuntu22.04-x86_64_v3
[+] cwpt5ec ^perl@5.40.0%gcc@11.4.0+cpanm+opcode+open+shared+threads build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] cexlioh ^berkeley-db@18.1.40%gcc@11.4.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-ubuntu22.04-x86_64_v3
[+] ewqc7cx ^bzip2@1.0.8%gcc@11.4.0~debug~pic+shared build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] jj2atvs ^gdbm@1.23%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] aylebxv ^readline@8.2%gcc@11.4.0 build_system=autotools patches=bbf97f1 arch=linux-ubuntu22.04-x86_64_v3
[+] 5wqqmsw ^pmix@5.0.3%gcc@11.4.0~munge~python~restful build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libpciaccess-0.17-omw5cc44g5qrphf7aqyjpdpmw2b3tr4i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/xz-5.4.6-2fvrfr67ahyx5vqg6hyd3dachcl3nl2k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.2.1-fhud6vqkh7jaesckalgqg5xxml72in6i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/numactl-2.0.18-euqyy3hu6d7yiuf67q6xgmiwtlgfkanp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiconv-1.17-bsga3novxptycgb4bpv4mldtq3f5m7mj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openblas-0.3.28-w2fghghowf7wdz5fyl6sjqfdp232uksm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxcrypt-4.4.35-v64tnmrjg7o5beyhae6x42vqlcxzdon6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zstd-1.5.6-t7h6imj35ruac562vr7snzvli2h2tzup
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tcl-8.6.12-w4gwr4ezmenbvt7u5zdyjdkfzapsz5lt
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssl-3.4.0-5gigqgwld4jgaxb46pzeavxuicamdgvw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxml2-2.13.4-wozcmyn2bivorr7geiwavaqeosmwmaow
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pigz-2.8-pcwnu2wfae7nfv5isb3kcl7otav2m5zy
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/nghttp2-1.63.0-t2qkug7u7irxunnirgisvdu4mdoerrxt
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/kokkos-4.3.01-nxt5zthcpfy5k52tm7ia2g64avvziltw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ncurses-6.5-rvg7j6bmergf3is4yoacm5sgsi7l4tvm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libevent-2.1.12-xbwxobi4cjizcuch7ukmi4igoosktbma
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tar-1.34-mmv6i4naeg746pk2xpypdpejwvypmegb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/curl-8.10.1-fpywomo74ruadasuelzpvql7zj6rufeo
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hwloc-2.11.1-fwtuzgpmp2dy3udiekh6nwnbcld22kmk
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libedit-3.1-20240808-nhrbcomj5lgnql2itckj7py3hi6wuz5d
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gettext-0.22.5-bexdfw2vfc64r6u72mqestm6olahfr6e
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/cmake-3.30.5-d2nwbxlz2qe2hqu7yy4v6vlgiz6qihwj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pmix-5.0.3-5wqqmswtibbhuilr356mzviq4flzdc3z
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/krb5-1.21.3-pq3as37xnogsfkivav3r6phgtsuwhjlb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssh-9.9p1-wz7w27t54u5lcphpvtwvv43vmhwmqwkn
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea
==> Installing trilinos-16.0.0-ney6hmmpufagz63vykeffmatlnyihzlq [31/31]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-trilinos-16.0.0-ney6hmmpufagz63vykeffmatlnyihzlq.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/trilinos-16.0.0/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-trilinos-16.0.0-ney6hmmpufagz63vykeffmatlnyihzlq.spack
==> Extracting trilinos-16.0.0-ney6hmmpufagz63vykeffmatlnyihzlq from binary cache
==> trilinos: Successfully installed trilinos-16.0.0-ney6hmmpufagz63vykeffmatlnyihzlq
Search: 0.00s. Fetch: 0.17s. Install: 2.70s. Extract: 2.28s. Relocate: 0.16s. Total: 2.88s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/trilinos-16.0.0-ney6hmmpufagz63vykeffmatlnyihzlq
==> Updating view at /home/spack5/spack/var/spack/environments/myproject/.spack-env/view
We can see that Spack reused existing installations of tcl and the dependencies of trilinos that were already present on the system, rather than rebuilding them from scratch.
Additionally, the environment’s view was automatically updated to include the installations. This means all the software in this environment has been added to our PATH, making the installed packages readily accessible from the command line while we have the environment activated.
Let’s now confirm the contents of the environment using spack find:
$ spack find
==> In environment myproject
==> 2 root specs
[+] tcl [+] trilinos
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
autoconf@2.72 cmake@3.30.5 gettext@0.22.5 libedit@3.1-20240808 libxcrypt@4.4.35 openblas@0.3.28 pkgconf@2.2.0 util-macros@1.20.1
automake@1.16.5 curl@8.10.1 glibc@2.35 libevent@2.1.12 libxml2@2.13.4 openmpi@5.0.5 pmix@5.0.3 xz@5.4.6
berkeley-db@18.1.40 diffutils@3.10 gmake@4.4.1 libiconv@1.17 m4@1.4.19 openssh@9.9p1 readline@8.2 zlib-ng@2.2.1
bison@3.8.2 findutils@4.9.0 hwloc@2.11.1 libpciaccess@0.17 ncurses@6.5 openssl@3.4.0 tar@1.34 zstd@1.5.6
bzip2@1.0.8 gcc-runtime@11.4.0 kokkos@4.3.01 libsigsegv@2.14 nghttp2@1.63.0 perl@5.40.0 tcl@8.6.12
ca-certificates-mozilla@2023-05-30 gdbm@1.23 krb5@1.21.3 libtool@2.4.7 numactl@2.0.18 pigz@2.8 trilinos@16.0.0
==> 46 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
We can see that the roots and all their dependencies have been installed.
Using Packages
Spack environments provide a convenient way to use your installed packages by automatically making them available in your shell environment. This is accomplished through a feature called environment views.
An environment view is a directory structure mirroring a standard linux root filesystem with directories like /bin and /usr that contain symbolic links to all the packages installed in your Spack environment.
When you activate an environment with spack env activate, Spack automatically:
Prepends the view’s
bindirectory to yourPATHenvironment variableAdds the view’s
mandirectory to yourMANPATHfor manual pagesUpdates
CMAKE_PREFIX_PATHto include the view’s root directory
This means that executables, libraries, and other files from your environment’s packages become immediately accessible from your command line, just as if they were installed system-wide.
Let’s explore how views work using the tcl package we just installed in our myproject environment. The Tcl package includes a shell-like application called tclsh.
To see the path to tclsh let’s use the which command:
$ which tclsh
/home/spack5/spack/var/spack/environments/myproject/.spack-env/view/bin/tclsh
Notice its path includes the name of our environment and a view subdirectory.
We can now run tclsh just like you would any other program that is in your path:
$ tclsh
% echo "hello world!"
hello world!
% exit
Removing Packages from Environments
One of Spack’s key features is that you can safely remove packages from specific environments without affecting other environments. This works because Spack environments only create links to shared package installations—they don’t contain the actual package files.
Let’s demonstrate this capability by creating a second environment. Imagine we have two projects:
myproject- requirestrilinosmyproject2- previously neededtrilinosbut no longer requires it
Let’s start by creating the myproject2 environment and installing both scr and trilinos:
$ spack env create myproject2
==> Created environment myproject2 in: /home/spack5/spack/var/spack/environments/myproject2
==> Activate with: spack env activate myproject2
$ spack env activate myproject2
$ spack add scr trilinos
==> Adding scr to environment myproject2
==> Adding trilinos to environment myproject2
$ spack install
==> Concretized 2 specs
- inxkq6w scr@2.0.0%gcc@11.4.0+dtcmp~fortran~ipo+libyogrt async_api=NONE build_system=cmake build_type=Release cache_base=/dev/shm cntl_base=/dev/shm copy_config=none file_lock=FLOCK generator=make resource_manager=SLURM scr_config=scr.conf arch=linux-ubuntu22.04-x86_64_v3
[+] d2nwbxl ^cmake@3.30.5%gcc@11.4.0~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release patches=dbc3892 arch=linux-ubuntu22.04-x86_64_v3
[+] fpywomo ^curl@8.10.1%gcc@11.4.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs=shared,static tls=openssl arch=linux-ubuntu22.04-x86_64_v3
[+] t2qkug7 ^nghttp2@1.63.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] lljulvx ^diffutils@3.10%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 5gigqgw ^openssl@3.4.0%gcc@11.4.0~docs+shared build_system=generic certs=mozilla arch=linux-ubuntu22.04-x86_64_v3
[+] t2brqss ^ca-certificates-mozilla@2023-05-30%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] rvg7j6b ^ncurses@6.5%gcc@11.4.0~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=linux-ubuntu22.04-x86_64_v3
- m2vb6sg ^dtcmp@1.1.5%gcc@11.4.0+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
- euguteo ^lwgrp@1.0.6%gcc@11.4.0+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hshzy76 ^gcc-runtime@11.4.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[e] a7drdl4 ^glibc@2.35%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] srkzfjr ^gmake@4.4.1%gcc@11.4.0~guile build_system=generic arch=linux-ubuntu22.04-x86_64_v3
- gswz3l2 ^libyogrt@1.35%gcc@11.4.0~static build_system=autotools scheduler=slurm arch=linux-ubuntu22.04-x86_64_v3
- wtptlf7 ^slurm@23-11-1-1%gcc@11.4.0~cgroup~gtk~hdf5~hwloc~mariadb~nvml~pam~pmix+readline~restd~rsmi build_system=autotools sysconfdir=PREFIX/etc arch=linux-ubuntu22.04-x86_64_v3
- rf4t3xs ^glib@2.78.3%gcc@11.4.0~libmount~strip build_system=meson buildtype=release default_library=shared tracing=none arch=linux-ubuntu22.04-x86_64_v3
- zw2tlkv ^elfutils@0.191%gcc@11.4.0~debuginfod+exeprefix+nls build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] t7h6imj ^zstd@1.5.6%gcc@11.4.0+programs build_system=makefile compression=none libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] bexdfw2 ^gettext@0.22.5%gcc@11.4.0+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] mmv6i4n ^tar@1.34%gcc@11.4.0 build_system=autotools zip=pigz arch=linux-ubuntu22.04-x86_64_v3
[+] pcwnu2w ^pigz@2.8%gcc@11.4.0 build_system=makefile arch=linux-ubuntu22.04-x86_64_v3
[+] ltl5sqy ^libffi@3.4.6%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
- xfqgelb ^meson@1.5.1%gcc@11.4.0 build_system=python_pip patches=0f0b1bd arch=linux-ubuntu22.04-x86_64_v3
- vdyo63u ^py-pip@23.1.2%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
- snvbpkx ^py-setuptools@69.2.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
- pxniiek ^py-wheel@0.41.2%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
- wylyhqn ^python-venv@1.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
- xasrhux ^ninja@1.12.1%gcc@11.4.0+re2c build_system=generic arch=linux-ubuntu22.04-x86_64_v3
- tpzsx34 ^re2c@3.1%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
- pim2bkx ^pcre2@10.44%gcc@11.4.0~jit+multibyte build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
- ct26uvg ^python@3.11.9%gcc@11.4.0+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=13fa8bf,b0615b2,ebdca64,f2fd060 arch=linux-ubuntu22.04-x86_64_v3
[+] hj6jtyr ^expat@2.6.4%gcc@11.4.0+libbsd build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hwya6i6 ^libbsd@0.12.2%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] qcfzttd ^libmd@1.0.4%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] ogdosm6 ^sqlite@3.46.0%gcc@11.4.0+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] xesify5 ^util-linux-uuid@2.40.2%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
- jiezkp3 ^json-c@0.16%gcc@11.4.0~ipo build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-x86_64_v3
- itxj6zz ^lz4@1.10.0%gcc@11.4.0+pic build_system=makefile libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
- 7ccb5fi ^munge@0.5.15%gcc@11.4.0 build_system=autotools localstatedir=PREFIX/var arch=linux-ubuntu22.04-x86_64_v3
- tau3vgr ^libgcrypt@1.11.0%gcc@11.4.0 build_system=autotools patches=4e308ba arch=linux-ubuntu22.04-x86_64_v3
- 3g7e2nw ^libgpg-error@1.50%gcc@11.4.0 build_system=autotools patches=0b2a0ff arch=linux-ubuntu22.04-x86_64_v3
[+] x6mwj3l ^gawk@5.3.1%gcc@11.4.0~nls build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 5webgya ^gmp@6.3.0%gcc@11.4.0+cxx build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] mdfsfjy ^mpfr@4.2.1%gcc@11.4.0 build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] 6s34ic3 ^autoconf-archive@2023.02.20%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] ljsbwjc ^texinfo@7.1%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] aylebxv ^readline@8.2%gcc@11.4.0 build_system=autotools patches=bbf97f1 arch=linux-ubuntu22.04-x86_64_v3
[+] jvwxvxe ^openmpi@5.0.5%gcc@11.4.0+atomics~cuda~debug~gpfs~internal-hwloc~internal-libevent~internal-pmix~java~lustre~memchecker~openshmem~romio+rsh~static~two_level_namespace+vt+wrapper-rpath build_system=autotools fabrics=none romio-filesystem=none schedulers=none arch=linux-ubuntu22.04-x86_64_v3
[+] vgucajy ^autoconf@2.72%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] qaspjyq ^m4@1.4.19%gcc@11.4.0+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-ubuntu22.04-x86_64_v3
[+] ea6qziv ^libsigsegv@2.14%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] awgfaon ^automake@1.16.5%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] xbwxobi ^libevent@2.1.12%gcc@11.4.0+openssl build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] tt3byem ^libtool@2.4.7%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 2sbkhch ^findutils@4.9.0%gcc@11.4.0 build_system=autotools patches=440b954 arch=linux-ubuntu22.04-x86_64_v3
[+] euqyy3h ^numactl@2.0.18%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] wz7w27t ^openssh@9.9p1%gcc@11.4.0+gssapi build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] pq3as37 ^krb5@1.21.3%gcc@11.4.0+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] sllhx5n ^bison@3.8.2%gcc@11.4.0~color build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] nhrbcom ^libedit@3.1-20240808%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] v64tnmr ^libxcrypt@4.4.35%gcc@11.4.0~obsolete_api build_system=autotools patches=4885da3 arch=linux-ubuntu22.04-x86_64_v3
[+] cwpt5ec ^perl@5.40.0%gcc@11.4.0+cpanm+opcode+open+shared+threads build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] cexlioh ^berkeley-db@18.1.40%gcc@11.4.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-ubuntu22.04-x86_64_v3
[+] ewqc7cx ^bzip2@1.0.8%gcc@11.4.0~debug~pic+shared build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] jj2atvs ^gdbm@1.23%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] oplsmxr ^pkgconf@2.2.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 5wqqmsw ^pmix@5.0.3%gcc@11.4.0~munge~python~restful build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
- oe5lfjf ^pdsh@2.31%gcc@11.4.0+ssh+static_modules build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] fhud6vq ^zlib-ng@2.2.1%gcc@11.4.0+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] ney6hmm trilinos@16.0.0%gcc@11.4.0~adelus~adios2+amesos+amesos2+anasazi+aztec~basker+belos~boost~chaco~complex~cuda~cuda_constexpr~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~pamgen~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~test~thyra+tpetra~trilinoscouplings~wrapper~x11~zoltan~zoltan2 build_system=cmake build_type=Release cxxstd=17 generator=make gotype=long_long arch=linux-ubuntu22.04-x86_64_v3
[+] fwtuzgp ^hwloc@2.11.1%gcc@11.4.0~cairo~cuda~gl~libudev+libxml2~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] omw5cc4 ^libpciaccess@0.17%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] vdnwjqe ^util-macros@1.20.1%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] wozcmyn ^libxml2@2.13.4%gcc@11.4.0+pic~python+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bsga3no ^libiconv@1.17%gcc@11.4.0 build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] 2fvrfr6 ^xz@5.4.6%gcc@11.4.0~pic build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] nxt5zth ^kokkos@4.3.01%gcc@11.4.0~aggressive_vectorization~cmake_lang~compiler_warnings~cuda~debug~debug_bounds_check~debug_dualview_modify_check~deprecated_code~examples~hpx~hpx_async_dispatch~hwloc~ipo~memkind~numactl~openmp~openmptarget~pic~rocm+serial+shared~sycl~tests~threads~tuning~wrapper build_system=cmake build_type=Release cxxstd=17 generator=make intel_gpu_arch=none arch=linux-ubuntu22.04-x86_64_v3
[+] w2fghgh ^openblas@0.3.28%gcc@11.4.0~bignuma~consistent_fpcsr+dynamic_dispatch+fortran~ilp64+locking+pic+shared build_system=makefile patches=d0b9276 symbol_suffix=none threads=none arch=linux-ubuntu22.04-x86_64_v3
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiconv-1.17-bsga3novxptycgb4bpv4mldtq3f5m7mj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/util-linux-uuid-2.40.2-xesify5chxevm2nzm4bad4s2jquildlm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxcrypt-4.4.35-v64tnmrjg7o5beyhae6x42vqlcxzdon6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openblas-0.3.28-w2fghghowf7wdz5fyl6sjqfdp232uksm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pkgconf-2.2.0-oplsmxryrcg6ackisqtpszdarzch6a6t
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/kokkos-4.3.01-nxt5zthcpfy5k52tm7ia2g64avvziltw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libmd-1.0.4-qcfzttdxovswz34pjuvrsjnuwsvrbhko
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/berkeley-db-18.1.40-cexliohp6aqckxeq4bqy5wrmxzyrfzqc
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libffi-3.4.6-ltl5sqyu2fuckascuwdlxebbmp3k5spp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libsigsegv-2.14-ea6qziv7obmf5fq3mxy42rhxptoiwfb6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.2.1-fhud6vqkh7jaesckalgqg5xxml72in6i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/numactl-2.0.18-euqyy3hu6d7yiuf67q6xgmiwtlgfkanp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zstd-1.5.6-t7h6imj35ruac562vr7snzvli2h2tzup
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/xz-5.4.6-2fvrfr67ahyx5vqg6hyd3dachcl3nl2k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmp-6.3.0-5webgyazi3rpemdmmhbip4glviaeet2l
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/m4-1.4.19-qaspjyq5yqcso6yatgyhvm7j632ez7md
==> Installing lz4-1.10.0-itxj6zzegxeda6yubljodvd4hob6cdtm [20/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-lz4-1.10.0-itxj6zzegxeda6yubljodvd4hob6cdtm.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/lz4-1.10.0/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-lz4-1.10.0-itxj6zzegxeda6yubljodvd4hob6cdtm.spack
==> Extracting lz4-1.10.0-itxj6zzegxeda6yubljodvd4hob6cdtm from binary cache
==> lz4: Successfully installed lz4-1.10.0-itxj6zzegxeda6yubljodvd4hob6cdtm
Search: 0.00s. Fetch: 0.15s. Install: 0.08s. Extract: 0.05s. Relocate: 0.01s. Total: 0.23s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/lz4-1.10.0-itxj6zzegxeda6yubljodvd4hob6cdtm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pigz-2.8-pcwnu2wfae7nfv5isb3kcl7otav2m5zy
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxml2-2.13.4-wozcmyn2bivorr7geiwavaqeosmwmaow
==> Installing pdsh-2.31-oe5lfjf4gnsqjnlexzihdmmwgpcrp63v [23/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-pdsh-2.31-oe5lfjf4gnsqjnlexzihdmmwgpcrp63v.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pdsh-2.31/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-pdsh-2.31-oe5lfjf4gnsqjnlexzihdmmwgpcrp63v.spack
==> Extracting pdsh-2.31-oe5lfjf4gnsqjnlexzihdmmwgpcrp63v from binary cache
==> pdsh: Successfully installed pdsh-2.31-oe5lfjf4gnsqjnlexzihdmmwgpcrp63v
Search: 0.00s. Fetch: 0.01s. Install: 0.04s. Extract: 0.02s. Relocate: 0.01s. Total: 0.05s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pdsh-2.31-oe5lfjf4gnsqjnlexzihdmmwgpcrp63v
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/nghttp2-1.63.0-t2qkug7u7irxunnirgisvdu4mdoerrxt
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libpciaccess-0.17-omw5cc44g5qrphf7aqyjpdpmw2b3tr4i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ncurses-6.5-rvg7j6bmergf3is4yoacm5sgsi7l4tvm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libbsd-0.12.2-hwya6i63fvxczwxqtfz3ujel55as7dlp
==> Installing pcre2-10.44-pim2bkxw3crhvosv4tk7aqua6crhfq7b [28/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-pcre2-10.44-pim2bkxw3crhvosv4tk7aqua6crhfq7b.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pcre2-10.44/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-pcre2-10.44-pim2bkxw3crhvosv4tk7aqua6crhfq7b.spack
==> Extracting pcre2-10.44-pim2bkxw3crhvosv4tk7aqua6crhfq7b from binary cache
==> pcre2: Successfully installed pcre2-10.44-pim2bkxw3crhvosv4tk7aqua6crhfq7b
Search: 0.00s. Fetch: 0.01s. Install: 0.13s. Extract: 0.10s. Relocate: 0.01s. Total: 0.14s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pcre2-10.44-pim2bkxw3crhvosv4tk7aqua6crhfq7b
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssl-3.4.0-5gigqgwld4jgaxb46pzeavxuicamdgvw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/mpfr-4.2.1-mdfsfjykvyaknc5yzul4l25aip3rugoe
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hwloc-2.11.1-fwtuzgpmp2dy3udiekh6nwnbcld22kmk
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/readline-8.2-aylebxvheua4djgtfzzqi2ialcjt5mw7
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libedit-3.1-20240808-nhrbcomj5lgnql2itckj7py3hi6wuz5d
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/expat-2.6.4-hj6jtyrxtqabnjznbntx6oeclctubpxq
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tar-1.34-mmv6i4naeg746pk2xpypdpejwvypmegb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/curl-8.10.1-fpywomo74ruadasuelzpvql7zj6rufeo
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libevent-2.1.12-xbwxobi4cjizcuch7ukmi4igoosktbma
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/sqlite-3.46.0-ogdosm6dqmim5545dvloiyn5nvydhfra
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gawk-5.3.1-x6mwj3lnzliwyh2vdqgibweodb3xdisw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gdbm-1.23-jj2atvsdprz6qvh2n43326zfxv42iw7n
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gettext-0.22.5-bexdfw2vfc64r6u72mqestm6olahfr6e
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/cmake-3.30.5-d2nwbxlz2qe2hqu7yy4v6vlgiz6qihwj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pmix-5.0.3-5wqqmswtibbhuilr356mzviq4flzdc3z
==> Installing libgpg-error-1.50-3g7e2nweljnohbrxe6msmfsmpgdmfr6t [45/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-libgpg-error-1.50-3g7e2nweljnohbrxe6msmfsmpgdmfr6t.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libgpg-error-1.50/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-libgpg-error-1.50-3g7e2nweljnohbrxe6msmfsmpgdmfr6t.spack
==> Extracting libgpg-error-1.50-3g7e2nweljnohbrxe6msmfsmpgdmfr6t from binary cache
==> libgpg-error: Successfully installed libgpg-error-1.50-3g7e2nweljnohbrxe6msmfsmpgdmfr6t
Search: 0.00s. Fetch: 0.01s. Install: 0.09s. Extract: 0.06s. Relocate: 0.01s. Total: 0.10s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libgpg-error-1.50-3g7e2nweljnohbrxe6msmfsmpgdmfr6t
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/perl-5.40.0-cwpt5ec6gcal6ftcrrxcecnt74fdjfhi
==> Installing python-3.11.9-ct26uvgbvvn4bshuv42rvthvq556gdqh [47/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-python-3.11.9-ct26uvgbvvn4bshuv42rvthvq556gdqh.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/python-3.11.9/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-python-3.11.9-ct26uvgbvvn4bshuv42rvthvq556gdqh.spack
==> Extracting python-3.11.9-ct26uvgbvvn4bshuv42rvthvq556gdqh from binary cache
==> python: Successfully installed python-3.11.9-ct26uvgbvvn4bshuv42rvthvq556gdqh
Search: 0.00s. Fetch: 0.06s. Install: 4.00s. Extract: 3.84s. Relocate: 0.13s. Total: 4.05s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/python-3.11.9-ct26uvgbvvn4bshuv42rvthvq556gdqh
==> Installing elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp [48/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/elfutils-0.191/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp.spack
==> Extracting elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp from binary cache
==> elfutils: Successfully installed elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp
Search: 0.00s. Fetch: 0.01s. Install: 0.46s. Extract: 0.40s. Relocate: 0.05s. Total: 0.48s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/elfutils-0.191-zw2tlkv4255rxzdcnziuyodhjcnk7arp
==> Installing json-c-0.16-jiezkp3kmwhh6f3x5psem5a2pyio3wck [49/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-json-c-0.16-jiezkp3kmwhh6f3x5psem5a2pyio3wck.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/json-c-0.16/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-json-c-0.16-jiezkp3kmwhh6f3x5psem5a2pyio3wck.spack
==> Extracting json-c-0.16-jiezkp3kmwhh6f3x5psem5a2pyio3wck from binary cache
==> json-c: Successfully installed json-c-0.16-jiezkp3kmwhh6f3x5psem5a2pyio3wck
Search: 0.00s. Fetch: 0.01s. Install: 0.05s. Extract: 0.02s. Relocate: 0.01s. Total: 0.05s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/json-c-0.16-jiezkp3kmwhh6f3x5psem5a2pyio3wck
==> Installing libgcrypt-1.11.0-tau3vgrmq6nomkchestprkfzjhju3nsu [50/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-libgcrypt-1.11.0-tau3vgrmq6nomkchestprkfzjhju3nsu.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libgcrypt-1.11.0/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-libgcrypt-1.11.0-tau3vgrmq6nomkchestprkfzjhju3nsu.spack
==> Extracting libgcrypt-1.11.0-tau3vgrmq6nomkchestprkfzjhju3nsu from binary cache
==> libgcrypt: Successfully installed libgcrypt-1.11.0-tau3vgrmq6nomkchestprkfzjhju3nsu
Search: 0.00s. Fetch: 0.01s. Install: 0.14s. Extract: 0.10s. Relocate: 0.02s. Total: 0.15s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libgcrypt-1.11.0-tau3vgrmq6nomkchestprkfzjhju3nsu
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/krb5-1.21.3-pq3as37xnogsfkivav3r6phgtsuwhjlb
==> Installing python-venv-1.0-wylyhqnxcxjffy5u4icu2lmudm4hrsss [52/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-python-venv-1.0-wylyhqnxcxjffy5u4icu2lmudm4hrsss.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/python-venv-1.0/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-python-venv-1.0-wylyhqnxcxjffy5u4icu2lmudm4hrsss.spack
==> Extracting python-venv-1.0-wylyhqnxcxjffy5u4icu2lmudm4hrsss from binary cache
==> python-venv: Successfully installed python-venv-1.0-wylyhqnxcxjffy5u4icu2lmudm4hrsss
Search: 0.00s. Fetch: 0.01s. Install: 0.05s. Extract: 0.02s. Relocate: 0.01s. Total: 0.06s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/python-venv-1.0-wylyhqnxcxjffy5u4icu2lmudm4hrsss
==> Installing re2c-3.1-tpzsx34tj4sjosw7siqewzbminoifjav [53/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-re2c-3.1-tpzsx34tj4sjosw7siqewzbminoifjav.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/re2c-3.1/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-re2c-3.1-tpzsx34tj4sjosw7siqewzbminoifjav.spack
==> Extracting re2c-3.1-tpzsx34tj4sjosw7siqewzbminoifjav from binary cache
==> re2c: Successfully installed re2c-3.1-tpzsx34tj4sjosw7siqewzbminoifjav
Search: 0.00s. Fetch: 0.03s. Install: 1.05s. Extract: 0.98s. Relocate: 0.04s. Total: 1.07s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/re2c-3.1-tpzsx34tj4sjosw7siqewzbminoifjav
==> Installing munge-0.5.15-7ccb5fignqrns53lrl3dz6ziqm7hyc5m [54/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-munge-0.5.15-7ccb5fignqrns53lrl3dz6ziqm7hyc5m.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/munge-0.5.15/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-munge-0.5.15-7ccb5fignqrns53lrl3dz6ziqm7hyc5m.spack
==> Extracting munge-0.5.15-7ccb5fignqrns53lrl3dz6ziqm7hyc5m from binary cache
==> munge: Successfully installed munge-0.5.15-7ccb5fignqrns53lrl3dz6ziqm7hyc5m
Search: 0.00s. Fetch: 0.01s. Install: 0.09s. Extract: 0.04s. Relocate: 0.03s. Total: 0.09s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/munge-0.5.15-7ccb5fignqrns53lrl3dz6ziqm7hyc5m
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssh-9.9p1-wz7w27t54u5lcphpvtwvv43vmhwmqwkn
==> Installing py-pip-23.1.2-vdyo63uzwknhomqcbgfdytdhe2ds732w [56/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-py-pip-23.1.2-vdyo63uzwknhomqcbgfdytdhe2ds732w.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/py-pip-23.1.2/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-py-pip-23.1.2-vdyo63uzwknhomqcbgfdytdhe2ds732w.spack
==> Extracting py-pip-23.1.2-vdyo63uzwknhomqcbgfdytdhe2ds732w from binary cache
==> py-pip: Successfully installed py-pip-23.1.2-vdyo63uzwknhomqcbgfdytdhe2ds732w
Search: 0.00s. Fetch: 0.01s. Install: 0.35s. Extract: 0.31s. Relocate: 0.01s. Total: 0.36s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/py-pip-23.1.2-vdyo63uzwknhomqcbgfdytdhe2ds732w
==> Installing ninja-1.12.1-xasrhuxnm5qcir2bibkxianyjy5u2nsg [57/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-ninja-1.12.1-xasrhuxnm5qcir2bibkxianyjy5u2nsg.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ninja-1.12.1/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-ninja-1.12.1-xasrhuxnm5qcir2bibkxianyjy5u2nsg.spack
==> Extracting ninja-1.12.1-xasrhuxnm5qcir2bibkxianyjy5u2nsg from binary cache
==> ninja: Successfully installed ninja-1.12.1-xasrhuxnm5qcir2bibkxianyjy5u2nsg
Search: 0.00s. Fetch: 0.01s. Install: 0.15s. Extract: 0.12s. Relocate: 0.01s. Total: 0.16s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ninja-1.12.1-xasrhuxnm5qcir2bibkxianyjy5u2nsg
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea
==> Installing py-wheel-0.41.2-pxniiekemguif5f6l4rto4yl6hu237qv [59/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-py-wheel-0.41.2-pxniiekemguif5f6l4rto4yl6hu237qv.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/py-wheel-0.41.2/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-py-wheel-0.41.2-pxniiekemguif5f6l4rto4yl6hu237qv.spack
==> Extracting py-wheel-0.41.2-pxniiekemguif5f6l4rto4yl6hu237qv from binary cache
==> py-wheel: Successfully installed py-wheel-0.41.2-pxniiekemguif5f6l4rto4yl6hu237qv
Search: 0.00s. Fetch: 0.01s. Install: 0.07s. Extract: 0.03s. Relocate: 0.01s. Total: 0.08s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/py-wheel-0.41.2-pxniiekemguif5f6l4rto4yl6hu237qv
==> Installing py-setuptools-69.2.0-snvbpkxkqt7t5lm5v3ykjqsc2euviifh [60/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-py-setuptools-69.2.0-snvbpkxkqt7t5lm5v3ykjqsc2euviifh.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/py-setuptools-69.2.0/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-py-setuptools-69.2.0-snvbpkxkqt7t5lm5v3ykjqsc2euviifh.spack
==> Extracting py-setuptools-69.2.0-snvbpkxkqt7t5lm5v3ykjqsc2euviifh from binary cache
==> py-setuptools: Successfully installed py-setuptools-69.2.0-snvbpkxkqt7t5lm5v3ykjqsc2euviifh
Search: 0.00s. Fetch: 0.01s. Install: 0.19s. Extract: 0.16s. Relocate: 0.01s. Total: 0.20s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/py-setuptools-69.2.0-snvbpkxkqt7t5lm5v3ykjqsc2euviifh
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/trilinos-16.0.0-ney6hmmpufagz63vykeffmatlnyihzlq
==> Installing lwgrp-1.0.6-euguteoau5dys5gkjnqt6xkapmnahy3h [62/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-lwgrp-1.0.6-euguteoau5dys5gkjnqt6xkapmnahy3h.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/lwgrp-1.0.6/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-lwgrp-1.0.6-euguteoau5dys5gkjnqt6xkapmnahy3h.spack
==> Extracting lwgrp-1.0.6-euguteoau5dys5gkjnqt6xkapmnahy3h from binary cache
==> lwgrp: Successfully installed lwgrp-1.0.6-euguteoau5dys5gkjnqt6xkapmnahy3h
Search: 0.00s. Fetch: 0.01s. Install: 0.09s. Extract: 0.03s. Relocate: 0.04s. Total: 0.10s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/lwgrp-1.0.6-euguteoau5dys5gkjnqt6xkapmnahy3h
==> Installing meson-1.5.1-xfqgelb63rgn5qtglxgonozj364k3lvy [63/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-meson-1.5.1-xfqgelb63rgn5qtglxgonozj364k3lvy.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/meson-1.5.1/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-meson-1.5.1-xfqgelb63rgn5qtglxgonozj364k3lvy.spack
==> Extracting meson-1.5.1-xfqgelb63rgn5qtglxgonozj364k3lvy from binary cache
==> meson: Successfully installed meson-1.5.1-xfqgelb63rgn5qtglxgonozj364k3lvy
Search: 0.00s. Fetch: 0.01s. Install: 0.23s. Extract: 0.18s. Relocate: 0.02s. Total: 0.23s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/meson-1.5.1-xfqgelb63rgn5qtglxgonozj364k3lvy
==> Installing dtcmp-1.1.5-m2vb6sgvtvkulfbrqs52ghtwsoy5b3nd [64/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-dtcmp-1.1.5-m2vb6sgvtvkulfbrqs52ghtwsoy5b3nd.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/dtcmp-1.1.5/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-dtcmp-1.1.5-m2vb6sgvtvkulfbrqs52ghtwsoy5b3nd.spack
==> Extracting dtcmp-1.1.5-m2vb6sgvtvkulfbrqs52ghtwsoy5b3nd from binary cache
==> dtcmp: Successfully installed dtcmp-1.1.5-m2vb6sgvtvkulfbrqs52ghtwsoy5b3nd
Search: 0.00s. Fetch: 0.01s. Install: 0.10s. Extract: 0.04s. Relocate: 0.04s. Total: 0.11s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/dtcmp-1.1.5-m2vb6sgvtvkulfbrqs52ghtwsoy5b3nd
==> Installing glib-2.78.3-rf4t3xsioshh3nqvngwx3ph3e2cttmjt [65/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-glib-2.78.3-rf4t3xsioshh3nqvngwx3ph3e2cttmjt.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/glib-2.78.3/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-glib-2.78.3-rf4t3xsioshh3nqvngwx3ph3e2cttmjt.spack
==> Extracting glib-2.78.3-rf4t3xsioshh3nqvngwx3ph3e2cttmjt from binary cache
==> glib: Successfully installed glib-2.78.3-rf4t3xsioshh3nqvngwx3ph3e2cttmjt
Search: 0.00s. Fetch: 0.01s. Install: 0.40s. Extract: 0.31s. Relocate: 0.06s. Total: 0.41s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/glib-2.78.3-rf4t3xsioshh3nqvngwx3ph3e2cttmjt
==> Installing slurm-23-11-1-1-wtptlf72didakpcie467xfagizdvzhrg [66/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-slurm-23-11-1-1-wtptlf72didakpcie467xfagizdvzhrg.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/slurm-23-11-1-1/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-slurm-23-11-1-1-wtptlf72didakpcie467xfagizdvzhrg.spack
==> Extracting slurm-23-11-1-1-wtptlf72didakpcie467xfagizdvzhrg from binary cache
==> slurm: Successfully installed slurm-23-11-1-1-wtptlf72didakpcie467xfagizdvzhrg
Search: 0.00s. Fetch: 0.07s. Install: 3.97s. Extract: 3.79s. Relocate: 0.15s. Total: 4.04s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/slurm-23-11-1-1-wtptlf72didakpcie467xfagizdvzhrg
==> Installing libyogrt-1.35-gswz3l2d2quizqqrd7oiivqbammmupt7 [67/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-libyogrt-1.35-gswz3l2d2quizqqrd7oiivqbammmupt7.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libyogrt-1.35/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-libyogrt-1.35-gswz3l2d2quizqqrd7oiivqbammmupt7.spack
==> Extracting libyogrt-1.35-gswz3l2d2quizqqrd7oiivqbammmupt7 from binary cache
==> libyogrt: Successfully installed libyogrt-1.35-gswz3l2d2quizqqrd7oiivqbammmupt7
Search: 0.00s. Fetch: 0.01s. Install: 0.13s. Extract: 0.03s. Relocate: 0.06s. Total: 0.14s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libyogrt-1.35-gswz3l2d2quizqqrd7oiivqbammmupt7
==> Installing scr-2.0.0-inxkq6ww6nxt7t6wtv5tjfhrdwfnzf2w [68/68]
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-scr-2.0.0-inxkq6ww6nxt7t6wtv5tjfhrdwfnzf2w.spec.json.sig
==> Fetching file:///mirror/build_cache/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/scr-2.0.0/linux-ubuntu22.04-x86_64_v3-gcc-11.4.0-scr-2.0.0-inxkq6ww6nxt7t6wtv5tjfhrdwfnzf2w.spack
==> Extracting scr-2.0.0-inxkq6ww6nxt7t6wtv5tjfhrdwfnzf2w from binary cache
==> scr: Successfully installed scr-2.0.0-inxkq6ww6nxt7t6wtv5tjfhrdwfnzf2w
Search: 0.00s. Fetch: 0.01s. Install: 0.22s. Extract: 0.08s. Relocate: 0.11s. Total: 0.23s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/scr-2.0.0-inxkq6ww6nxt7t6wtv5tjfhrdwfnzf2w
==> Updating view at /home/spack5/spack/var/spack/environments/myproject2/.spack-env/view
$ spack find
==> In environment myproject2
==> 2 root specs
[+] scr [+] trilinos
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
autoconf@2.72 dtcmp@1.1.5 gmake@4.4.1 libgcrypt@1.11.0 lwgrp@1.0.6 openblas@0.3.28 py-pip@23.1.2 tar@1.34
autoconf-archive@2023.02.20 elfutils@0.191 gmp@6.3.0 libgpg-error@1.50 lz4@1.10.0 openmpi@5.0.5 py-setuptools@69.2.0 texinfo@7.1
automake@1.16.5 expat@2.6.4 hwloc@2.11.1 libiconv@1.17 m4@1.4.19 openssh@9.9p1 py-wheel@0.41.2 trilinos@16.0.0
berkeley-db@18.1.40 findutils@4.9.0 json-c@0.16 libmd@1.0.4 meson@1.5.1 openssl@3.4.0 python@3.11.9 util-linux-uuid@2.40.2
bison@3.8.2 gawk@5.3.1 kokkos@4.3.01 libpciaccess@0.17 mpfr@4.2.1 pcre2@10.44 python-venv@1.0 util-macros@1.20.1
bzip2@1.0.8 gcc-runtime@11.4.0 krb5@1.21.3 libsigsegv@2.14 munge@0.5.15 pdsh@2.31 re2c@3.1 xz@5.4.6
ca-certificates-mozilla@2023-05-30 gdbm@1.23 libbsd@0.12.2 libtool@2.4.7 ncurses@6.5 perl@5.40.0 readline@8.2 zlib-ng@2.2.1
cmake@3.30.5 gettext@0.22.5 libedit@3.1-20240808 libxcrypt@4.4.35 nghttp2@1.63.0 pigz@2.8 scr@2.0.0 zstd@1.5.6
curl@8.10.1 glib@2.78.3 libevent@2.1.12 libxml2@2.13.4 ninja@1.12.1 pkgconf@2.2.0 slurm@23-11-1-1
diffutils@3.10 glibc@2.35 libffi@3.4.6 libyogrt@1.35 numactl@2.0.18 pmix@5.0.3 sqlite@3.46.0
==> 78 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
Now we have two environments with different package combinations:
The
myprojectenvironment containstclandtrilinosThe
myproject2environment containsscrandtrilinos
Now let’s attempt to uninstall trilinos from myproject2 and examine what happens:
$ spack uninstall -y trilinos
==> Refusing to uninstall the following specs
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
ney6hmm trilinos@16.0.0
==> The following environments still reference these specs:
myproject
==> Error: There are still dependents.
use `spack remove` to remove the spec from the current environment
use `spack env remove` to remove environments
use `spack uninstall --force` to override
$ spack find
==> In environment myproject2
==> 2 root specs
[+] scr [+] trilinos
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
autoconf@2.72 dtcmp@1.1.5 gmake@4.4.1 libgcrypt@1.11.0 lwgrp@1.0.6 openblas@0.3.28 py-pip@23.1.2 tar@1.34
autoconf-archive@2023.02.20 elfutils@0.191 gmp@6.3.0 libgpg-error@1.50 lz4@1.10.0 openmpi@5.0.5 py-setuptools@69.2.0 texinfo@7.1
automake@1.16.5 expat@2.6.4 hwloc@2.11.1 libiconv@1.17 m4@1.4.19 openssh@9.9p1 py-wheel@0.41.2 trilinos@16.0.0
berkeley-db@18.1.40 findutils@4.9.0 json-c@0.16 libmd@1.0.4 meson@1.5.1 openssl@3.4.0 python@3.11.9 util-linux-uuid@2.40.2
bison@3.8.2 gawk@5.3.1 kokkos@4.3.01 libpciaccess@0.17 mpfr@4.2.1 pcre2@10.44 python-venv@1.0 util-macros@1.20.1
bzip2@1.0.8 gcc-runtime@11.4.0 krb5@1.21.3 libsigsegv@2.14 munge@0.5.15 pdsh@2.31 re2c@3.1 xz@5.4.6
ca-certificates-mozilla@2023-05-30 gdbm@1.23 libbsd@0.12.2 libtool@2.4.7 ncurses@6.5 perl@5.40.0 readline@8.2 zlib-ng@2.2.1
cmake@3.30.5 gettext@0.22.5 libedit@3.1-20240808 libxcrypt@4.4.35 nghttp2@1.63.0 pigz@2.8 scr@2.0.0 zstd@1.5.6
curl@8.10.1 glib@2.78.3 libevent@2.1.12 libxml2@2.13.4 ninja@1.12.1 pkgconf@2.2.0 slurm@23-11-1-1
diffutils@3.10 glibc@2.35 libffi@3.4.6 libyogrt@1.35 numactl@2.0.18 pmix@5.0.3 sqlite@3.46.0
==> 78 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
Notice that trilinos won’t be uninstalled because it’s still referenced in myproject. This safety feature prevents accidental removal of packages that other environments depend on.
Instead, if we want to remove trilinos from the myproject2 environment (without affecting it in other environments), we need to use spack remove:
$ spack remove trilinos
==> trilinos has been removed from /home/spack5/spack/var/spack/environments/myproject2/spack.yaml
$ spack find
==> In environment myproject2
==> 1 root specs
[+] scr
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
autoconf@2.72 dtcmp@1.1.5 gmake@4.4.1 libgcrypt@1.11.0 lwgrp@1.0.6 openblas@0.3.28 py-pip@23.1.2 tar@1.34
autoconf-archive@2023.02.20 elfutils@0.191 gmp@6.3.0 libgpg-error@1.50 lz4@1.10.0 openmpi@5.0.5 py-setuptools@69.2.0 texinfo@7.1
automake@1.16.5 expat@2.6.4 hwloc@2.11.1 libiconv@1.17 m4@1.4.19 openssh@9.9p1 py-wheel@0.41.2 trilinos@16.0.0
berkeley-db@18.1.40 findutils@4.9.0 json-c@0.16 libmd@1.0.4 meson@1.5.1 openssl@3.4.0 python@3.11.9 util-linux-uuid@2.40.2
bison@3.8.2 gawk@5.3.1 kokkos@4.3.01 libpciaccess@0.17 mpfr@4.2.1 pcre2@10.44 python-venv@1.0 util-macros@1.20.1
bzip2@1.0.8 gcc-runtime@11.4.0 krb5@1.21.3 libsigsegv@2.14 munge@0.5.15 pdsh@2.31 re2c@3.1 xz@5.4.6
ca-certificates-mozilla@2023-05-30 gdbm@1.23 libbsd@0.12.2 libtool@2.4.7 ncurses@6.5 perl@5.40.0 readline@8.2 zlib-ng@2.2.1
cmake@3.30.5 gettext@0.22.5 libedit@3.1-20240808 libxcrypt@4.4.35 nghttp2@1.63.0 pigz@2.8 scr@2.0.0 zstd@1.5.6
curl@8.10.1 glib@2.78.3 libevent@2.1.12 libxml2@2.13.4 ninja@1.12.1 pkgconf@2.2.0 slurm@23-11-1-1
diffutils@3.10 glibc@2.35 libffi@3.4.6 libyogrt@1.35 numactl@2.0.18 pmix@5.0.3 sqlite@3.46.0
==> 78 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
$ spack concretize
==> No new specs to concretize.
==> Updating view at /home/spack5/spack/var/spack/environments/myproject2/.spack-env/view
$ spack find
==> In environment myproject2
==> 1 root specs
[+] scr
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
autoconf@2.72 dtcmp@1.1.5 gmake@4.4.1 libgpg-error@1.50 lz4@1.10.0 openssh@9.9p1 py-wheel@0.41.2 util-linux-uuid@2.40.2
autoconf-archive@2023.02.20 elfutils@0.191 gmp@6.3.0 libiconv@1.17 m4@1.4.19 openssl@3.4.0 python@3.11.9 util-macros@1.20.1
automake@1.16.5 expat@2.6.4 hwloc@2.11.1 libmd@1.0.4 meson@1.5.1 pcre2@10.44 python-venv@1.0 xz@5.4.6
berkeley-db@18.1.40 findutils@4.9.0 json-c@0.16 libpciaccess@0.17 mpfr@4.2.1 pdsh@2.31 re2c@3.1 zlib-ng@2.2.1
bison@3.8.2 gawk@5.3.1 krb5@1.21.3 libsigsegv@2.14 munge@0.5.15 perl@5.40.0 readline@8.2 zstd@1.5.6
bzip2@1.0.8 gcc-runtime@11.4.0 libbsd@0.12.2 libtool@2.4.7 ncurses@6.5 pigz@2.8 scr@2.0.0
ca-certificates-mozilla@2023-05-30 gdbm@1.23 libedit@3.1-20240808 libxcrypt@4.4.35 nghttp2@1.63.0 pkgconf@2.2.0 slurm@23-11-1-1
cmake@3.30.5 gettext@0.22.5 libevent@2.1.12 libxml2@2.13.4 ninja@1.12.1 pmix@5.0.3 sqlite@3.46.0
curl@8.10.1 glib@2.78.3 libffi@3.4.6 libyogrt@1.35 numactl@2.0.18 py-pip@23.1.2 tar@1.34
diffutils@3.10 glibc@2.35 libgcrypt@1.11.0 lwgrp@1.0.6 openmpi@5.0.5 py-setuptools@69.2.0 texinfo@7.1
==> 75 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
After running spack remove we’ll see that trilinos is no longer a root but is still present in the installed specs.
Reconcretizing the environment, we’ll see the vestigial trilinos and its dependencies will be pruned and will no longer be listed in the environment at all.
We know trilinos is still needed for the myproject environment, so let’s switch back to that environment to confirm that it is still installed.
$ spack env activate myproject
$ spack find
==> In environment myproject
==> 2 root specs
[+] tcl [+] trilinos
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
autoconf@2.72 cmake@3.30.5 gettext@0.22.5 libedit@3.1-20240808 libxcrypt@4.4.35 openblas@0.3.28 pkgconf@2.2.0 util-macros@1.20.1
automake@1.16.5 curl@8.10.1 glibc@2.35 libevent@2.1.12 libxml2@2.13.4 openmpi@5.0.5 pmix@5.0.3 xz@5.4.6
berkeley-db@18.1.40 diffutils@3.10 gmake@4.4.1 libiconv@1.17 m4@1.4.19 openssh@9.9p1 readline@8.2 zlib-ng@2.2.1
bison@3.8.2 findutils@4.9.0 hwloc@2.11.1 libpciaccess@0.17 ncurses@6.5 openssl@3.4.0 tar@1.34 zstd@1.5.6
bzip2@1.0.8 gcc-runtime@11.4.0 kokkos@4.3.01 libsigsegv@2.14 nghttp2@1.63.0 perl@5.40.0 tcl@8.6.12
ca-certificates-mozilla@2023-05-30 gdbm@1.23 krb5@1.21.3 libtool@2.4.7 numactl@2.0.18 pigz@2.8 trilinos@16.0.0
==> 46 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
Phew!
We can see that myproject still has trilinos as a root spec.
Note
You can also uninstall a package and remove it from the environment
in one go with spack uninstall --remove trilinos.
The spack.yaml file
An environment is more than just a list of root specs — it includes configuration settings that control how Spack behaves when the environment it activated.
So far, myproject relies on configuration defaults, but these can be overridden to customize our environment’s behavior.
In this section, we’ll learn how to enforce that all the packages in our environment depending on mpi build with mpich by modifying our configuration.
We can customize the selection of the mpi provider using concretization preferences to change the behavior of the concretizer.
Let’s start by examining our environment’s configuration using spack config get:
$ spack config get
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
# add package specs to the `specs` list
specs:
- tcl
- trilinos
view: true
concretizer:
unify: true
reuse: true
targets:
# Determine whether we want to target specific or generic
# microarchitectures. Valid values are: "microarchitectures" or "generic".
# An example of "microarchitectures" would be "skylake" or "bulldozer",
# while an example of "generic" would be "aarch64" or "x86_64_v4".
granularity: microarchitectures
# If "false" allow targets that are incompatible with the current host (for
# instance concretize with target "icelake" while running on "haswell").
# If "true" only allow targets that are compatible with the host.
host_compatible: true
# When "true" concretize root specs of environments together, so that each unique
# package in an environment corresponds to one concrete spec. This ensures
# environments can always be activated. When "false" perform concretization separately
# on each root spec, allowing different versions and variants of the same package in
# an environment.
duplicates:
# "none": allows a single node for any package in the DAG.
# "minimal": allows the duplication of 'build-tools' nodes only
# (e.g. py-setuptools, cmake etc.)
# "full" (experimental): allows separation of the entire build-tool stack (e.g. the entire "cmake" subDAG)
strategy: minimal
# Option to specify compatibility between operating systems for reuse of compilers and packages
# Specified as a key: [list] where the key is the os that is being targeted, and the list contains the OS's
# it can reuse. Note this is a directional compatibility so mutual compatibility between two OS's
# requires two entries i.e. os_compatible: {sonoma: [monterey], monterey: [sonoma]}
os_compatible: {}
splice:
explicit: []
automatic: false
compilers:
- compiler:
spec: gcc@=10.5.0
paths:
cc: /usr/bin/gcc-10
cxx: /usr/bin/g++-10
f77: /usr/bin/gfortran-10
fc: /usr/bin/gfortran-10
flags: {}
operating_system: ubuntu22.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@=11.4.0
paths:
cc: /usr/bin/gcc
cxx: /usr/bin/g++
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
flags: {}
operating_system: ubuntu22.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: clang@=14.0.0
paths:
cc: /usr/bin/clang
cxx: /usr/bin/clang++
f77: null
fc: null
flags: {}
operating_system: ubuntu22.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
definitions: {}
develop: {}
mirrors:
tutorial: file:///mirror
spack-public:
binary: false
url: https://mirror.spack.io
repos:
- $spack/var/spack/repos/builtin
packages:
all:
target: [x86_64_v3]
compiler: [gcc, clang, oneapi, xl, nag, fj, aocc]
providers:
awk: [gawk]
armci: [armcimpi]
blas: [openblas, amdblis]
c: [gcc]
cxx: [gcc]
D: [ldc]
daal: [intel-oneapi-daal]
elf: [elfutils]
fftw-api: [fftw, amdfftw]
flame: [libflame, amdlibflame]
fortran: [gcc]
fortran-rt: [gcc-runtime, intel-oneapi-runtime]
fuse: [libfuse]
gl: [glx, osmesa]
glu: [mesa-glu, openglu]
golang: [go, gcc]
go-or-gccgo-bootstrap: [go-bootstrap, gcc]
iconv: [libiconv]
ipp: [intel-oneapi-ipp]
java: [openjdk, jdk, ibm-java]
jpeg: [libjpeg-turbo, libjpeg]
lapack: [openblas, amdlibflame]
libc: [glibc, musl]
libgfortran: [gcc-runtime]
libglx: [mesa+glx]
libifcore: [intel-oneapi-runtime]
libllvm: [llvm]
lua-lang: [lua, lua-luajit-openresty, lua-luajit]
luajit: [lua-luajit-openresty, lua-luajit]
mariadb-client: [mariadb-c-client, mariadb]
mkl: [intel-oneapi-mkl]
mpe: [mpe2]
mpi: [openmpi, mpich]
mysql-client: [mysql, mariadb-c-client]
opencl: [pocl]
onedal: [intel-oneapi-dal]
pbs: [openpbs, torque]
pil: [py-pillow]
pkgconfig: [pkgconf, pkg-config]
qmake: [qt-base, qt]
rpc: [libtirpc]
scalapack: [netlib-scalapack, amdscalapack]
sycl: [hipsycl]
szip: [libaec, libszip]
tbb: [intel-tbb]
unwind: [libunwind]
uuid: [util-linux-uuid, libuuid]
wasi-sdk: [wasi-sdk-prebuilt]
xxd: [xxd-standalone, vim]
yacc: [bison, byacc]
ziglang: [zig]
zlib-api: [zlib-ng+compat, zlib]
permissions:
read: world
write: user
cray-mpich:
buildable: false
cray-mvapich2:
buildable: false
fujitsu-mpi:
buildable: false
hpcx-mpi:
buildable: false
spectrum-mpi:
buildable: false
modules:
prefix_inspections:
./bin:
- PATH
./man:
- MANPATH
./share/man:
- MANPATH
./share/aclocal:
- ACLOCAL_PATH
./lib/pkgconfig:
- PKG_CONFIG_PATH
./lib64/pkgconfig:
- PKG_CONFIG_PATH
./share/pkgconfig:
- PKG_CONFIG_PATH
./:
- CMAKE_PREFIX_PATH
# These are configurations for the module set named "default"
default:
# Where to install modules
roots:
tcl: $spack/share/spack/modules
lmod: $spack/share/spack/lmod
# What type of modules to use ("tcl" and/or "lmod")
enable: []
tcl:
all:
autoload: direct
# Default configurations if lmod is enabled
lmod:
all:
autoload: direct
hierarchy:
- mpi
config:
suppress_gpg_warnings: true
deprecated: true
install_tree:
root: $spack/opt/spack
projections:
all: '{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'
# install_tree can include an optional padded length (int or boolean)
# default is False (do not pad)
# if padded_length is True, Spack will pad as close to the system max path
# length as possible
# if padded_length is an integer, Spack will pad to that many characters,
# assuming it is higher than the length of the install_tree root.
# padded_length: 128
# Locations where templates should be found
template_dirs:
- $spack/share/spack/templates
# Directory where licenses should be located
license_dir: $spack/etc/spack/licenses
build_stage:
- $tempdir/$user/spack-stage
- $user_cache_path/stage
test_stage: $user_cache_path/test
source_cache: $spack/var/spack/cache
misc_cache: $user_cache_path/cache
connect_timeout: 10
verify_ssl: true
ssl_certs: $SSL_CERT_FILE
checksum: true
dirty: false
build_language: C
locks: true
url_fetch_method: urllib
ccache: false
db_lock_timeout: 60
package_lock_timeout: null
shared_linking:
# Spack automatically embeds runtime search paths in ELF binaries for their
# dependencies. Their type can either be "rpath" or "runpath". For glibc, rpath is
# inherited and has precedence over LD_LIBRARY_PATH; runpath is not inherited
# and of lower precedence. DO NOT MIX these within the same install tree.
type: rpath
# (Experimental) Embed absolute paths of dependent libraries directly in ELF
# binaries to avoid runtime search. This can improve startup time of
# executables with many dependencies, in particular on slow filesystems.
bind: false
# Set to 'false' to allow installation on filesystems that doesn't allow setgid bit
# manipulation by unprivileged user (e.g. AFS)
allow_sgid: true
install_status: true
binary_index_ttl: 600
flags:
# Whether to keep -Werror flags active in package builds.
keep_werror: none
# A mapping of aliases that can be used to define new commands. For instance,
# `sp: spec -I` will define a new command `sp` that will execute `spec` with
# the `-I` argument. Aliases cannot override existing commands.
aliases:
concretise: concretize
containerise: containerize
rm: remove
debug: false
build_jobs: 16
upstreams: {}
bootstrap:
enable: true
root: $user_cache_path/bootstrap
sources:
- name: github-actions-v0.6
metadata: $spack/share/spack/bootstrap/github-actions-v0.6
- name: github-actions-v0.5
metadata: $spack/share/spack/bootstrap/github-actions-v0.5
- name: spack-install
metadata: $spack/share/spack/bootstrap/spack-install
trusted:
# By default we trust bootstrapping from sources and from binaries
# produced on Github via the workflow
github-actions-v0.6: true
github-actions-v0.5: true
spack-install: true
ci: {}
cdash: {}
The output shows the special spack.yaml configuration file that Spack uses to store environment configurations.
There are several important parts of this file:
specs:The list of package specs to install in the environment.view:Controls whether the environment generates a view (the directory tree with symlinks to installed packages we discussed earlier).concretizer:unify:Determines how package specs in the environment are concretized together to reduce duplicated dependencies when possible.
The specs list should look familiar — these are the package specs we’ve been modifying previously with spack add and spack install.
The concretizer:unify:true setting controls how Spack resolves dependencies across packages specs in an environment:
true(default): specs are concretized together, ensuring there is only one version of each package in the environment.false: specs are concretized independently from each other, potentially allowing multiple versions of the package to appear in the environment twice.when_possible: A middle ground — Spack attempts to unify dependencies as possible but will backoff to allow duplicates when root specs require incompatible versions of dependencies.
Editing environment configuration
Note
Before proceeding, make sure your EDITOR environment variable
is set to the path of your preferred text editor.
Let’s edit spack.yaml to require mpich as our mpi provider using spack config edit.
You should now have the above file open in your editor.
Change it to include the packages:mpi:require entry below:
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
packages:
mpi:
require: [mpich]
# add package specs to the `specs` list
specs:
- tcl
- trilinos
Note
We introduce this here to show you how environment configuration can affect concretization. Configuration options are covered in much more detail in the configuration tutorial.
We’ve only scratched the surface here by requiring a specific mpi provider for packages depending on mpi.
There are many other customizations you can make to an environment.
Refer to the links at the end of this section for more information.
Re-concretizing the environment
You may need to re-install packages in the environment after making significant changes to the configuration, such as changing virtual providers. This can be accomplished by forcing Spack to re-concretize the environment and re-install the specs.
For example, the packages installed in our myproject environment are now out of sync with our new configuration since we already installed part of the environment with openmpi.
Suppose we want to install everything in myproject with mpich.
Let’s run spack concretize --force (or -f in short) to make Spack re-concretize all the environment’s specs:
$ spack concretize --force
==> Concretized 2 specs:
[+] w4gwr4e tcl@8.6.12%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hshzy76 ^gcc-runtime@11.4.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[e] a7drdl4 ^glibc@2.35%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] srkzfjr ^gmake@4.4.1%gcc@11.4.0~guile build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] fhud6vq ^zlib-ng@2.2.1%gcc@11.4.0+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 63sfm7p trilinos@16.0.0%gcc@11.4.0~adelus~adios2+amesos+amesos2+anasazi+aztec~basker+belos~boost~chaco~complex~cuda~cuda_constexpr~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~pamgen~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~test~thyra+tpetra~trilinoscouplings~wrapper~x11~zoltan~zoltan2 build_system=cmake build_type=Release cxxstd=17 generator=make gotype=long_long arch=linux-ubuntu22.04-x86_64_v3
[+] d2nwbxl ^cmake@3.30.5%gcc@11.4.0~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release patches=dbc3892 arch=linux-ubuntu22.04-x86_64_v3
[+] fpywomo ^curl@8.10.1%gcc@11.4.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs=shared,static tls=openssl arch=linux-ubuntu22.04-x86_64_v3
[+] t2qkug7 ^nghttp2@1.63.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] lljulvx ^diffutils@3.10%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 5gigqgw ^openssl@3.4.0%gcc@11.4.0~docs+shared build_system=generic certs=mozilla arch=linux-ubuntu22.04-x86_64_v3
[+] t2brqss ^ca-certificates-mozilla@2023-05-30%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] cwpt5ec ^perl@5.40.0%gcc@11.4.0+cpanm+opcode+open+shared+threads build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] cexlioh ^berkeley-db@18.1.40%gcc@11.4.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-ubuntu22.04-x86_64_v3
[+] rvg7j6b ^ncurses@6.5%gcc@11.4.0~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=linux-ubuntu22.04-x86_64_v3
[+] tgtmflo ^hdf5@1.14.5%gcc@11.4.0~cxx~fortran+hl~ipo~java~map+mpi+shared~subfiling~szip~threadsafe+tools api=default build_system=cmake build_type=Release generator=make arch=linux-ubuntu22.04-x86_64_v3
[+] oplsmxr ^pkgconf@2.2.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] fwtuzgp ^hwloc@2.11.1%gcc@11.4.0~cairo~cuda~gl~libudev+libxml2~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] omw5cc4 ^libpciaccess@0.17%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] vdnwjqe ^util-macros@1.20.1%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] wozcmyn ^libxml2@2.13.4%gcc@11.4.0+pic~python+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bsga3no ^libiconv@1.17%gcc@11.4.0 build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] 2fvrfr6 ^xz@5.4.6%gcc@11.4.0~pic build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] nxt5zth ^kokkos@4.3.01%gcc@11.4.0~aggressive_vectorization~cmake_lang~compiler_warnings~cuda~debug~debug_bounds_check~debug_dualview_modify_check~deprecated_code~examples~hpx~hpx_async_dispatch~hwloc~ipo~memkind~numactl~openmp~openmptarget~pic~rocm+serial+shared~sycl~tests~threads~tuning~wrapper build_system=cmake build_type=Release cxxstd=17 generator=make intel_gpu_arch=none arch=linux-ubuntu22.04-x86_64_v3
[+] cqazuix ^mpich@4.2.3%gcc@11.4.0~argobots~cuda+fortran+hwloc+hydra+libxml2+pci~rocm+romio~slurm~vci~verbs+wrapperrpath~xpmem build_system=autotools datatype-engine=auto device=ch4 netmod=ofi pmi=default arch=linux-ubuntu22.04-x86_64_v3
[+] 2sbkhch ^findutils@4.9.0%gcc@11.4.0 build_system=autotools patches=440b954 arch=linux-ubuntu22.04-x86_64_v3
[+] lr77ky6 ^libfabric@1.22.0%gcc@11.4.0~cuda~debug~kdreg~uring build_system=autotools fabrics=sockets,tcp,udp arch=linux-ubuntu22.04-x86_64_v3
[+] eogugqp ^yaksa@0.3%gcc@11.4.0~cuda~rocm build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] vgucajy ^autoconf@2.72%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] awgfaon ^automake@1.16.5%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] tt3byem ^libtool@2.4.7%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] qaspjyq ^m4@1.4.19%gcc@11.4.0+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-ubuntu22.04-x86_64_v3
[+] ea6qziv ^libsigsegv@2.14%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] gfyestl ^python@3.13.0%gcc@11.4.0+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] ewqc7cx ^bzip2@1.0.8%gcc@11.4.0~debug~pic+shared build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] hj6jtyr ^expat@2.6.4%gcc@11.4.0+libbsd build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hwya6i6 ^libbsd@0.12.2%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] qcfzttd ^libmd@1.0.4%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] jj2atvs ^gdbm@1.23%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bexdfw2 ^gettext@0.22.5%gcc@11.4.0+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] mmv6i4n ^tar@1.34%gcc@11.4.0 build_system=autotools zip=pigz arch=linux-ubuntu22.04-x86_64_v3
[+] pcwnu2w ^pigz@2.8%gcc@11.4.0 build_system=makefile arch=linux-ubuntu22.04-x86_64_v3
[+] t7h6imj ^zstd@1.5.6%gcc@11.4.0+programs build_system=makefile compression=none libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] ltl5sqy ^libffi@3.4.6%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] aylebxv ^readline@8.2%gcc@11.4.0 build_system=autotools patches=bbf97f1 arch=linux-ubuntu22.04-x86_64_v3
[+] ogdosm6 ^sqlite@3.46.0%gcc@11.4.0+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] xesify5 ^util-linux-uuid@2.40.2%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] w2fghgh ^openblas@0.3.28%gcc@11.4.0~bignuma~consistent_fpcsr+dynamic_dispatch+fortran~ilp64+locking+pic+shared build_system=makefile patches=d0b9276 symbol_suffix=none threads=none arch=linux-ubuntu22.04-x86_64_v3
==> Updating view at /home/spack5/spack/var/spack/environments/myproject/.spack-env/view
All the specs are now concrete and ready to be installed with mpich as the MPI implementation.
Creating an environment incrementally
We can also add and install specs to an environment incrementally. For example:
$ spack install --add python
$ spack install --add py-numpy@1.20
If we create environments incrementally, Spack ensures that already installed roots are not re-concretized. So, adding specs to an environment at a later point in time will not cause existing packages to rebuild.
Adding and installing specs incrementally leads to greedy concretization, meaning that the environment may have different package versions compared to an environment created all at once.
When you first install python in an environment, Spack will pick a recent version.
If you then add py-numpy, it may be in conflict with the python version already installed, and fail to concretize:
$ spack env activate --temp
==> Created and activated temporary environment in /tmp/spack-kufc132l
$ spack install --add python
==> Concretized 1 spec
[+] gfyestl python@3.13.0%gcc@11.4.0+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] ewqc7cx ^bzip2@1.0.8%gcc@11.4.0~debug~pic+shared build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] lljulvx ^diffutils@3.10%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hj6jtyr ^expat@2.6.4%gcc@11.4.0+libbsd build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hwya6i6 ^libbsd@0.12.2%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] qcfzttd ^libmd@1.0.4%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hshzy76 ^gcc-runtime@11.4.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] jj2atvs ^gdbm@1.23%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bexdfw2 ^gettext@0.22.5%gcc@11.4.0+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bsga3no ^libiconv@1.17%gcc@11.4.0 build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] wozcmyn ^libxml2@2.13.4%gcc@11.4.0+pic~python+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] mmv6i4n ^tar@1.34%gcc@11.4.0 build_system=autotools zip=pigz arch=linux-ubuntu22.04-x86_64_v3
[+] pcwnu2w ^pigz@2.8%gcc@11.4.0 build_system=makefile arch=linux-ubuntu22.04-x86_64_v3
[+] t7h6imj ^zstd@1.5.6%gcc@11.4.0+programs build_system=makefile compression=none libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[e] a7drdl4 ^glibc@2.35%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] srkzfjr ^gmake@4.4.1%gcc@11.4.0~guile build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] ltl5sqy ^libffi@3.4.6%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] rvg7j6b ^ncurses@6.5%gcc@11.4.0~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=linux-ubuntu22.04-x86_64_v3
[+] 5gigqgw ^openssl@3.4.0%gcc@11.4.0~docs+shared build_system=generic certs=mozilla arch=linux-ubuntu22.04-x86_64_v3
[+] t2brqss ^ca-certificates-mozilla@2023-05-30%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] cwpt5ec ^perl@5.40.0%gcc@11.4.0+cpanm+opcode+open+shared+threads build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] cexlioh ^berkeley-db@18.1.40%gcc@11.4.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-ubuntu22.04-x86_64_v3
[+] oplsmxr ^pkgconf@2.2.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] aylebxv ^readline@8.2%gcc@11.4.0 build_system=autotools patches=bbf97f1 arch=linux-ubuntu22.04-x86_64_v3
[+] ogdosm6 ^sqlite@3.46.0%gcc@11.4.0+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] xesify5 ^util-linux-uuid@2.40.2%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 2fvrfr6 ^xz@5.4.6%gcc@11.4.0~pic build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] fhud6vq ^zlib-ng@2.2.1%gcc@11.4.0+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.2.1-fhud6vqkh7jaesckalgqg5xxml72in6i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/xz-5.4.6-2fvrfr67ahyx5vqg6hyd3dachcl3nl2k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zstd-1.5.6-t7h6imj35ruac562vr7snzvli2h2tzup
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libffi-3.4.6-ltl5sqyu2fuckascuwdlxebbmp3k5spp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/util-linux-uuid-2.40.2-xesify5chxevm2nzm4bad4s2jquildlm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiconv-1.17-bsga3novxptycgb4bpv4mldtq3f5m7mj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libmd-1.0.4-qcfzttdxovswz34pjuvrsjnuwsvrbhko
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ncurses-6.5-rvg7j6bmergf3is4yoacm5sgsi7l4tvm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssl-3.4.0-5gigqgwld4jgaxb46pzeavxuicamdgvw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pigz-2.8-pcwnu2wfae7nfv5isb3kcl7otav2m5zy
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxml2-2.13.4-wozcmyn2bivorr7geiwavaqeosmwmaow
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libbsd-0.12.2-hwya6i63fvxczwxqtfz3ujel55as7dlp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/readline-8.2-aylebxvheua4djgtfzzqi2ialcjt5mw7
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tar-1.34-mmv6i4naeg746pk2xpypdpejwvypmegb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/expat-2.6.4-hj6jtyrxtqabnjznbntx6oeclctubpxq
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gdbm-1.23-jj2atvsdprz6qvh2n43326zfxv42iw7n
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/sqlite-3.46.0-ogdosm6dqmim5545dvloiyn5nvydhfra
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gettext-0.22.5-bexdfw2vfc64r6u72mqestm6olahfr6e
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/python-3.13.0-gfyestlsaoooymkt6udvyevswwc3hrpl
==> Updating view at /tmp/spack-erj1_zeh/.spack-env/view
$ spack install --add py-numpy@1.20 2>&1 | tail -n1
internal_error("version weights must exist and be unique"). Couldn't concretize without changing the existing environment. If you are ok with changing it, try `spack concretize --force`. You could consider setting `concretizer:unify` to `when_possible` or `false` to allow multiple versions of some packages.
The solution is to re-concretize the environment as a whole, which causes python to downgrade to a version compatible with py-numpy:
$ spack add py-numpy@1.20
==> Adding py-numpy@1.20 to environment /tmp/spack-erj1_zeh
$ spack concretize -f
==> Concretized 2 specs:
- trzjx3y py-numpy@1.20.3%gcc@11.4.0 build_system=python_pip patches=802970a,873745d arch=linux-ubuntu22.04-x86_64_v3
[+] hshzy76 ^gcc-runtime@11.4.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[e] a7drdl4 ^glibc@2.35%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] w2fghgh ^openblas@0.3.28%gcc@11.4.0~bignuma~consistent_fpcsr+dynamic_dispatch+fortran~ilp64+locking+pic+shared build_system=makefile patches=d0b9276 symbol_suffix=none threads=none arch=linux-ubuntu22.04-x86_64_v3
- 74oq24s ^py-cython@0.29.36%gcc@11.4.0 build_system=python_pip patches=c4369ad arch=linux-ubuntu22.04-x86_64_v3
- f3hhm2y ^py-pip@23.1.2%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
- rgbcgyy ^py-setuptools@59.4.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
- br5f7g4 ^py-wheel@0.41.2%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
- 4kkbu2p ^python-venv@1.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
- bthrvz2 python@3.9.19%gcc@11.4.0+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=0d98e93,4c24573,ebdca64,f2fd060 arch=linux-ubuntu22.04-x86_64_v3
[+] ewqc7cx ^bzip2@1.0.8%gcc@11.4.0~debug~pic+shared build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] lljulvx ^diffutils@3.10%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hj6jtyr ^expat@2.6.4%gcc@11.4.0+libbsd build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hwya6i6 ^libbsd@0.12.2%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] qcfzttd ^libmd@1.0.4%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] jj2atvs ^gdbm@1.23%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bexdfw2 ^gettext@0.22.5%gcc@11.4.0+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bsga3no ^libiconv@1.17%gcc@11.4.0 build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] wozcmyn ^libxml2@2.13.4%gcc@11.4.0+pic~python+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] mmv6i4n ^tar@1.34%gcc@11.4.0 build_system=autotools zip=pigz arch=linux-ubuntu22.04-x86_64_v3
[+] pcwnu2w ^pigz@2.8%gcc@11.4.0 build_system=makefile arch=linux-ubuntu22.04-x86_64_v3
[+] t7h6imj ^zstd@1.5.6%gcc@11.4.0+programs build_system=makefile compression=none libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] srkzfjr ^gmake@4.4.1%gcc@11.4.0~guile build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] ltl5sqy ^libffi@3.4.6%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] v64tnmr ^libxcrypt@4.4.35%gcc@11.4.0~obsolete_api build_system=autotools patches=4885da3 arch=linux-ubuntu22.04-x86_64_v3
[+] cwpt5ec ^perl@5.40.0%gcc@11.4.0+cpanm+opcode+open+shared+threads build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] cexlioh ^berkeley-db@18.1.40%gcc@11.4.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-ubuntu22.04-x86_64_v3
[+] rvg7j6b ^ncurses@6.5%gcc@11.4.0~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=linux-ubuntu22.04-x86_64_v3
[+] 5gigqgw ^openssl@3.4.0%gcc@11.4.0~docs+shared build_system=generic certs=mozilla arch=linux-ubuntu22.04-x86_64_v3
[+] t2brqss ^ca-certificates-mozilla@2023-05-30%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] oplsmxr ^pkgconf@2.2.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] aylebxv ^readline@8.2%gcc@11.4.0 build_system=autotools patches=bbf97f1 arch=linux-ubuntu22.04-x86_64_v3
[+] ogdosm6 ^sqlite@3.46.0%gcc@11.4.0+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] xesify5 ^util-linux-uuid@2.40.2%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 2fvrfr6 ^xz@5.4.6%gcc@11.4.0~pic build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] fhud6vq ^zlib-ng@2.2.1%gcc@11.4.0+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
==> Updating view at /tmp/spack-erj1_zeh/.spack-env/view
Note
There are other advantages to concretizing and installing an environment all at once:
If you have a number of specs that can be installed together, adding them first and installing them together enables them to share dependencies and reduces total installation time.
You can launch all builds in parallel by taking advantage of Spack’s install-level build parallelism.
Building in environments
Activated environments allow you to invoke any programs installed in them as if they were installed on the system. In this section, we will take advantage of that feature.
Suppose you want to compile some MPI programs.
We have an MPI implementation installed in our myproject2 environment, so mpicc is available in our path.
We can confirm this using which:
$ spack env activate myproject2
$ spack env status
==> In environment myproject2
$ which mpicc
/home/spack5/spack/var/spack/environments/myproject2/.spack-env/view/bin/mpicc
As mentioned before, activating the environment sets a number of environment variables.
That includes variables like PATH, MANPATH, and CMAKE_PREFIX_PATH, which allows you to easily find package executables and libraries installed in the environment.
Let’s look specifically at path-related environment variables using env | grep PATH:
$ env | grep PATH=
PKG_CONFIG_PATH=/home/spack5/spack/var/spack/environments/myproject2/.spack-env/view/lib/pkgconfig:/home/spack5/spack/var/spack/environments/myproject2/.spack-env/view/lib64/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig:/home/spack5/spack/var/spack/environments/myproject2/.spack-env/view/share/pkgconfig:.
MANPATH=/home/spack5/spack/var/spack/environments/myproject2/.spack-env/view/share/man:/home/spack5/spack/var/spack/environments/myproject2/.spack-env/view/man:/usr/share/man:.:
CMAKE_PREFIX_PATH=/home/spack5/spack/var/spack/environments/myproject2/.spack-env/view:.
ACLOCAL_PATH=/home/spack5/spack/var/spack/environments/myproject2/.spack-env/view/share/aclocal:/usr/share/aclocal:.
LD_LIBRARY_PATH=.
PATH=/home/spack5/spack/var/spack/environments/myproject2/.spack-env/view/bin:/home/spack5/spack/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
We can demonstrate use of these environment settings by building a really simple MPI program.
Let’s create a program called mpi-hello.c that contains the following code:
#include <stdio.h>
#include <mpi.h>
#include <zlib.h>
int main(int argc, char **argv) {
int rank;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
printf("Hello world from rank %d\n", rank);
if (rank == 0) {
printf("zlib version: %s\n", ZLIB_VERSION);
printf("zlib-ng version: %s\n", ZLIBNG_VERSION);
}
MPI_Finalize();
}
This program includes headers from mpi and zlib.
It also prints out a message from each MPI rank and the version of zlib.
Let’s build and run our program:
$ mpicc ./mpi-hello.c -I$(spack location -i zlib-ng)/include
$ mpirun -n 2 ./a.out
Hello world from rank 0
zlib version: 1.3.1.zlib-ng
zlib-ng version: 2.2.1
Hello world from rank 1
Notice that we only needed to pass the include path to the compiler.
We also see that Hello world is output for each of the ranks and the version of zlib used to build the program is printed.
We can confirm the version of zlib used to build the program is in our environment using spack find:
$ spack find zlib-ng
==> In environment myproject2
==> 1 root specs
[+] scr
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
zlib-ng@2.2.1
==> 1 installed package
==> 0 concretized packages to be installed (show with `spack find -c`)
Note that the reported version does match that of our installation.
Reproducing builds
Spack environments provide users with virtual environments similar to Python venv and Conda environments). The goal is to ensure packages in one environment are kept separate from those of another. These environments can be managed by Spack or independent. In either case, their environment files can be used to reproduce builds by other users and on other machines. Since those files are key to reproducing builds, let’s start with them.
Environment files
There are two key files tracking the contents of environments: spack.yaml and spack.lock.
The spack.yaml file holds the environment configuration that we previously edited through spack config edit.
The spack.lock file is automatically generated during concretization.
The two files represent two fundamental concepts:
spack.yaml: abstract specs and configuration to install; andspack.lock: all fully concrete specs.
These files are intended to be used by developers and administrators to manage the environments in a reproducible way. We will cover their reuse later.
Note
Both environment files can be versioned in repositories, shared, and used to install the same set of software by different users and on other machines.
Managed versus independent environments
Environments are either Spack-managed or independent. Both types of environments are defined by their environment files. So far, we have only created managed environments. This section describes their differences.
Managed environments are created using spack env create <name>.
They are automatically created in the var/spack/environments subdirectory and can be referenced by their names.
Independent environments can be created in one of two ways.
First, the Spack environment file(s) can be placed in any directory (other than var/spack/environments).
Alternatively, you can use spack env create -d <directory> to specify the directory (<directory>) in which the files should reside.
Independent environments are not named.
Reviewing a managed environment
We created the myproject environment earlier using spack env create myproject so let’s mainly focus on its environment files in this section.
Earlier, when we changed the environment’s configuration using spack config edit, we were actually editing its spack.yaml file.
We can move to the directory containing the file using spack cd:
$ spack cd -e myproject
$ pwd
/home/spack5/spack/var/spack/environments/myproject
$ ls
spack.lock spack.yaml
Notice that myproject is a subdirectory of var/spack/environments within the Spack installation making it a managed environment.
Consequently, it can be referenced by name.
It will also show up when running spack env list:
$ spack env list
==> 2 environments
myproject myproject2
which indicates the active environment by highlighting it in green.
We can also see from the listing above that the current environment directory contains both of the environment files: spack.yaml and spack.lock.
This is because spack.lock was generated when we concretized the environment.
If we cat the spack.yaml file, we’ll see the same specs and view options previously shown by spack config get:
$ cat spack.yaml
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
# add package specs to the `specs` list
specs:
- tcl
- trilinos
view: true
concretizer:
unify: true
packages:
mpi:
require: [mpich]
Creating an independent environment
Environments do not have to be created in or managed by a Spack instance. Rather, their environment files can be placed in any directory. This feature can be quite helpful for use cases such as environment-based software releases and CI/CD.
Let’s create an independent environment from scratch for a simple project:
$ cd
$ mkdir code
$ cd code
$ spack env create -d .
==> Created independent environment in: /home/spack5/code
==> Activate with: spack env activate .
Notice that the command shows Spack created the environment, updated the view, and printed the command needed to activate it. As we can see in the activation command, since the environment is independent, it must be referenced by its directory path.
Let’s see what really happened with this command by listing the directory contents and looking at the configuration file:
$ ls
spack.yaml
$ cat spack.yaml
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
# add package specs to the `specs` list
specs: []
view: true
concretizer:
unify: true
Notice that Spack created a spack.yaml file in the code directory.
Also note that the configuration file has an empty spec list (i.e., []).
That list is intended to contain only the root specs of the environment.
We can confirm that it is not a managed environment by running spack env list:
$ spack env list
==> 2 environments
myproject myproject2
and noting that the path does not appear in the output.
Now let’s add some specs to the environment.
Suppose your project depends on trilinos and openmpi.
Add these packages to the spec list using your favorite text editor.
The dash syntax for a YAML list is used in our example.
Your package should now contain the following entries:
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
# add package specs to the `specs` list
specs:
- trilinos
- openmpi
view: true
concretizer:
unify: true
Now activate the environment and install the packages:
$ spack env activate .
$ spack install
==> Concretized 2 specs
[+] jvwxvxe openmpi@5.0.5%gcc@11.4.0+atomics~cuda~debug~gpfs~internal-hwloc~internal-libevent~internal-pmix~java~lustre~memchecker~openshmem~romio+rsh~static~two_level_namespace+vt+wrapper-rpath build_system=autotools fabrics=none romio-filesystem=none schedulers=none arch=linux-ubuntu22.04-x86_64_v3
[+] vgucajy ^autoconf@2.72%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] qaspjyq ^m4@1.4.19%gcc@11.4.0+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-ubuntu22.04-x86_64_v3
[+] lljulvx ^diffutils@3.10%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] ea6qziv ^libsigsegv@2.14%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] awgfaon ^automake@1.16.5%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] hshzy76 ^gcc-runtime@11.4.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[e] a7drdl4 ^glibc@2.35%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] srkzfjr ^gmake@4.4.1%gcc@11.4.0~guile build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] fwtuzgp ^hwloc@2.11.1%gcc@11.4.0~cairo~cuda~gl~libudev+libxml2~nvml~oneapi-level-zero~opencl+pci~rocm build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] omw5cc4 ^libpciaccess@0.17%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] vdnwjqe ^util-macros@1.20.1%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] wozcmyn ^libxml2@2.13.4%gcc@11.4.0+pic~python+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bsga3no ^libiconv@1.17%gcc@11.4.0 build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] 2fvrfr6 ^xz@5.4.6%gcc@11.4.0~pic build_system=autotools libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] rvg7j6b ^ncurses@6.5%gcc@11.4.0~symlinks+termlib abi=none build_system=autotools patches=7a351bc arch=linux-ubuntu22.04-x86_64_v3
[+] xbwxobi ^libevent@2.1.12%gcc@11.4.0+openssl build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 5gigqgw ^openssl@3.4.0%gcc@11.4.0~docs+shared build_system=generic certs=mozilla arch=linux-ubuntu22.04-x86_64_v3
[+] t2brqss ^ca-certificates-mozilla@2023-05-30%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] tt3byem ^libtool@2.4.7%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 2sbkhch ^findutils@4.9.0%gcc@11.4.0 build_system=autotools patches=440b954 arch=linux-ubuntu22.04-x86_64_v3
[+] euqyy3h ^numactl@2.0.18%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] wz7w27t ^openssh@9.9p1%gcc@11.4.0+gssapi build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] pq3as37 ^krb5@1.21.3%gcc@11.4.0+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] sllhx5n ^bison@3.8.2%gcc@11.4.0~color build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] bexdfw2 ^gettext@0.22.5%gcc@11.4.0+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] mmv6i4n ^tar@1.34%gcc@11.4.0 build_system=autotools zip=pigz arch=linux-ubuntu22.04-x86_64_v3
[+] pcwnu2w ^pigz@2.8%gcc@11.4.0 build_system=makefile arch=linux-ubuntu22.04-x86_64_v3
[+] t7h6imj ^zstd@1.5.6%gcc@11.4.0+programs build_system=makefile compression=none libs=shared,static arch=linux-ubuntu22.04-x86_64_v3
[+] nhrbcom ^libedit@3.1-20240808%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] v64tnmr ^libxcrypt@4.4.35%gcc@11.4.0~obsolete_api build_system=autotools patches=4885da3 arch=linux-ubuntu22.04-x86_64_v3
[+] cwpt5ec ^perl@5.40.0%gcc@11.4.0+cpanm+opcode+open+shared+threads build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] cexlioh ^berkeley-db@18.1.40%gcc@11.4.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-ubuntu22.04-x86_64_v3
[+] ewqc7cx ^bzip2@1.0.8%gcc@11.4.0~debug~pic+shared build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[+] jj2atvs ^gdbm@1.23%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] aylebxv ^readline@8.2%gcc@11.4.0 build_system=autotools patches=bbf97f1 arch=linux-ubuntu22.04-x86_64_v3
[+] oplsmxr ^pkgconf@2.2.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] 5wqqmsw ^pmix@5.0.3%gcc@11.4.0~munge~python~restful build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] fhud6vq ^zlib-ng@2.2.1%gcc@11.4.0+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] ney6hmm trilinos@16.0.0%gcc@11.4.0~adelus~adios2+amesos+amesos2+anasazi+aztec~basker+belos~boost~chaco~complex~cuda~cuda_constexpr~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~pamgen~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~test~thyra+tpetra~trilinoscouplings~wrapper~x11~zoltan~zoltan2 build_system=cmake build_type=Release cxxstd=17 generator=make gotype=long_long arch=linux-ubuntu22.04-x86_64_v3
[+] d2nwbxl ^cmake@3.30.5%gcc@11.4.0~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release patches=dbc3892 arch=linux-ubuntu22.04-x86_64_v3
[+] fpywomo ^curl@8.10.1%gcc@11.4.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs=shared,static tls=openssl arch=linux-ubuntu22.04-x86_64_v3
[+] t2qkug7 ^nghttp2@1.63.0%gcc@11.4.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[+] nxt5zth ^kokkos@4.3.01%gcc@11.4.0~aggressive_vectorization~cmake_lang~compiler_warnings~cuda~debug~debug_bounds_check~debug_dualview_modify_check~deprecated_code~examples~hpx~hpx_async_dispatch~hwloc~ipo~memkind~numactl~openmp~openmptarget~pic~rocm+serial+shared~sycl~tests~threads~tuning~wrapper build_system=cmake build_type=Release cxxstd=17 generator=make intel_gpu_arch=none arch=linux-ubuntu22.04-x86_64_v3
[+] w2fghgh ^openblas@0.3.28%gcc@11.4.0~bignuma~consistent_fpcsr+dynamic_dispatch+fortran~ilp64+locking+pic+shared build_system=makefile patches=d0b9276 symbol_suffix=none threads=none arch=linux-ubuntu22.04-x86_64_v3
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/numactl-2.0.18-euqyy3hu6d7yiuf67q6xgmiwtlgfkanp
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libpciaccess-0.17-omw5cc44g5qrphf7aqyjpdpmw2b3tr4i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openblas-0.3.28-w2fghghowf7wdz5fyl6sjqfdp232uksm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.2.1-fhud6vqkh7jaesckalgqg5xxml72in6i
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/xz-5.4.6-2fvrfr67ahyx5vqg6hyd3dachcl3nl2k
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxcrypt-4.4.35-v64tnmrjg7o5beyhae6x42vqlcxzdon6
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/kokkos-4.3.01-nxt5zthcpfy5k52tm7ia2g64avvziltw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/ncurses-6.5-rvg7j6bmergf3is4yoacm5sgsi7l4tvm
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zstd-1.5.6-t7h6imj35ruac562vr7snzvli2h2tzup
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libiconv-1.17-bsga3novxptycgb4bpv4mldtq3f5m7mj
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/bzip2-1.0.8-ewqc7cx44b63asa742p2asywp2k6rfto
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pigz-2.8-pcwnu2wfae7nfv5isb3kcl7otav2m5zy
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssl-3.4.0-5gigqgwld4jgaxb46pzeavxuicamdgvw
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libedit-3.1-20240808-nhrbcomj5lgnql2itckj7py3hi6wuz5d
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libxml2-2.13.4-wozcmyn2bivorr7geiwavaqeosmwmaow
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tar-1.34-mmv6i4naeg746pk2xpypdpejwvypmegb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/libevent-2.1.12-xbwxobi4cjizcuch7ukmi4igoosktbma
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hwloc-2.11.1-fwtuzgpmp2dy3udiekh6nwnbcld22kmk
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gettext-0.22.5-bexdfw2vfc64r6u72mqestm6olahfr6e
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/pmix-5.0.3-5wqqmswtibbhuilr356mzviq4flzdc3z
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/krb5-1.21.3-pq3as37xnogsfkivav3r6phgtsuwhjlb
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openssh-9.9p1-wz7w27t54u5lcphpvtwvv43vmhwmqwkn
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/openmpi-5.0.5-jvwxvxe7dgexcutl2wtjaibbrnpys3ea
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/trilinos-16.0.0-ney6hmmpufagz63vykeffmatlnyihzlq
==> Updating view at /home/spack5/code/.spack-env/view
Notice that Spack concretized the specs before installing them and their dependencies. It also updated the environment’s view. Since we already installed all these packages outside of the environment, their links were simply added to it.
Updating an installed environment
Spack supports tweaking an environment even after the initial specs are installed. You are free to add and remove specs just as you would outside of the environment using the command line interface as before.
For example, let’s add hdf5 and look at our file:
$ spack add hdf5@5.5.1
==> Adding hdf5@5.5.1 to environment /home/spack5/code
$ cat spack.yaml
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
# add package specs to the `specs` list
specs:
- trilinos
- openmpi
- hdf5@5.5.1
view: true
concretizer:
unify: true
Notice that spack add added the package to our active environment and it appears in the configuration file’s spec list.
Note
You’ll need to run spack install to install added packages
in your environment because spack add only adds it to the
configuration.
Now use spack remove to remove the spec from the configuration:
$ spack remove hdf5
==> hdf5 has been removed from /home/spack5/code/spack.yaml
$ cat spack.yaml
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
# add package specs to the `specs` list
specs:
- trilinos
- openmpi
view: true
concretizer:
unify: true
and we see that the spec was removed from the spec list of our environment.
Note
You can also edit the spack.yaml file directly instead of
using the spack add and spack remove commands.
Reviewing spack.lock
Now let’s turn our attention from the abstract to the concrete.
Our focus so far has been on the abstract environment configuration represented by the spack.yaml file.
Once that file is concretized, Spack generates a corresponding spack.lock file representing the full concretized state of the environment.
This file is intended to be a machine-readable representation of the information needed to reproduce the build of an environment.
As such, it is written in json, which is less readable than yaml.
Let’s look at the top 30 lines of our current environment:
$ jq < spack.lock | head -30
{
"_meta": {
"file-type": "spack-lockfile",
"lockfile-version": 5,
"specfile-version": 4
},
"spack": {
"version": "0.23.0",
"type": "git",
"commit": "c6d4037758140fe15913c29e80cd1547f388ae51"
},
"roots": [
{
"hash": "ney6hmmpufagz63vykeffmatlnyihzlq",
"spec": "trilinos"
},
{
"hash": "jvwxvxe7dgexcutl2wtjaibbrnpys3ea",
"spec": "openmpi"
}
],
"concrete_specs": {
"ney6hmmpufagz63vykeffmatlnyihzlq": {
"name": "trilinos",
"version": "16.0.0",
"arch": {
"platform": "linux",
"platform_os": "ubuntu22.04",
"target": "x86_64_v3"
},
While it is still readable, it consists of over 1900 lines of information representing the actual configurations for each of the environment’s packages.
Reproducing an environment
Now that we’ve described the contents of the environment files we can discuss how they can be used to reproduce environments. You may want to do this yourself on a different machine, or use an environment built by someone else. The process is the same in either case.
You can recreate an environment by passing either of the environment files to spack env create.
The file you choose depends on whether you want to approximate the build using the abstract specs or an exact build based on the concrete specs.
Using spack.yaml
An approximate build is created using the spack.yaml file.
This approach is relevant when we want to build the same specs on a new platform, for example.
It allows you to reproduce the environment by preserving the abstract requirements in the file.
However, the software may actually build differently in part because the concretizer may choose different dependencies.
Let’s use spack env create to create an abstract environment from the file that we’ll call abstract:
$ spack env create abstract spack.yaml
==> Created environment abstract in: /home/spack5/spack/var/spack/environments/abstract
==> Activate with: spack env activate abstract
Here we see that Spack created a managed environment with the name we provided.
And, since it is a newly created environment, it does not have any installed specs yet as we can see from calling spack find after activating the environment:
$ spack env activate abstract
$ spack find
==> In environment abstract
==> 2 root specs
- openmpi - trilinos
==> 0 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
Notice that we have the same root specs as were listed in the spack.yaml file.
Using spack.lock
The spack.lock file is used for an exact reproduction of the original build.
It can replicate the build because it contains the information for all the decisions made during concretization.
Now let’s create a concrete environment, called concrete, from the file:
$ spack env create concrete spack.lock
==> Created environment concrete in: /home/spack5/spack/var/spack/environments/concrete
==> Activate with: spack env activate concrete
==> Updating view at /home/spack5/spack/var/spack/environments/concrete/.spack-env/view
Here we see that Spack again created a managed environment with the provided name.
Since we created the environment from our spack.lock file, not only do we get the same root specs, all of the packages are installed in the environment as we can see from calling spack find after activating the environment:
$ spack env activate concrete
$ spack find
==> In environment concrete
==> 2 root specs
[+] openmpi [+] trilinos
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
autoconf@2.72 ca-certificates-mozilla@2023-05-30 gcc-runtime@11.4.0 hwloc@2.11.1 libiconv@1.17 libxml2@2.13.4 openblas@0.3.28 pigz@2.8 trilinos@16.0.0
automake@1.16.5 cmake@3.30.5 gdbm@1.23 kokkos@4.3.01 libpciaccess@0.17 m4@1.4.19 openmpi@5.0.5 pkgconf@2.2.0 util-macros@1.20.1
berkeley-db@18.1.40 curl@8.10.1 gettext@0.22.5 krb5@1.21.3 libsigsegv@2.14 ncurses@6.5 openssh@9.9p1 pmix@5.0.3 xz@5.4.6
bison@3.8.2 diffutils@3.10 glibc@2.35 libedit@3.1-20240808 libtool@2.4.7 nghttp2@1.63.0 openssl@3.4.0 readline@8.2 zlib-ng@2.2.1
bzip2@1.0.8 findutils@4.9.0 gmake@4.4.1 libevent@2.1.12 libxcrypt@4.4.35 numactl@2.0.18 perl@5.40.0 tar@1.34 zstd@1.5.6
==> 45 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
Note
Use of spack.lock to reproduce a build (currently) requires you
to be on the same type of machine.
More information
This tutorial only scratches the surface of environments and what they can do. For more information, take a look at the Spack resources below.
Setting up and building environments
Environments: reference docs
Configuration tutorial: for customizing your environment
Spack stacks tutorial: for configuring combinatorial environments (e.g., same packages across a list of compilers)
Install-level parallel builds: for how to launch
spack installto build your environment in parallel
Using environments
Developer workflows: for developing code in an environment
GitLab CI pipelines with Spack environments: for using environments to generate CI pipelines
Container Images: for creating containers from environments
Spack stacks tutorial: for managing large deployments of software
Finding examples of environments
Spack Stack Catalog: for discovering environments that you can explore on GitHub