Introduction
What’s Spack
Spack is a package manager for supercomputers, Linux, and macOS. It makes installing scientific software easy. With Spack, you can build a package with multiple versions, configurations, platforms, and compilers, and these builds can coexist on the same machine.
What Makes Spack Different From Other Package Managers
The following features makes Spack different from other package managers:
-
Simple package installation: Installing the default version of a package is simple.
-
Custom versions & configurations: Spack allows installation to be customized. Users can specify the version, build compiler, compile-time options, and cross-compile platform, all on the command line.
-
Customize dependencies: Spack allows dependencies of a particular installation to be customized extensively.
-
Non-destructive installs: Spack installs every unique package/dependency configuration into its own prefix, so new installs won’t break existing ones.
-
Packages can peacefully coexist: Spack avoids library misconfiguration by using RPATH to link dependencies. When a user links a library or runs a program, it’s tied to the dependencies it was built with, so there is no need to manipulate
LD_LIBRARY_PATH
at runtime. -
Creating packages is easy: To create a new package, all Spack needs is the
URL
for the source archive. Thespack create
command will create a boilerplate package file, and the package authors can fill in specific build steps in pure Python.
Spack Packages
Spack packages are installation scripts, which are essentially recipes for building the software.
They define properties and behavior of the build, such as:
-
Where to find and how to retrieve the software.
-
Its dependencies.
-
Options for building the software from source.
-
Build commands.
Once you’ve specified a package’s recipe, users of that recipe can ask Spack to build the software with different features on any of the supported systems.