Skip to content

config.yaml

Read the official Spack documentation

This file contains the majority of the basic configuration for your personal scope:

config.yaml
config:
  # This is the path to the root of the Spack install tree.
  install_tree:
    root: /data/scratch/${USER}/spack/apps
    # This is the naming scheme for your installation prefixes
    projections:
      ^mpi: "{architecture}/{compiler.name}-{compiler.version}/{name}/{version}-{^mpi.name}-{^mpi.version}-{hash:7}"
      all: "{architecture}/{compiler.name}-{compiler.version}/{name}/{version}-{hash:7}"
  # This is where any personal module templates should be stored
  template_dirs:
    - /data/scratch/${USER}/spack/apps
  # Directory where licenses should be stored
  license_dir: /data/scratch/${USER}/spack/licenses
  # Directory where source code tarballs should be stored
  source_cache: /data/scratch/${USER}/spack/cache

The install_tree: root: is very important - this is where your personally installed Spack applications and libraries (i.e. those not already installed by the ITSR Apps Team) will be installed. The above example points this at scratch, which is a good place to start for learning and testing, but will be automatically auto-deleted periodically. Once you gain more confidence, you may wish to change this to an alternative location, as covered in the Configuration overview section above.

The projections section defines the directory structure of the installed applications and libraries. The example above broadly mirrors the structure we use for centrally installed applications, but it can be customised further as per the official Spack documentation.

The template_dirs section is optional and is only required if you want to use templates for your private Spack modules as per the Spack documentation.

The license_dir is also optional, and only required if you are installing any software from Spack that requires a license file.

The source_cache path is where source code tarballs will be downloaded to when you compile and install your own applications and libraries and must be defined, otherwise installations will fail as they try will try to write these to a read-only location.