How to load Spack modules on AWS
Follow the instructions below to load Spack modules on AWS. Spack is used for managing software dependencies on AWS without needing to install them manually.
Prerequisites
An account on AWS and access to the headnode.
Steps
Note
If you are loading modules interactively you can run the commands in steps 2-3 on the CLI. If you are writing a SLURM script, add them to your script before loading any modules.
Log into the headnode on AWS and (optionally) start an interactive compute node if heavy computation is required.
Ensure that the environment is clean by unloading all modules.
module purgeLoad the latest Spack environment:
module load ska-sdp-spack
Note
If you want to load an older Spack environment you can specify the tag (e.g. to load
2025.12.1you would runmodule load ska-sdp-spack/2025.12.1). You can check which Spack environments are available by runningmodule avail ska-sdp-spack.You can now load your desired Spack module (e.g.
carta):module load carta
Verification
You can verify that the Spack module has been loaded successfully by checking the module list:
module list
This should display the loaded Spack module along with any other modules that are currently loaded.
You can also check the version of the loaded module (e.g. carta) to ensure it matches the expected version:
carta --version
FAQ
Q: How do I know which Spack modules are available?
A: After loading the ska-sdp-spack module, you can list all available Spack modules by running:
module avail
Q: How can I check that the module I want to load is available?
A: After loading the ska-sdp-spack module, you can check for a specific module by running:
module avail <module_name>
Q: Can I load multiple Spack modules at once?
A: Yes, you can load multiple Spack modules by running the module load command with a list of
module names separated by spaces.
Troubleshooting
If you encounter issues loading Spack modules, consider the following troubleshooting steps:
Ensure that
/shared/fsx1/shared/metamodulesis in yourMODULEPATH. You can verify this by runningecho $MODULEPATH. It should be there by default on all AWS nodes.Verify that the Spack environment you are trying to load exists by running
module avail ska-sdp-spack.Check for any typos in the module load commands.