Search Docs by Keyword
Spack software package management
Overview
Spack is a package management tool designed to support multiple versions and configurations of software on a wide variety of platforms and environments. It was designed for large supercomputer centers, where many users and application teams share common installations of software on clusters with exotic architectures, using non-standard libraries. Spack is non-destructive: installing a new version does not break existing installations. In this way several configurations can coexist on the same system.
Most importantly, Spack is simple. It offers a simple spec syntax so that users can specify versions and configuration options concisely. Spack is also simple for package authors: package files are written in pure Python, and specs allow package authors to maintain a single file for many different builds of the same package.
This page provides a brief guide to the usage of Spack. For more detailed instructions please checkout FASRC User Codes and the official Spack documentation.
Installation
To install Spack, clone the Spack Github repository and then source the file /share/spack/setup-env.sh
:
git clone -c feature.manyFiles=true https://github.com/spack/spack.git cd spack source share/spack/setup-env.sh
We recommend cloning into your lab directory on holylabs, or other lab storage if holylabs is not available, in a common directory (e.g. /n/holylabs/jharvard_lab/Lab/software
). This way you can have a collective Spack installation for your lab to use and you get the superior performance of holylabs over your home directory. Other locations work as well, but you should pick a location that has decent performance and is mounted to the entire cluster.
source /share/spack/setup-env.sh
will modify your environment and put spack in your path.
To install specific packages, see the Examples section below.
Package Management
Below is a list of convenient commands for Spack. Note: Depending on the software stack, installation can take hours, so plan accordingly by using screen/tmux or a Remote Desktop on Open Ondemand.
Command | Purpose |
spack list | List all available packages |
spack list <package> | List specific package |
spack versions <package> | List available versions of package |
spack install <package> | Install package |
spack uninstall <package> | Remove package |
spack find | List installed packages |
spack load <package> | Load package for use |
spack unload <package> | Unload package from environment |
Examples
In the FASRC User Codes, we provide FASRC-specific documentation, including:
- Installation
- Compiler configuration
- MPI configuration
- Troubleshooting
- Specific software stacks
Resources
- Spack Documentation: Full documentation as well as tutorials on how to use Spack.
- Spack packages
Bookmarkable Links