The easiest path is an interactive Slurm job started from an Open OnDemand
terminal — not work done on the login node. One srun command gets you a shell
on a compute node; you then start claude in it and work normally.
If you have never used an HPC before, read how the HPC works first — it is four paragraphs, and it explains why the one-line answer above is the one-line answer. If you have, the quick start is all you need.
Access: partly TBD. The login host is
academ-acade-iL73aitWT6xF-c83014867702e61e.elb.us-east-1.amazonaws.com — see
the SSH config below, which gives it a short name. Still to be announced: the
OnDemand portal URL, and how you get an account, register your SSH key, and get added to the CS2680 group.
Those will be posted here and on the home page.
Once, ever — from an OnDemand terminal on the login node:
Then every time you sit down to work:
And when you need a GPU instead (Assignment 4 onward):
exit ends the job and releases the node. That is the whole workflow; the rest of this page is
what to do when it does not go like that.
There are three machines in this story. Your laptop, where you type. The login node, which is what you reach when you open an OnDemand terminal or SSH in — one small shared machine that everyone in the course lands on at once. And the compute nodes, which are the actual hardware: many CPUs, lots of memory, and in one partition, a GPU.
You are not allowed to just run things on a compute node. Slurm — the scheduler
— owns them, and you ask it for a lease: give me 4 CPUs and 16 GB for 4 hours. When
hardware is free it hands you a node and starts your shell on it. That lease is a job, and
everything you run inside it is charged against it. When the time runs out, or you type exit,
the lease ends.
The one thing that makes this pleasant is that /home is shared. The login node
and every compute node see the same home directory, so anything you installed once is already there when a
job starts — claude in ~/.local/bin, or grok in
~/.grok/bin. Nothing to re-install per job, nothing to copy onto the node, and the login you did
in week one still applies, because the credentials Claude Code writes live in your home directory too.
Two kinds of job, and you will mostly want the first. An interactive job
(srun --pty) gives you a shell and you work in it, which is what an agent session is. A
batch job (sbatch) runs a script without you and writes its output to a file,
which is what you want for an overnight sweep.
Six steps, once. Do them on the login node — they are all small, and installing software is exactly what the login node is for.
gpu-cs2680 partition.ssh ood.~/.local/bin, and it keeps itself updated.
Because /home is shared, you are also installing it on every compute node at the same time.
If you use grok instead, its installer lands in ~/.grok/bin and everything on this
page applies unchanged.PATH. Many HPC shells do not include
~/.local/bin:
~/.bashrc rather than ~/.bash_profile, because a Slurm job may start either a
login or a non-login shell depending on how it was launched, and only ~/.bashrc is read in
both cases — provided your ~/.bash_profile sources it, which is the default on most
systems and worth confirming with grep bashrc ~/.bash_profile.claude and follow the prompts. In a browser-based terminal or
over SSH you will get a code to paste back rather than a browser that returns to the terminal
— that is expected, and the Claude Code page walks through it.
Confirm with /status, then /exit.~/.claude/settings.json on this machine,
per the Claude Code page. That file is per-machine, and your
HPC home is a different machine from your laptop as far as it is concerned.~/.claude/projects/ on whichever machine ran it, so the HPC has its own set. When you
archive your session files, include the HPC's — and scan them
for credentials like any other.
From an OnDemand terminal (or over SSH):
Wait for the node to come up. The first job of the day can take a few minutes, because idle nodes are
powered down — sinfo shows them as idle~, and Slurm has to boot one before
your shell appears. Nothing is wrong; squeue -u $USER in another terminal shows the job pending
with a reason.
When the prompt comes back you are on the compute node — hostname will show a node name
rather than the login host. Then:
That is the whole student workflow: allocate a shell on a compute node, run the agent there.
Work normally, and exit when you are done, which ends the job and returns the node.
| Flag | What it does | How to choose it |
|---|---|---|
-p general |
Partition — which pool of nodes to run on. | general for anything that is not GPU work. See GPUs for the other
one. |
-c 4 |
CPU cores. | 4 is plenty for an agent. More cores means a longer wait for a node with that many free. |
--mem=16G |
Memory for the whole job. Exceed it and the job is killed. | 16 GB is comfortable for agent work. Raise it if you are loading data or model weights. |
-t 4:00:00 |
Wall-clock limit, HH:MM:SS. At the limit the job ends, mid-command if need be. |
Ask for a working session, not a week. Check the partition's ceiling with
sinfo -p general -o "%P %l". |
--pty bash |
Attaches a terminal and runs a shell in it — this is what makes the job interactive. | Always, for this workflow. Swap bash for tmux new -s agent to make it
survive a closed tab. |
A coding agent talks to an API over the network. The model runs in a datacenter that is not this one, so the agent needs a few cores to run tools, compile things, and hold a repository in page cache — and no GPU at all. Asking for a GPU you will not use means waiting in a longer queue for hardware you then leave idle, which is the one thing a shared HPC punishes.
Reach for a GPU when the assignment is about serving a model yourself: Assignment 4 onward.
The course has its own GPU partition:
Each node in it is 1× RTX PRO Server 6000, 8 CPUs, and roughly 61 GB of RAM. So the request above is about half a node, and asking for more than a node has — nine cores, 64 GB, two GPUs — produces a job that waits forever rather than an error. Only members of the CS2680 group can submit here; an invalid-partition or invalid-account message means that is what to fix first.
Check the GPU is really yours, first thing inside the job:
nvidia-smi should list one card with almost no memory in use, and
CUDA_VISIBLE_DEVICES should name the one device Slurm gave you. If nvidia-smi
reports no devices, you are not in the job you think you are — check hostname and
squeue -u $USER.
Two things will bite you, and both are about disk rather than the GPU.
~/.cache/huggingface by default, so the
third model you try is where the quota error appears. Point the cache somewhere with room before you
start — export HF_HOME=/path/with/space/$USER/hf in your ~/.bashrc
— and delete the models you were only curious about. TBD: the scratch
filesystem to use for this, once HPC access is finalized./home reason. Create
it once, activate it in the job.Ask for more of the node when you are serving rather than chatting — -c 8 --mem=48G
leaves the weights room to load — and remember that a whole-node request only starts when a whole
node is free. And kill the server when you stop measuring: a vLLM process holding 90 GB of VRAM in a
job you have wandered away from is invisible to you and obvious to everyone waiting.
-t, and exit when you stop working rather
than holding a four-hour allocation to read a paper. This bites hardest in the last week of the semester, which is
exactly when you will want a node at short notice.
ssh ood1Once the workflow above is familiar, you can collapse it into a single command. SSH will run
srun for you on connect, so ssh ood1 takes you from your laptop to a shell on a
compute node with nothing typed in between. Put this in ~/.ssh/config on your own machine
(C:\Users\you\.ssh\config on Windows), with your username and key path:
That gives you three names for the same machine:
ssh ood — a plain shell on the login node. This is where you install
things, move files, and check the queue.ssh ood1 — a CPU compute node: 4 cores, 16 GB, 6 hours. Agent
work goes here.ssh ood2 — a GPU compute node: the same, plus one RTX PRO Server
6000.The srun flags are the long-form spellings of the ones in the
flag table — --cpus-per-task=4 is -c 4,
--time=6:00:00 is -t 6:00:00 — so edit them the same way. Of the SSH
directives, four earn their place: RequestTTY force and RemoteCommand are what
replace your login shell with the job; ForwardAgent yes lends the node your laptop's key so
git push works from inside the job without a key ever living on the HPC; and the two
ServerAlive lines keep an idle connection from being dropped by something in the middle, which
is what usually kills a long agent session.
Generate the key first if you do not have one, and register it per the access instructions above:
ssh ood1 is a new job. Two terminals means two allocations, and a
reconnect after your wifi drops does not put you back in the old one — it queues for another node while
the first job sits there holding hardware until its six hours are up. Check with
squeue -u $USER (the --job-name in the config is why they show up as
cpu and gpu), scancel the strays, and use
tmux inside the job if you want something to survive a lost connection. To get back into
a job that is still running, ssh ood and then
srun --jobid=<jobid> --pty bash.
One more consequence of RemoteCommand: on ood1 and ood2 there is no
plain shell to talk to, so scp, rsync, sftp, and editors that drive
SSH themselves — VS Code Remote-SSH included — will not work through those two names. Use
ood for all of them: rsync -avz ./data/ ood:~/cs2680/data/.
Recommended for this class. An srun --pty shell belongs to the terminal that started it, so a
closed browser tab, a laptop lid, or hotel wifi takes your agent with it — mid-edit, and the job dies
too. Start the job inside tmux instead:
Now the agent is a process inside a tmux session on the compute node, and losing your terminal only detaches it. To get back:
Three things to keep straight:
squeue -u $USER tells you.-t runs out,
Slurm ends the job and the tmux session with it. Nothing survives the lease.Ctrl-b d. That leaves everything running.
Ctrl-b c opens another window in the same session, which is how you watch a log while the
agent works.Interactive jobs are for working. For an evaluation sweep — the same agent over fifty tasks, the kind of thing Assignment 3 onward asks for — you do not want to be present at all. Write a script:
Submit it with sbatch run_eval.sh, which prints a job id and returns immediately.
squeue -u $USER tracks it, %j in the output path expands to the job id so
concurrent runs do not overwrite each other, and everything the script prints lands in that file. Create the
logs/ directory first — Slurm will not, and a job whose output file cannot be opened fails
instantly for a reason that is hard to see.
This is also the honest way to run the agent itself unattended: claude -p "…" is
headless and takes the same task from a script that you would have typed, which is exactly the interface
Assignment 1 built a console around. It needs no browser login inside the job,
because the credentials from your one-time claude login are sitting in your shared home
directory.
sinfo -p general -o "%P %l %D %c %m %G" prints the partition's time limit alongside its node
count, cores, memory and GPUs. A -t above the limit is rejected at submission; a job sized above
any node simply never starts, which looks identical to a busy HPC.
rsync for everything else. From your laptop:
ood being the login-node alias from the SSH config; without
it, spell out you@ and the full login hostname.
rsync over scp because it resumes and skips what has not changed, which matters
the third time you copy a results directory./tmp on a compute node is not yours after the job ends.
| Command | What it tells you |
|---|---|
squeue -u $USER |
Your jobs: id, partition, state (PD pending, R running), time used, and the
node. The reason column explains a pending job. |
sinfo -p general |
Node states in a partition. idle free, idle~ free but powered down,
alloc taken, mix partly taken, down/drain
unavailable. |
sinfo -p gpu-cs2680 -o "%P %l %D %c %m %G" |
What you are allowed to ask for: time limit, node count, cores, memory, GPUs. Run this before inventing flags. |
scancel <jobid> |
Ends a job. scancel -u $USER ends all of yours — useful after a lost terminal. |
sacct -j <jobid> --format=JobID,State,Elapsed,MaxRSS,ReqMem,ExitCode |
The post-mortem for a finished job. TIMEOUT means it hit -t;
OUT_OF_MEMORY, or a MaxRSS at your ReqMem, means
--mem. |
scontrol show job <jobid> |
Everything Slurm knows about a job that is still queued or running, including why it is waiting. |
hostname |
Whether you are on the login node or a compute node. Worth checking when something gets killed. |
nvidia-smi |
Inside a GPU job: the card, its memory, and what is using it. |
| Symptom | What it is, and what to do |
|---|---|
Nothing happens for minutes after srun. |
Normal for the first job — a powered-down node is booting.
squeue -u $USER from another terminal shows it pending with a reason. |
| The job never starts. | You asked for more than a node has, or the partition is full. Compare your flags against
sinfo -p <partition> -o "%P %l %D %c %m %G" and bring -c,
--mem, -t and --gres inside it. |
| Your session was killed with no message. | Almost always the login node's 15-minute CPU cap — check hostname. Otherwise the
job hit its -t walltime or its --mem;
sacct -j <jobid> distinguishes them. |
claude: command not found inside a job. |
PATH is set in ~/.bash_profile, which a non-login job shell never reads. Move
the export PATH line into ~/.bashrc, or run it as
~/.local/bin/claude. |
| Claude Code asks you to log in again on the HPC. | Expected the first time: the credentials live in your home directory, not your laptop. Over SSH or a browser terminal you get a code to paste back rather than a browser redirect — see logging in. |
| Invalid partition, or an account/association error. | You are not in the CS2680 group yet, or you typed the partition name wrong. Only
gpu-cs2680 is group-restricted. |
nvidia-smi reports no devices in a GPU job. |
You are on the login node, or the job was allocated without --gres. Check
hostname and re-submit with the --gres flag exactly as written
above. |
scp, rsync or VS Code Remote-SSH fails against ood1 /
ood2. |
Those names carry a RemoteCommand, so there is no plain shell for them to talk to. Use the
ood alias, which is the login node. See the SSH config. |
| You have three jobs and you only wanted one. | Every ssh ood1 allocates a fresh job, and a reconnect does not reuse the old one.
squeue -u $USER, then scancel the strays; use
srun --jobid=<jobid> --pty bash from the login node to re-enter one that is still
alive. |
| A job you forgot about is still running. | squeue -u $USER to find it, scancel <jobid> to release it. Do this
before asking why nothing will start. |
| Out of disk, or a quota error while downloading a model. | Your home directory filled up, usually with ~/.cache/huggingface. See
serving a model here. |
| Something else. | Bring the exact command, the job id, and the error text to office hours or the course forum. A job id is enough for anyone to look up what actually happened. |
A small number of nodes and a whole class. Four habits, and the last one is the one people forget:
-t, and prefer a batch job over an interactive one you
will not be watching.exit when you stop working. An idle allocation is invisible to you and
expensive for everyone else, and the queue is longest in the week you most need it.