Software Environment
This page covers module-based software setup for HPC4.
SuperPOD users typically use containers (Enroot/Pyxis) but can also use the Spack instance at /scratch/spack/2025.
Environment
Users who can already log in to HPC4 (or SuperPOD)
Shell access on a login node or inside a job session
Quick Reference: Common Environments
Environment |
Modules to load |
Use case |
|---|---|---|
Python (standalone) |
|
Pure-Python scripts, uv-based workflows |
Python (Conda) |
|
Packages from conda ecosystem, mixed Python + C/C++ |
Compiler + MPI |
|
MPI parallel jobs, compiled code |
Note
All examples below require edge Spack activation first.
On a fresh login, module avail python may show nothing until edge is active.
Basic Commands
Every session starts the same way — activate edge Spack, then load what you need:
module purge
source /opt/shared/.spack-edge/dist/bin/setup-env.sh -y
Then use these commands as needed:
Command |
Purpose |
|---|---|
|
List all available modules |
|
Search for a module (broader search) |
|
Load a specific module |
|
Show currently loaded modules |
|
Unload all modules |
Python Environment
module purge
source /opt/shared/.spack-edge/dist/bin/setup-env.sh -y
module load python/3.13.2
python --version # Python 3.13.2
which python # /opt/shared/.spack-edge/.../bin/python
For Conda-based Python:
module purge
source /opt/shared/.spack-edge/dist/bin/setup-env.sh -y
module load anaconda3/2025
python --version
conda --version
For a different Python version:
module purge
source /opt/shared/.spack-edge/dist/bin/setup-env.sh -y
module load python/3.12.9
Using uv for Pure-Python Workflows
uv is a fast, modern package manager that works in user space.
Install once:
curl -LsSf https://astral.sh/uv/install.sh | sh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Basic workflow:
module purge
source /opt/shared/.spack-edge/dist/bin/setup-env.sh -y
module load python/3.13.2
uv venv
source .venv/bin/activate
uv pip install numpy pandas matplotlib
In a SLURM job script:
#!/bin/bash
#SBATCH --job-name=my-python-job
#SBATCH --output=py-%j.out
#SBATCH --time=01:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --account=<your-account>
#SBATCH --partition=amd
module purge
source /opt/shared/.spack-edge/dist/bin/setup-env.sh -y
module load python/3.13.2
source /path/to/project/.venv/bin/activate
python my_script.py
For more complete Python workflow guidance, see Native Python Module.
Compiler and MPI Environment
Load a compiler first, then MPI — openmpi is only visible after a compiler is loaded on the edge instance.
module purge
source /opt/shared/.spack-edge/dist/bin/setup-env.sh -y
module load intel-oneapi-compilers/2025.0.4
module load openmpi/5.0.6
module list
Important
On HPC4, prefer srun over mpirun / mpiexec for MPI jobs.
Verification Checklist
module availshows available modules after edge activationmodule spider <name>finds the module you wantmodule load <name/version>loads successfullywhich <command>points to the expected pathmodule listconfirms loaded modules$SPACK_VARIANTreportsedge(optional check)