getting started
from zero to a finished job in about five minutes
1. log in
Once I've made your account, SSH into the head node:
ssh [email protected]
That drops you on the login node. Don't run real work there; it's for editing files and submitting jobs. Anything heavy gets killed so the scheduler stays responsive.
2. check that the cluster sees you
sinfo # what nodes exist and what state they're in
squeue # what's queued or running right now
sacct # your own job history
3. write a job script
A job script is a normal shell script with #SBATCH lines at the
top telling the scheduler what you need. Save this as hello.sh:
#!/bin/bash
#SBATCH --job-name=hello
#SBATCH --partition=main
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=512M
#SBATCH --time=00:05:00
#SBATCH --output=hello-%j.out
echo "running on $(hostname)"
sleep 30
echo "done"
4. submit it
sbatch hello.sh # queue the job, prints a job id
squeue -u $USER # watch it
cat hello-<jobid>.out # read the output when it finishes
scancel <jobid> # kill it if you need to
house rules
- Always set
--time. Jobs without a sane limit block everyone else. - Ask for what you'll use. Reserving all 12 cores for a single-threaded script is the one thing that'll get your account paused.
- Nothing illegal, no crypto mining, no scraping other people's sites.
- Your home directory isn't backed up. Keep anything you care about elsewhere too.
- The cluster lives in my house. It goes down sometimes. That's part of the charm.