Skip to content

User Spack#

Introduction#

SCITAS provides its software stack using Spack. However, advanced users may want to build additional software.

It is possible for users to roll their own Spack environment that integrates with the existing Spack provided by SCITAS. The advantage of this approach is that users can leverage the highly optimized stack provided by SCITAS for each cluster, and augment it with additional Spack recipies to add additional software on top. This additional software will then be able to use the required dependencies that are already provided in the SCITAS spack-powered software stack.

To achieve this, the user can install spack in their home directory, and configure the SCITAS stack for a specific cluster as an upstream. This is called (chaining, or upstreams)[https://spack.readthedocs.io/en/latest/chain.html] in Spack terms.

User spack setup#

First, it is recommended to use the same Spack version that SCITAS is using in their upstream spack. If you were to use a more modern Spack version, it might still work, but any keywords that aren't available in the SCITAS spack version may lead to errors.

The following is a table that details the Spack version for each cluster's stack.

Cluster Spack Version Stack
Jed v0.18.1 /ssoft/spack/jed_stable
Izar v0.18.1 /ssoft/spack/izar_stable
Helvetios v0.18.1 /ssoft/spack/helvetios_stable/

When you install Spack, make sure to use the right version. For instance, when using version v0.18.1:

git clone -b v0.18.1 https://github.com/spack/spack.git
cd spack
. share/spack/setup-env.sh

More than one Spack version

Should you need to use Spack with different versions, we recommend working on separate Spack repos/environments instead of switching branches within the same Spack repo back and forth.

Edit upstreams#

You can then proceed to edit the upstreams.yaml file. You can just do:

spack config --scope site edit upstreams

The contents of this file should point to the SCITAS spack path.

upstreams:
  jed:
    install_tree: /ssoft/spack/jed_stable/opt/spack

Check#

To check that the config is working, you can check whether spack considers the packages that are already present in the SCITAS stack, or tries to install them:

$ spack spec -Il zlib
Input spec
--------------------------------
 -   zlib

Concretized
--------------------------------
[^]  ixtises  zlib@1.2.12%gcc@11.3.0+optimize+pic+shared patches=0d38234 arch=linux-rhel8-icelake

The [^] is what you should be seeing here, which means that Spack has found an upstream (i.e. the SCITAS-provided) zlib package. If you see - (or [+]) instead, it means that Spack would either build a new (or has found an existing, respectively) zlib instead of using the SCITAS-provided one, which is probably not what you want, and meaning something in your Spack setup probably went wrong.


Last update: September 13, 2023