SKA SDP Spack Repository

This repository contains Spack package definitions for the Square Kilometre Array (SKA) Science Data Processor (SDP) software stack and its dependencies.

Prerequisites

  • Git

  • Python 3.10 or later

  • Compiler suite (e.g. GCC, or Intel OneAPI, etc.)

  • Spack v1.0.0 or later

Quick Start

  1. Install Spack (skip if already installed):

# mind the branch, here is set to the latest release version,
# different spack version may result in different package resolutions.
git clone --depth=2 --branch=v1.1.1 https://github.com/spack/spack.git
source spack/share/spack/setup-env.sh
spack compiler find
# Recommended: add cache mirrors to speedup package installations and reduce
# temporary storage requirements
spack mirror add v1.1.1 https://binaries.spack.io/v1.1.1
  1. Clone and add the SKA SDP repository:

git clone https://gitlab.com/ska-telescope/sdp/ska-sdp-spack.git
spack repo add ./ska-sdp-spack
  1. Proceed with installing packages, e.g:

# Install WSClean with default configuration
spack install wsclean

# Install DP3 (includes aoflagger)
spack install dp3@6.3
  • Note that we could have also created a Spack environment and then installed packages:

# Add sdp spack environment
spack env create sdp
spack env activate -p sdp
spack add dp3
spack concretize
spack install -v

Please consult official Spack documentation on different commands and subcommand flags.

Version Management

Spack Version Control

It is important to maintain consistent Spack versions across your development environment, especially after Spack updated its builtin concretizer. Different Spack versions may select different default package versions. For example:

  • Spack v0.17.1 defaults to cuda@11.5.0

  • Later versions may default to newer CUDA versions

Package Version Specification

To install specific versions of packages:

# Install specific WSClean and IDG versions
spack install wsclean@3.6 ^idg@0.8.1

# Check available versions
spack info wsclean

Common Configurations

CUDA Support

If you encounter CUDA compatibility issues, you can specify an older CUDA version:

# Install with specific CUDA version
spack install cuda@10.0.130
# Install idg with the specific version of CUDA
spack install idg ^cuda@10.0.130

Default Environment

A default environment configuration is provided in spack.yaml. This includes:

  • Standard Python packages (Astropy, SciPy)

  • Radio astronomy tools (WSClean, DP3, AOFlagger)

  • SKA-specific packages

To use the default environment for Ubuntu you can use:

spack env create sdp env/aws/ubuntu/spack.yaml
spack env activate -p sdp
spack install

While to use the default environment for RedHat9 you can use:

spack env create sdp env/aws/rhel9/spack.yaml
spack env activate -p sdp
spack repo update
spack install

Note of caution: You have to reset the spack repository by running:

spack repo add [path_to_ska_sdp_spack]

Troubleshooting

Common Issues

  1. Build Failures

    • Check system dependencies. System dependencies such as glibc version and/or CPU architecture may result in unsuccessful compilation.

    • Verify compiler compatibility. Some software may not be designed to be compiled with specific compiler, e.g. Intel OneAPI compiler suite.

    • Review build logs in ~/.spack/var/spack/builds/.

    • Build with debugging and verbose mode enabled: spack -d install -v.

  2. Version Conflicts

    • Use spack spec -I to inspect dependency resolution.

    • Consider using spack concretize --force for testing.

Getting Help

Contributing

Git workflow

When adding packages or making other changes to ska-sdp-spack, the general workflow is:

  1. Create a feature branch at the ska-sdp-spack repository.

  2. Create a merge request.

  3. Assign reviewer(s):

  • The CODEOWNERS file describes who is responsible for the part of the code.

  • Ask in the #ska-sdp-spack slack channel.

If you need to deploy the Spack packages to the DP AWS HPC Cluster, you have to create a new release. The Deployment section describes creating and using releases of ska-sdp-spack.

Conventions

Please adhere to these general conventions for the ska-sdp-spack repository:

Acknowledgement

We acknowledge the initial work by our colleagues at Astron in the schaap-spack repository, which served as the seed and foundation for this project and builds upon that work, which is also ongoing in the current project.

License

This project is licensed under the BSD 3-Clause “New” or “Revised” License - see the LICENSE file for details.