Click for detailed status
Spack
Spack is a package manager for supercomputers, Linux, and macOS. It simplifies installing scientific software.
Spack on Euler¶
On Euler the following versions are available:
| Version | Activation command |
|---|---|
| v0.23.1 | . /cluster/software/stacks/2025-06/setup-env.sh |
Software stack 2025-06¶
The 2025-06 stack is based on Spack v0.23.1 and deployed in /cluster/software/stacks/2025-06. It includes:
Spack in a Nutshell¶
Spack is a package manager like apt, pip, npm, cargo, yum, pacman, zypper, or winget.
At its core lies the idea of a "spec". A spec is an abstract or concrete specification of a package's variant, the variants of its dependencies and the compilers used to build each one. This example of an abstract spec (whitespaces are ignored by Spack)
means: gromacs version 2024.3, built with gcc version 12, without cuda, with mpi, and using openmpi version 5.0. Unspecified details are left for Spack to define later.
A concrete spec defines all details. Concretization turns an abstract spec into a concrete one. The command for this is spack spec <spec>.
Example output (truncated):
$ spack spec gromacs @2024.3 %gcc@12 ~cuda +mpi ^openmpi@5.0
- gromacs@2024.3%gcc@12.2.0~cp2k~cuda~cycle_subcounters~double+gmxapi+hwloc~intel_provided_gcc~ipo~mdrun_only+mpi+nblib~nosuffix~opencl+openmp~relaxed_double_precision+shared build_system=cmake build_type=Release generator=make openmp_max_threads=none arch=linux-ubuntu22.04-x86_64_v3
[^] ^openmpi@5.0.5%gcc@12.2.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
[^] ^autoconf@2.72%gcc@12.2.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[^] ^m4@1.4.19%gcc@12.2.0+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-ubuntu22.04-x86_64_v3
[^] ^libsigsegv@2.14%gcc@12.2.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[^] ^numactl@2.0.18%gcc@12.2.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
[^] ^perl@5.40.0%gcc@12.2.0+cpanm+opcode+open+shared+threads build_system=generic arch=linux-ubuntu22.04-x86_64_v3
[^] ^berkeley-db@18.1.40%gcc@12.2.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-ubuntu22.04-x86_64_v3
[^] ^pkgconf@2.2.0%gcc@12.2.0 build_system=autotools arch=linux-ubuntu22.04-x86_64_v3
Installing a Package¶
-
Get package info
-
Define and concretize your spec
-
Install the package and dependencies
-
Load the package into your environment
Building external software¶
To build software that's not registered in Spack, load required packages and build:
spack load cmake @3.30.5 %gcc@12
spack load openmpi @5.0.5 %gcc@12
cmake -B build
cmake --build build
For complexer dependencies, use environments:
-
Create an environment
Environments are stored in$HOME/spack-environments. -
Activate the environment
-padds the active environment to the command line prompt. -
Add specs
-
Concretize, install, load, and build
Writing or extending packages¶
If Spack packages are insufficient, you can write or extend packages. A simple way to do this is StackySpack. It configures Spack to use additional package folders and works with any software stack, not just the ones on Euler.
StackySpack v0.23.1 is compatible with software stack 2025-06.
If you want to make your packag public, contributions to the Spack package repository are welcome.
Commands¶
Spec syntax: <package> @<version> %<compiler> +<variant> ~<variant> ^<sub-package> +<sub-package-variant>
| Command | Description |
|---|---|
spack find |
Lists all installed packages. |
spack find <spec> |
Lists installed packages matching the spec. |
spack info <package> |
Shows package information. |
spack spec <spec> |
Concretizes abstract spec. |
spack install <spec> |
Installs package and dependencies. |
spack location --install-dir <spec> |
Shows install location for matching specs. |
spack load <spec> |
Loads package and dependencies into environment. |
spack env activate -p <env_name> |
Activates environment (-p adds env to prompt). |
spack env deactivate |
Deactivates the active environment. |
Troubleshooting¶
In case of errors, browse https://github.com/spack/spack/issues and feel free to create a new issue. The spack community is also very active on discord https://slack.spack.io/
Error: cannot bootstrap clingo¶
This error message usually looks emerges after a "spack install" or "spack concretize" command. It looks something like this
==> Error: cannot bootstrap the "clingo" Python module from spec "clingo-bootstrap@spack+python %gcc platform=linux target=x86_64" due to the following failures:
github-actions-v0.6 raised FetchCacheError: FetchIndexError: Could not fetch manifest from https://ghcr.io/v2/spack/bootstrap-buildcache-v1/manifests/index.spack, due to: <urlopen error [Errno 111] Connection refused>
github-actions-v0.5 raised RuntimeError: The binary index is empty