Spack
Spack is a package manager that simplifies installing and running customised scientific software stacks. With Spack, you can build a package with multiple versions, configurations, platforms, and compilers, and all of these builds can coexist in parallel.
A shared library of common software has been preinstalled on the Research Cluster, available to use via a Shared read-only Spack instance or via environment modules.
Users wanting to install their own Spack packages should install and manage their own local Spack instance (See User-local Spack installation).
User-local Spack installation
In order to install Spack packages youself, you need to set up your own Spack instance.
Open a terminal and with your $HOME as the current working directory, follow the Installation instructions on the Spack website and source the appropriate initialisation script:
cd && git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
. ~/spack/share/spack/setup-env.sh
The sourcing of
setup-envmay be added to your~/.bashrcfile (or its equivalent when not using the default bash shell and~/.bash_profile) to automatically source the initialisation script the next time you open a terminal session:
echo '. ~/spack/share/spack/setup-env.sh' >> ~/.bashrc
We highly recommend chaining your user-local Spack to our shared Spack, so you can make use of and build upon the shared packages already available. In order to do so, you can run the following to create the upstreams configuration file
~/.spack/upstreams.yaml:
mkdir -p ~/.spack && cat <<EOF > ~/.spack/upstreams.yaml
upstreams:
system-spack:
install_tree: /opt/spack/spack/opt/spack
EOF
Following the above instructions, Spack packages will be installed under
~/spack/in your home directory, which can get sizable and will count towards your home directory storage quota. If you have a/projectsfolder set up, Spack can alternatively be installed there or set up as an alternative prefix.If you installed Spack via the recommended
git clone, you can keep your local Spack instance up to date by runningcd $SPACK_ROOT && git pull
Usage on the Research Cluster
Please refer to the Basic usage documentation on the Spack website for a comprehensive overview and examples of how to query, install, load and use packages and Spack environments.