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. Related ------- - :doc:`How to start an interactive compute node on AWS ` - `Accessing the clusters (Confluence) `_ 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. 1. Log into the headnode on AWS and (optionally) start an interactive compute node if heavy computation is required. 2. Ensure that the environment is clean by unloading all modules. .. code-block:: bash module purge 3. Load the latest Spack environment: .. code-block:: bash 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.1`` you would run ``module load ska-sdp-spack/2025.12.1``). You can check which Spack environments are available by running ``module avail ska-sdp-spack``. 4. You can now load your desired Spack module (e.g. ``carta``): .. code-block:: bash module load carta Verification ------------ You can verify that the Spack module has been loaded successfully by checking the module list: .. code-block:: bash 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: .. code-block:: bash 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: .. code-block:: bash 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: .. code-block:: bash module avail **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/metamodules`` is in your ``MODULEPATH``. You can verify this by running ``echo $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.