- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -

Extending the software stack on Hunter with Spack

From HLRS Platforms
Jump to navigationJump to search

This page is work in progress!!!

In its current form, this page is meant for HLRS staff. Expect thing to change and break at any time.

Introduction

Most of the software stack on Hunter is build on top of Spack. Once released, a software stack is immutable. Also, during development of a new software stack, working directly on the files and directories is strongly discouraged. The normal workflow is to use Spack's capabilities to "chain" a private Spack instance to an upstream instance (i.e. the HLRS release). This allows to do modifications, tests, and adjustments to your private Spack instance without interfering with the upstream instance. Once you are satisfied with your modifications, it is possible to incorporate them and thus extend the upstream instance without mutating existing state.

Pre-requisites

  1. working access to internet from Hunter, e.g. ssh reverse tunnel with proxy setup


Spack Module

Spack is available after loading the module spack-user. The module however, can only be loaded if the environment variables TMPDIR and SPACK_USER_PREFIX are exported and point to existing directories. Spack will be configured to expect and place most of its data in the directory $SPACK_USER_PREFIX.

$ export TMPDIR=/localscratch/${UID}

$ export SPACK_USER_PREFIX=${HOME}/my-spack
$ mkdir -p $TMPDIR; mkdir -p $SPACK_USER_PREFIX
$ module use /sw/hunter-rh9/hlrs/testing/release/main/modulefiles

$ module load spack-user


Essentially, the module does two things:

  1. set the environment variable SPACK_ROOT pointing to the base of HLRS' Spack instance, and
  2. provide the command alias spack which wraps the original Spack command and adds some additional parameters to pick up relevant configuration files.
$ alias spack
alias spack='spack -C $SPACK_ROOT/../config-hlrs -C $SPACK_ROOT/../config-user'


The first time you use Spack it is recommended to bootstrap it. This may take up to several minutes

$ spack bootstrap now