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
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
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
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.0Later 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
Build Failures
Check system dependencies. System dependencies such as
glibcversion 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.
Version Conflicts
Use
spack spec -Ito inspect dependency resolution.Consider using
spack concretize --forcefor testing.
Getting Help
Ask in the
#ska-sdp-spackSlack channel.Report issues on the GitLab repository
Consult the Spack documentation
Check the SKA Developer Portal
Contributing
Git workflow
When adding packages or making other changes to ska-sdp-spack,
the general workflow is:
Create a feature branch at the ska-sdp-spack repository.
Create a merge request.
Assign reviewer(s):
The
CODEOWNERSfile describes who is responsible for the part of the code.Ask in the
#ska-sdp-spackslack 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:
The Testing strategy for this repository.
The Deployment page describes the version convention.
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.