Reference: Introduction to Machine Learning on HPC
Sagehen HPC Cluster Quick Reference
Login
BASH
ssh your_netid@sagehen.hpc.pomona.edu
Module Commands
BASH
module avail # List available modulesmodule load miniconda3 # PyTorch comes from conda: conda activate pytorch_env # Load specific modulemodule list # Show loaded modulesmodule unload pytorch # Unload module
Storage Paths
BASH
/rhome/$USER# Home directory (100 GB, backed up, slower)/bigdata/$USER# Group storage (multi-TB, moderate speed)/scratch/$USER# Node-local SSD (in-job only, deleted at job end)
SLURM Job Commands
BASH
# Submit jobsbatch script.sh# Check job statussqueue-u$USER# Cancel jobscancel<job_id># Get detailed job infoscontrol show job <job_id># Check partition availabilitysinfo
GPU Job Submission Templates
Single GPU PyTorch Job
BASH
#!/bin/bash#SBATCH --job-name=pytorch_test#SBATCH --partition=gpu#SBATCH --gres=gpu:1#SBATCH --cpus-per-task=4#SBATCH --mem=16GB#SBATCH --time=01:00:00module load miniconda3 # PyTorch comes from conda: conda activate pytorch_envpython3 train.py
Multi-GPU PyTorch Job
BASH
#!/bin/bash#SBATCH --job-name=pytorch_multi#SBATCH --partition=gpu#SBATCH --gres=gpu:4#SBATCH --cpus-per-task=16#SBATCH --mem=64GB#SBATCH --time=04:00:00module load miniconda3 # PyTorch comes from conda: conda activate pytorch_envtorchrun--nproc_per_node=4 train.py
Single GPU TensorFlow Job
BASH
#!/bin/bash#SBATCH --job-name=tf_test#SBATCH --partition=gpu#SBATCH --gres=gpu:1#SBATCH --cpus-per-task=4#SBATCH --mem=32GB#SBATCH --time=02:00:00module load miniconda3conda activate tf_env # no tensorflow module -- use your conda envpython3 train.py