Explorer is a few hundred Linux machines, one shared disk and a scheduler that hands the machines out. This guide takes you from “what is /dev?” to serving an LLM, steering Qwen for your paper and writing CUDA kernels on Northeastern’s cluster. Every command is labeled with the machine it runs on, and the terminal is a sandbox of explorer-02 where mistakes cost nothing.
A simulation: outputs are trimmed and some paths are invented. Every command here is real, so run it on Explorer once it clicks. Type help for the full list.
When you SSH into Explorer you are not “on the cluster” in the way you are on your laptop. You are on one specific machine, explorer-02, whose only job is to be the front door. Think of a hotel. The login nodes are the lobby: anyone can walk in, sit down, read, write and plan. The Slurm controller is the front desk that assigns rooms. The compute nodes are the rooms, and nobody sleeps in the lobby. The shared storage is the building’s plumbing: the water in the lobby is the same water in every room, which is why a file you save on the login node is instantly visible on a GPU node. The InfiniBand network is the hallways, fast enough (200 Gb/s) that GPUs in different rooms can talk while training together.
Your login node is not a toy. explorer-02 has two Xeon Gold 5318Y sockets, 96 logical CPUs and 256 GB of RAM, and still has no GPU. It is shared by every user logged into it, and a watchdog kills processes that hog it. That single fact explains half the “why did my thing die?” stories, including Claude Code being killed when you ran it there.
Or follow one job from your keyboard to a GPU and back.
This comes from the scontrol show node dump you ran earlier. The --gres name is the exact word you type to request that GPU. “Compute capability” (written sm_80 and so on) is the GPU’s generation number, and it decides which software runs on it, so it matters more than the marketing name.
| --gres name | GPU | Memory | Capability | bf16 / fp8 | Partitions | Good for |
|---|---|---|---|---|---|---|
v100-sxm2 | V100 SXM2 ×4 per node | 32 GB | sm_70 | no / no | gpu*, sharing | Most plentiful. Older software only (see chapter 7) |
v100-pcie | V100 PCIe ×2 | 32 GB | sm_70 | no / no | gpu* | Same chip, slower links |
t4 | T4 ×4 | 16 GB | sm_75 | no / no | gpu* | Small inference, CUDA practice |
a100 | A100 ×3 (d1026) | 40 GB | sm_80 | yes / no | gpu* | Training and serving 7B models |
a100 + --constraint=a100@80g | A100 ×4 | 80 GB | sm_80 | yes / no | gpu* | The all-rounder for LLM work |
h200 | H200 ×8 | 141 GB | sm_90 | yes / yes | gpu*, sharing | Fastest. Native FP8. Longest queue |
h100 | H100 ×4 (d4041) | ~94 GB | sm_90 | yes / yes | sharing | Short runs only (sharing is capped at 1 hour) |
l40s, l40 | L40S ×8, L40 ×10 | 48 GB | sm_89 | yes / yes | sharing | Inference, and the only cards with ray-tracing cores for Isaac Sim |
rtx6000 | RTX 6000 ×8 | check | check | check | sharing | Run nvidia-smi to see which generation it is |
p100 | P100 ×4 | 16 GB | sm_60 | no / no | sharing | Skip it |
gpu* means the three partitions gpu, gpu-short and gpu-interactive, which all draw from the same GPU nodes with different time limits. The system report guessed that c nodes are newer than d nodes. They aren’t: c2204 holds V100s and d4052 holds H200s. Node names are rack and purchase labels, so read the Gres= line instead of guessing from the name.
Click where you’d do each one. Some have two right answers, and the explanation says why.
Think about who else is sitting in that lobby.
Hundreds of people share it, and everything they type (editing, git, squeue) has to stay snappy. The Research Computing policy says jobs run on login nodes get terminated, and a watchdog enforces it by capping or killing heavy processes. Also, it has no GPU, so for ML it is slow even when it works. The fix is one command away: srun -p short --cpus-per-task=8 --mem=16G --time=02:00:00 --pty bash gives you a private CPU room in seconds.
Neither machine stores it. /home, /scratch and the rest live on a separate storage system (VAST, all-flash, at the MGHPCC data center in Holyoke) and every node mounts the same directories over the network. That is also why storage choices matter: every read is a network trip, so reading two million tiny files from /scratch each epoch is far slower than reading one big file, or copying the data to the node’s local disk first (chapter 15).
Explorer runs Rocky Linux 9 (a free rebuild of Red Hat Enterprise Linux). If you’ve used a Raspberry Pi, Ubuntu or a Mac terminal, most of what you know transfers, because Linux follows a shared map called the Filesystem Hierarchy Standard. There are no drive letters. Everything hangs off one tree that starts at / (“root”), and extra disks or network storage are mounted into that tree at some folder, so /scratch looks like an ordinary folder even though it is 2 petabytes of storage in another building.
The other big idea: everything is a file. Your GPU appears as /dev/nvidia0. Your CPU’s details are readable text at /proc/cpuinfo. Writing to /dev/null throws data away. Once you see that, the strange folder names stop being strange.
| Path | Size and rules | Backed up? | Put here | Never put here |
|---|---|---|---|---|
/home/$USER | 75 GB quota | Yes | Code, scripts, configs, conda envs, small results | Datasets, model weights, checkpoints |
/scratch/$USER | Huge and fast, but everything is deleted on the first Tuesday of every month | No | Downloaded weights, datasets, caches, checkpoints during a run | Anything you can’t recreate, including your conda env |
/projects/<group> | Requested by a faculty PI (up to 35 TB free) | Persistent | Long-lived data for a research group | — |
/datasets | Shared, read-only | — | Look here before downloading a public dataset | (you can’t write here) |
/shared | Community space | — | /shared/container_repository/explorer/ has ready-made container images | — |
/tmp on a compute node | The node’s own local disk | No, wiped after the job | Many small files you read over and over during one job | Results you need later |
The starter kit put your conda environments under /scratch to protect your home quota. On Explorer that means they vanish every month. Chapter 7 moves them to /home, where an ML environment of 6–12 GB fits comfortably inside 75 GB.
bin folder, and why are there so many of them?“bin” is short for binaries: programs you can run. /usr/bin holds the system’s programs (ls, python3, git). /usr/local/bin holds things an admin installed by hand. ~/.local/bin is your bin, where tools like Claude Code install themselves without root. When you load a module, its bin folder gets added to your search list (your PATH, chapter 4). Run which ls or which python to see which bin a command is coming from. On a modern distro, /bin is just a link to /usr/bin.
Almost exactly. /etc, /dev, /proc, /home, /usr/bin and the rest are all there. What differs: the Pi uses apt to install software and Explorer uses dnf (which you can’t run without root anyway); the Pi has an ARM CPU so compiled programs don’t move between the two; and only Explorer has the network mounts /scratch, /projects and /datasets. On the Pi, /dev also has GPIO pins (/dev/gpiochip0), which is the same “everything is a file” idea applied to wires.
Linux was built for many people sharing one machine, which is exactly what a cluster is. Every file has an owner (a user), a group, and nine permission bits that say what the owner, the group and everyone else may do. Run ls -l and you’ll see lines like this:
r means read, w means write, x means execute. For a folder the letters shift meaning: r lets you list its contents, w lets you create or delete files inside it, and x lets you enter it with cd. A folder with r but no x is a locked glass door: you can see the names but can’t open anything.
The digits people type come from adding up the letters: r = 4, w = 2, x = 1. So rwx = 7, r-x = 5, rw- = 6, --- = 0, and chmod 750 run.sh produces the line above. Click the boxes to build any combination.
sudo said noroot is the one user allowed to do anything: install system packages, read everyone’s files, reboot. sudo asks to act as root for one command, and it checks a list called sudoers. You’re not on it and never will be on a shared cluster, which is why you got “ahmed.mohammedr is not in the sudoers file. This incident will be reported.” The “report” is a log line for admins. Nobody is in trouble.
You don’t need root, because everything an ML engineer installs can live in folders you own: conda and pip environments in your home, programs in ~/.local/bin, software built from source with --prefix=$HOME/.local, and whole operating-system images through Apptainer containers (chapter 13). The one thing you truly can’t do is change the system: drivers, the kernel, /etc.
run.sh myself. Why does ./run.sh say “Permission denied”?New files are created without the execute bit, for safety. Either run it through the shell, bash run.sh (bash only needs to read it), or mark it runnable with chmod +x run.sh. The ./ matters too: Linux doesn’t look in the current folder for commands unless you say so, which stops a file named ls in someone’s folder from hijacking you.
A private key that other users can read isn’t private anymore, so OpenSSH refuses to use it rather than pretend. chmod 600 on the key and chmod 700 on ~/.ssh fixes it. On Windows the same rule exists, enforced through file properties instead of chmod.
chmod 777 my home so a classmate can read my code?You could, and then anyone on the cluster could also delete it. The better tools: share through Git, or ask your PI for a /projects space whose group you both belong to, then use chmod -R g+rX on just the folder you want to share.
The program reading your typing is bash. The prompt [ahmed.mohammedr@explorer-02 ~]$ is three facts: who you are, which machine you’re on, and which folder you’re in. When that middle part changes to d1028, you are on a GPU node. Glance at it before every command; it is the cheapest habit in this guide.
Bash keeps a set of named strings called environment variables. Programs read them to decide where to look for things. You set one with NAME=value (no spaces around =), read it with $NAME, and export it so programs you start can see it too.
PATH is the variable that explains most “command not found” errors. When you type nvcc, bash walks the folders in $PATH left to right and runs the first nvcc it finds. If none of the folders contain it, you get “command not found”, even if the program sits on disk somewhere else.
That is all a module is. Explorer has dozens of versions of CUDA, compilers and Python installed under a shared folder. module load cuda/12.8.0 doesn’t install anything; it prepends that version’s bin folder to PATH and its libraries to LD_LIBRARY_PATH. Toggle modules below and watch.
module load actually changesPATH, first match wins (paths are illustrative):
What these commands would print:
~/.bashrcEvery new interactive shell runs ~/.bashrc first. Put lines there that you want in every session: cache locations, aliases, small helper functions. Edit it with nano ~/.bashrc (Ctrl-O saves, Ctrl-X exits), then source ~/.bashrc to apply it to the shell you’re already in. source runs a file inside your current shell, so its variables stick; bash file.sh runs it in a child shell whose variables disappear when it exits.
conda activate work when I type it but fail inside an sbatch script?conda activate isn’t a program. It is a shell function that conda init wrote into your ~/.bashrc, and batch jobs run a non-interactive shell that may never read that file. Two reliable fixes inside scripts: source activate ml (an older entry point that is a real script), or eval "$(conda shell.bash hook)" followed by conda activate ml.
sbatch, does the job get the module?Usually yes: by default Slurm copies your whole environment at submit time into the job (--export=ALL). That is convenient and a trap. A job that works today because of something you happened to load breaks next week in a fresh terminal. Always write the module load lines inside the script so the script fully describes what it needs.
SSH (secure shell) is two programs talking over an encrypted connection: a client on your laptop and a server on the login node. MobaXterm, PowerShell’s ssh, and Cursor’s Remote-SSH are all just different SSH clients. Explorer’s address is login.explorer.northeastern.edu, which sends you to whichever login node is free (often explorer-02). The older discovery.neu.edu names in the starter kit come from the previous cluster.
A password plus Duo works, but every new connection (and Cursor opens several) asks again. An SSH key fixes that. It is a pair of files: a private key that never leaves your laptop, and a public key you copy to the cluster’s ~/.ssh/authorized_keys. The server sends a challenge only the private key can answer. Research Computing’s docs also say passwordless SSH is needed for some graphical apps to launch properly.
In MobaXterm, edit your session, open Advanced SSH settings, tick Use private key and point it at the same id_ed25519 file. MobaXterm’s left sidebar is also an SFTP file browser: drag files between your laptop and the cluster without any commands.
An SSH config file gives each connection a short name, so ssh explorer replaces the long command and Cursor lists your hosts in a menu. The second block uses ProxyJump: “to reach this GPU node, hop through the login node first.” That only works while you hold a running job on that node, and only if Explorer lets you SSH into nodes where you have a job (many Slurm clusters do; test with ssh d1028 from the login node while a job runs there).
.ssh/config.explorer.~/.cursor-server on the cluster and connects your editor to it. Open the folder /home/ahmed.mohammedr.sbatch and squeue. The file tree updates live as jobs write logs.Editing is light, but extensions that index your whole repo or run language servers on huge folders are not. Keep the opened folder small (not /scratch with a million files), and if the watchdog keeps killing it, connect Cursor to a compute node instead: start the “hold a node” job below, then connect to the explorer-gpu host from the config. Explorer’s web portal, Open OnDemand at ood.explorer.northeastern.edu, also launches JupyterLab and other apps on compute nodes for you, with no SSH config at all.
Compute nodes live on a private network. Your laptop can reach the login node; the login node can reach the compute nodes; your laptop cannot reach a compute node directly. An SSH tunnel chains the two: “anything sent to port 8000 on my laptop, carry it through my SSH connection and deliver it to port 8000 on d1028.” This is how you’ll open a vLLM server, Jupyter, TensorBoard or a Grafana dashboard in your laptop’s browser.
http://d1028:8000 in my browser?Your laptop has never heard of d1028. It is a name on the cluster’s internal network, which isn’t routed to the internet or even to campus Wi-Fi. Only machines inside the cluster can resolve and reach it. The tunnel works because the last hop (login node to d1028) happens inside.
Slurm is the front desk. You never pick a machine; you describe what you need, and Slurm decides where and when. No one approves individual jobs and it costs you nothing: Explorer is free to Northeastern students with a sponsor, and your access already exists. What limits you is policy (how many GPUs per job, how many hours) and priority (whose job goes next).
Every request is built from the same handful of words:
| Flag | Short | Means | Example |
|---|---|---|---|
--partition | -p | Which queue (a named group of nodes with its own rules) | -p gpu-short |
--gres | Generic resources: GPUs, as gpu:type:count | --gres=gpu:a100:1 | |
--constraint | -C | Only nodes tagged with this feature | --constraint=a100@80g |
--cpus-per-task | -c | CPU cores for your program (data loading lives here) | -c 8 |
--mem | System RAM for the job. Not GPU memory. Default is only 2 GB per CPU | --mem=64G | |
--time | -t | Wall-clock limit. The job is killed when it runs out | -t 01:30:00 or -t 90 |
--nodes, --ntasks | -N, -n | Machines, and separate processes. Leave at 1 until chapter 13 | -N 1 -n 1 |
--job-name, --output | -J, -o | Label, and where stdout goes. %j = job id, %x = name | -o logs/%x-%j.out |
| Command | What happens | Use it for |
|---|---|---|
srun ... --pty bash | Waits for a node, then your terminal becomes a shell on it. Close the terminal and the job ends. | Exploring, debugging, installing, “does this even run?” |
sbatch job.sbatch | Queues a script and returns immediately. The script runs unattended; output goes to a log file. | Anything real: training, sweeps, serving. Survives you closing your laptop. |
salloc ... | Reserves nodes and gives you back a login-node shell that “owns” them; you then srun or ssh into them. | Multi-step interactive work, holding a node for an editor. |
| Partition | Max time | GPUs per job | Running jobs | Notes |
|---|---|---|---|---|
short (default) | 48 h | CPU only | — | Preprocessing, installing, CPU jobs. Max 2 nodes per job |
gpu-interactive | 2 h | 1 | 2 | For srun --pty and Open OnDemand sessions |
gpu-short | 2 h | 1 | 2 | Higher priority than gpu: short jobs start sooner |
gpu | 8 h | 1 | up to 4 GPUs total | Real training runs |
multigpu | 24 h | up to 8 | — | Needs approval through a ServiceNow access request |
sharing | 1 h | varies | — | Low priority, but it’s where the H100, L40S, L40 and RTX 6000 live |
Research Computing’s docs say a request for more than one GPU on the gpu partition fails, and the GPU partition table lists a limit of 1 per job for gpu, gpu-short and gpu-interactive. The starter kit’s 4-GPU DDP job and the “4× A100” srun line would both be rejected. Limits do change, so treat this table as a snapshot and confirm with sinfo or scontrol show partition gpu.
Click any line with a + to open its explanation. This exact file is in the sandbox’s home folder as hello.sbatch, with one deliberate trap. Submit it in the terminal and see if you can work out what went wrong before reading the last note.
Describe a job and the builder writes the script or srun line, then checks it against Explorer’s rules. Try to make it fail: ask for 2 GPUs on gpu, 3 hours on gpu-short, or bf16 work on a V100.
| State | Meaning, and what to do |
|---|---|
PD pending | Waiting. The REASON column says why (right). |
R running | On a node. squeue shows which. |
CD completed | Exited with code 0. |
F failed | Non-zero exit: read the .err/.out file. No file at all? Check the output folder exists. |
TO timeout | Hit --time. Ask for more, or checkpoint and resume. |
OOM | Exceeded --mem (CPU RAM). Raise it. GPU memory errors look different: “CUDA out of memory” inside your log. |
CA cancelled | You, or an admin, ran scancel. |
| Pending reason | Translation |
|---|---|
Priority | Others are ahead of you. Wait, or ask for less. |
Resources | You’re next, but nothing that matches is free yet. |
QOSMax…, AssocGrp… | You hit a per-user limit (GPUs, running jobs). It starts when one of yours ends. |
ReqNodeNotAvail | Nodes reserved, often for maintenance. Shorter --time may fit before it. |
PartitionTimeLimit | Your --time exceeds the partition max. It will never start: cancel and resubmit. |
Dependency | Waiting for another job you chained it to. |
How priority works here. Explorer scores pending jobs with a weighted formula. The heaviest weight is fairshare: the less you’ve used recently, the higher you rank, and GPU time is weighted heavily in that accounting. Waiting time (age) adds a bit. Then the backfill scheduler slots small jobs into gaps: if a big job is waiting 50 minutes for 4 GPUs to free up, your 30-minute job can run in that window without delaying it. That is why a truthful --time is the single best queue trick.
No. Slurm sets CUDA_VISIBLE_DEVICES and uses Linux cgroups so your processes only see the GPU, CPU cores and memory you were given. nvidia-smi inside the job lists one GPU, and torch.cuda.device_count() returns 1. It also means asking for -c 8 and starting a DataLoader with 32 workers just makes 32 workers fight over 8 cores.
Slurm sends your program SIGTERM (a polite “please stop”), waits a short grace period (often 30 seconds), then SIGKILL, which can’t be caught. Code that catches SIGTERM can save a checkpoint in that window; train.py in chapter 8 does exactly that. For more warning, #SBATCH --signal=USR1@300 sends a signal 5 minutes before the limit.
Software on Explorer comes in three layers. The system layer (Rocky Linux, the GPU driver, /usr/bin) belongs to the admins. The module layer (CUDA toolkits, compilers, Miniconda) is shared software you switch on. The personal layer is yours: conda or uv environments with exactly the Python packages a project needs, or a whole container image.
Two decisions here matter more than they look. First, where the environment lives: /home, because /scratch is wiped monthly. Second, which PyTorch build you install, because the cluster spans GPU generations from 2016 to 2024 and current software is dropping the old ones.
PyTorch’s current CUDA 12.8+ builds no longer include kernels for the V100 (compute capability 7.0). The CUDA 12.6 builds still do, and PyTorch has announced that 2.14 is the last release to ship them. Recent vLLM releases have dropped the V100 entirely. So: if you want one environment that runs on every GPU in gpu*, install PyTorch from the cu126 index (that build also covers A100, H200 and, through compatibility, L40S). For vLLM, use A100, H200 or L40S and don’t bother with V100.
module load cuda?PyTorch’s pip wheels bundle the CUDA runtime libraries they need, and the GPU driver comes from the node. So plain PyTorch training needs no CUDA module at all. You need the module when you compile GPU code: nvcc for your own kernels, building a PyTorch C++/CUDA extension, or installing a package like flash-attn from source. That is why nvidia-smi can report “CUDA Version 12.x” while nvcc is “not found”: they are different pieces.
Run this inside a CPU job, not on the login node: pip resolving and unpacking several GB of wheels is exactly the kind of sustained load the watchdog kills. The login node and compute nodes share your home folder, so an environment built on a compute node works everywhere.
Prefer containers? Apptainer runs Docker images without root, and a container freezes the entire software stack so a result can be reproduced months later. Chapter 13 covers it; Research Computing also keeps ready-made images in /shared/container_repository/explorer/.
The CIFAR-10 project in the starter kit is the right first job, and not because of the model. A ResNet-18 that reaches about 94% accuracy in ten minutes is a known quantity, so if anything goes wrong the problem is your pipeline: data location, environment, logging, checkpointing. Get those right once and every later project reuses them.
The order of operations:
sbatch, squeue --me, tail -f.seff and right-size the next request.train.py that make it cluster-safeGPU utilization near 90–100% means the GPU is the bottleneck, which is what you want. Utilization bouncing between 0 and 100 means the GPU is starved, usually by too few DataLoader workers or slow file reads. seff reporting 10% memory efficiency means you asked for 10× the RAM you needed; next time ask for less and you’ll start sooner.
Change one thing at a time and predict before you look. Double --batch-size: does img/s rise, and does accuracy hold? Set -c 2: what happens to GPU utilization? Request --gres=gpu:h200:1: is it faster than an A100 for a model this small, or is something else the bottleneck? (Hint: a small ResNet often can’t keep an H200 busy.)
Serving an LLM has two phases with opposite personalities. Prefill reads the whole prompt at once: lots of math, done in parallel, and it determines time to first token (TTFT). Decode produces one token at a time: little math per step, but every step re-reads all the model’s weights and the cached attention keys and values from GPU memory, so it is limited by memory bandwidth. It determines inter-token latency (ITL).
The KV cache is the memory that stores those keys and values for every token of every active conversation. It is what fills up. vLLM’s PagedAttention stores it in small blocks so nothing is wasted, and continuous batching lets new requests join the running batch at every step. Together they explain the curve you’ll measure: throughput climbs as you add concurrent users, until the KV cache is full, after which new requests wait and TTFT shoots up.
You can predict where that knee is before running anything. Pick a model and a GPU:
KV bytes per token = 2 (K and V) × layers × KV heads × head size × bytes. The overhead slice is a flat 2 GB guess for activations and CUDA graphs; vLLM prints the real KV capacity at startup (“GPU KV cache size: … tokens”). Compare the two.
Decode reads all the weights once per step. How many users share that read?
One decode step for 1 user and for 32 users costs almost the same weight-reading time, because the weights are read once and applied to every sequence in the batch. So total tokens per second rises nearly linearly at first. Each step does get a bit slower (more KV cache to read, more math), so each individual user sees a higher ITL. Once the KV cache is full, extra users can’t join the batch at all and just queue, which is the TTFT cliff.
vLLM also exposes Prometheus metrics at /metrics (queue length, KV cache usage, token throughput). Through the same tunnel, a Prometheus and Grafana pair running in Docker on your laptop can scrape it, which gives you the observability piece of your portfolio project without touching the cluster’s rules.
Your portfolio plan is to serve an 8B model four ways (naive HuggingFace, vLLM BF16, FP8, INT4 AWQ) and measure TTFT, ITL, p95/p99 and VRAM from 1 to 64 concurrent users. Explorer adds a dimension most people can’t test: the same configs on two GPU generations.
| Config | A100 80 GB (sm_80) | H200 141 GB (sm_90) | What to look for |
|---|---|---|---|
HF generate() | Run it | Optional | The baseline with no continuous batching. The gap at concurrency 32 is the headline chart. |
| vLLM BF16 | Run it | Run it | Your reference curve on each GPU; the H200’s extra memory bandwidth shows up in ITL. |
| vLLM FP8 | Runs, but A100 has no FP8 math, so vLLM uses weight-only FP8 kernels | Native FP8 tensor cores | Same flag, different mechanism. Does FP8 speed up the A100 or only save memory? A finding worth a paragraph. |
| vLLM INT4 AWQ | Run it | Run it | Far smaller weights, so far more KV cache: watch where the knee moves. Check output quality too. |
Each config is one job on one GPU, which fits the 1-GPU limit perfectly. Make the model and quantization variables in the script and submit the whole grid as a job array (chapter 10 shows how).
You’re reproducing “Playing Devil’s Advocate: Off-the-Shelf Persona Vectors Rival Targeted Steering for Sycophancy” on a single model. Whatever the paper’s exact recipe (follow it for layers, prompts, scaling and metrics), the computational shape of activation steering is the same, and it maps onto the cluster cleanly.
A transformer passes a vector for each token from layer to layer (the residual stream). A steering vector is a direction in that space, often found by averaging activations on prompts that show a trait and subtracting the average on prompts that don’t. Steering adds α × v to the residual stream at some layer during generation. You don’t edit the model’s code to do this: PyTorch forward hooks let you intercept and modify any layer’s output from outside.
/scratch (chapter 9, step 1). In bf16 it is about 15 GB, so one A100 80 GB holds it with lots of room, and one GPU per job is all you need.gpushell a100 120, or JupyterLab on Open OnDemand with the Python (ml) kernel. Load the model, print model to find the layer list (model.model.layers for Qwen2), and test one hook by hand.A job array submits N copies of one script; each copy gets a different $SLURM_ARRAY_TASK_ID (0, 1, 2, …) and uses it to pick its settings. %2 caps how many run at once, which matters on gpu-short where you can only have two running jobs anyway. Edit the lists and click a cell to see how bash turns a task id into a layer and an α.
It’s your control: the same code path, the hook attached, adding nothing. If α = 0 doesn’t reproduce the unsteered model’s answers exactly, something else changed (a different prompt template, sampling turned on, a dtype difference) and none of the other cells can be trusted yet.
A CPU has a few dozen powerful cores that each run their own instruction stream. A GPU has thousands of simple lanes grouped into streaming multiprocessors (an A100 has 108 SMs), and lanes run in lock-step groups of 32 called warps. CUDA asks you to write one function, a kernel, and launch it on a grid of blocks, each block holding up to 1024 threads. Every thread runs the same code; the only thing that differs is its index, so each thread computes “which element is mine?” from blockIdx, blockDim and threadIdx.
Memory explains most performance. HBM (the 80 GB on an A100) is huge but far away; shared memory and registers inside each SM are tiny but fast. Many real kernels, like adding two arrays, do one addition per 12 bytes moved, so they are limited by memory bandwidth, not math. That’s why fusion (doing several operations while the data is already on-chip) is the idea behind FlashAttention, torch.compile and the starter kit’s fused GELU kernel.
Real launches use 128–256 threads per block. Colors are blocks; hatched cells are threads that exist but fail the if (i < n) test and do nothing.
-arch must match where the binary will run, or it fails with “no kernel image is available for execution on the device”. The CUDA 13 toolkits dropped Volta and Pascal targets, so for a V100 compile with cuda/12.x and -arch=sm_70. If nsys or ncu aren’t found after loading CUDA, try module load nvidia-hpc-sdk/24.7, which bundles the Nsight tools.
Next step after this: the starter kit’s custom_cuda_kernel.py, which compiles a fused scale + bias + GELU kernel into PyTorch with load_inline and benchmarks it against eager PyTorch (three separate kernels, three full trips to HBM). Run it on a GPU node with module load cuda/12.8.0 so nvcc is on the PATH. Predict the speedup from the memory traffic before you look.
NVIDIA publishes ready-built containers on NGC (nvcr.io): PyTorch builds tuned for their GPUs, NeMo for speech and LLM training, TensorRT-LLM for fast inference, Isaac Sim for robotics. Docker can’t run on the cluster (it needs a root daemon), but Apptainer converts these images into single .sif files you run as yourself. Pick a tag from NGC’s catalog page; tags look like 25.01-py3.
Vector add, then a naive matmul, then shared-memory tiling, then compare to cuBLAS. Plot achieved TFLOP/s against the GPU’s peak on V100, A100 and H200.
Write the same fused GELU in Triton (Python, ships with PyTorch) and compare it to the hand-written CUDA version. Triton is how most new inference kernels are written.
Serve the same Qwen model with NGC’s TensorRT-LLM container and your vLLM setup; run your benchmark against both. A strong inference-engineering portfolio piece.
NVIDIA’s open Nemotron models serve with vLLM like any HuggingFace model; NeMo’s Parakeet/Canary speech models run on one GPU for an ASR pipeline.
Compute nodes have no monitor and no desktop. Simulators therefore run headless: physics steps with no window, and if you want pictures, the GPU renders frames into memory (EGL offscreen rendering) that you save as images or video and watch on your laptop. Once you accept that, three tiers open up:
| Simulator | Runs on | Best for | Explorer notes |
|---|---|---|---|
| MuJoCo (+ Gymnasium) | CPU; GPU only for rendering | Classic control and RL, quick experiments | pip install into your env. Train on short, render on any GPU node |
| MuJoCo MJX / Playground | GPU (JAX) | Thousands of parallel robots for fast RL | Any A100/H200 in gpu* |
| Isaac Sim / Isaac Lab | RTX GPUs | Photoreal sensors, large scenes, NVIDIA’s robot stack | Needs ray-tracing cores: A100, H100 and H200 don’t have them. The L40, L40S and RTX cards are in sharing (1 hour, low priority). Run from the NGC container with Apptainer |
Next, train instead of flailing: stable-baselines3’s PPO on Humanoid-v5 as a batch job. Classic RL with small networks is mostly CPU-bound (the simulator, not the network, is the slow part), so -p short -c 16 for several hours is often a better fit than a GPU. GPUs pay off when the simulator itself runs on the GPU, which is the point of MJX and Isaac Lab.
Open OnDemand can start remote desktop sessions on compute nodes, if that app is offered on Explorer; check its Interactive Apps menu. It works for occasional inspection, but streaming a 3D view over the network is laggy, so the standard workflow stays headless: train in batch jobs, render a few evaluation episodes to video, and watch them locally.
Data-parallel training (PyTorch DDP) runs one process per GPU. Each process holds a full copy of the model, processes a different slice of each batch, and after backward() the processes all-reduce their gradients so every copy takes the identical step. On GPUs that exchange goes through NCCL over NVLink within a node and InfiniBand between nodes.
Since the general GPU partitions allow one GPU per job, real multi-GPU work needs the multigpu partition, which you request through a ServiceNow ticket (your faculty sponsor’s backing helps). You can learn every moving part now, though: the same code runs on CPUs with the gloo backend, four processes in one CPU job.
This is the same skill as Docker on Kubernetes, minus root. An image that runs your vLLM server under Apptainer here is the image you’d deploy to a K8s cluster later.
tmux new -s work, detach with Ctrl+b then d, reattach with tmux attach -t work. Your shells survive Wi-Fi drops. The session lives on that specific login node, so note whether you were on explorer-01 or explorer-02.
Scripts, configs and the analysis code all go in a repo. Add an SSH key on the cluster to GitHub (ssh-keygen there, paste the .pub into GitHub settings) and push from the login node.
If compute nodes can’t reach the internet, set WANDB_MODE=offline in the job and run wandb sync from the login node afterwards.
Running it on the login node got it killed, because its tool calls (installs, test runs) count against the watchdog. Start it inside a CPU job, srun -p short -c 4 --mem=16G -t 04:00:00 --pty bash, then claude. Test first that the compute node can reach the API: curl -sI https://api.anthropic.com | head -1.
The starter kit’s structure is good, and some of its code (the SIGTERM-safe training loop, the benchmark) is worth keeping as is. Checking it against Explorer’s published policies and current software turned up these problems, several of them from my earlier answers. Each one would have cost you a confusing failure.
| Where | Problem | Fix |
|---|---|---|
setup_env.sh | Conda envs live in /scratch/$USER/conda-envs, which is wiped on the first Tuesday of every month. | Keep envs in ~/.conda/envs (home, 75 GB, backed up). Only caches go to scratch. Chapter 7. |
setup_env.sh, gpushell | Installs the CUDA 12.8 PyTorch build, then defaults to V100s. Current cu128 builds have no V100 kernels. | Install from the cu126 index for V100 support, or default to A100. |
serve.sbatch | The V100 --dtype half branch assumes vLLM runs on V100; recent vLLM doesn’t support it at all. | Serve on A100, H200 or L40S. Rewritten in chapter 9, with an API key and a collision-free port. |
every .sbatch | --output=logs/... with mkdir -p logs inside the script. Slurm needs the folder before the script starts, so the first run fails with no log. | mkdir -p logs before sbatch, or write logs to the submit folder. |
train_ddp.sbatch, interactive_gpu.sh | Requests 4 GPUs on gpu / gpu-interactive, where the limit is 1 per job. | Request multigpu access; meanwhile learn DDP on CPUs (chapter 13). |
bashrc_additions.sh | gpushell a100 4 asks gpu-interactive for 4 hours (max is 2); 0${hours}:00:00 breaks at 10+ hours. | Take minutes, default 60 (chapter 4). |
sweep.sbatch | %3 throttle on gpu-short, where only 2 of your jobs run at once. | %2, or move the sweep to gpu. |
upload.sh, tunnel.sh | Host explorer-02.discovery.neu.edu is the old cluster’s naming; rsync isn’t on Windows by default. | Use login.explorer.northeastern.edu (or the explorer alias). On Windows use MobaXterm’s SFTP panel, scp, or WSL. |
install_claude_code.sh | Suggests running Claude Code on the login node. | Run it inside an srun -p short job (chapter 13). |
| System report | Says c nodes are newer A100/H100 class. | Read Gres= per node; names don’t encode generation. |
sinfo -p gpu -t idle -N -o "%N %G" lists idle nodes and their GPU types. Ask for a type that is idle right now and you skip the queue.
squeue --me --start prints the scheduler’s current estimate. If it says tomorrow, shorten --time or loosen the GPU type.
Backfill can only slot jobs whose limit fits in a gap. A 40-minute job asking for 8 hours waits like an 8-hour job.
--gres=gpu:1 starts sooner than --gres=gpu:h200:1. Pin a type only when the experiment needs it (bf16, memory, a hardware comparison).
srun --jobid=<id> --overlap --pty bash, then nvidia-smi or top. The cheapest way to see whether your GPU is actually busy.
seff <id> after every new kind of job. Smaller honest requests start sooner and cost less fairshare.
Keep datasets of many small files as one .tar on scratch, and at job start tar -xf … -C /tmp/$SLURM_JOB_ID. Reading from local disk avoids millions of network file opens.
#SBATCH --signal=USR1@300 plus a Python handler that saves a checkpoint gives you five minutes’ notice instead of thirty seconds.
#SBATCH --mail-type=END,FAIL and #SBATCH --mail-user= your Northeastern address. Stop refreshing squeue.
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK in jobs. NumPy and PyTorch otherwise start one thread per core on the node and fight inside your cgroup.
ln -s /scratch/$USER ~/scratch once, and scratch is one cd away and visible in Cursor’s file tree.
Results get copied home as part of the job: end scripts with rsync -a results/ ~/results/. Monthly purges then cost nothing.
sacct -S now-7days --format=JobID,JobName%20,State,Elapsed,MaxRSS,ReqTRES%40: what ran, how long, and peak memory.
HF_HUB_OFFLINE=1 and TRANSFORMERS_OFFLINE=1 in every job script, after downloading on the login node.
Type each command from memory. Flag order doesn’t matter and short or long forms both count. Stuck? Scroll up rather than revealing the answer: finding it is the part that makes it stick.
No and no. Your Explorer account already lets you submit to the general partitions, free. Limits are per-user policies (GPUs per job, running jobs, hours), and heavy use lowers your priority for a while through fairshare. multigpu and PI-owned partitions need an approval request.
Run work on login nodes, use the cluster for anything other than Northeastern research or coursework, share your account, or leave reserved GPUs idle. Breaking the rules can get an account suspended, so when unsure, email rchelp@northeastern.edu.
A watchdog limits each user’s CPU and memory on login nodes and kills sustained heavy processes. pip installs, unpacking archives, model loading, Claude Code running tests and VS Code/Cursor language servers on large folders are the usual victims. Move the work into srun -p short.
Usually only while you have a job running on it, and only from inside the cluster. Test it: start a job, see its node in squeue, and run ssh d1028 from the login node. If that works, the ProxyJump config in chapter 5 works too.
Don’t assume either way: test once from inside a job with curl -sI https://huggingface.co | head -1. Whatever the answer, downloading on the login node and running jobs offline is the reliable pattern.
A node is one physical server. A socket is one CPU chip on it (Explorer’s login node has two). A core is an independent processor on the chip (24 per socket there). A hardware thread is one of two instruction streams a core can interleave (hyper-threading), which is why that node reports 96 “CPUs”. In Slurm, --cpus-per-task counts these logical CPUs.
Usually hidden caches. du -sh ~/.[!.]* ~/* | sort -h | tail shows the biggest items; the culprits are ~/.cache/pip, ~/.cache/huggingface, ~/.conda/pkgs and old environments. Delete the caches (they rebuild) and point them at scratch with the .bashrc lines in chapter 4.
Files on /scratch are deleted on the first Tuesday of each month during maintenance, and RC posts reminders on its status page. Jobs don’t run during the maintenance window either. Anything you need goes to home or a projects space beforehand; anything re-downloadable can stay and be fetched again.
/dev/null and 2>&1?/dev/null is a file that discards anything written to it. Programs have two output streams: 1 (stdout, normal output) and 2 (stderr, errors). 2>&1 means “send stream 2 wherever stream 1 is going”, so cmd > log 2>&1 captures both in one file.
source script.sh or bash script.sh?bash runs the script in a new child shell; its variables and cds vanish when it ends. source runs it in your current shell, so changes persist. Use source for things meant to change your session (~/.bashrc, activating environments) and bash for everything else.
“CUDA out of memory” is a Python error: your model or batch didn’t fit in GPU memory. Lower the batch size, use bf16, or use gradient checkpointing. OUT_OF_MEMORY in sacct means the job used more system RAM than --mem and the kernel killed it: raise --mem.
Only if the CPU is the bottleneck, usually data loading and augmentation. Watch GPU utilization: if it’s already near 100%, more CPUs do nothing except make you wait longer for a node with them free.
--ntasks versus --cpus-per-task?A task is a separate process (an MPI rank, or one srun launch). CPUs-per-task is how many cores each process may use for its threads. A single Python training script is one task with several CPUs. Multi-node DDP uses one task per node, each running torchrun.
Interactive GPU sessions end at 2 hours, and an idle reserved GPU blocks someone else. Explore in short sessions, then move anything long into a batch script; notebooks are for poking, scripts are for running.
For inference in bf16, roughly 2 GB per billion parameters plus room for the KV cache: a 7–8B model is comfortable on an A100 80 GB, 14B fits, 32B needs FP8 or INT4 or an H200. Use the calculator in chapter 9. Full fine-tuning needs several times more (gradients and optimizer state), which is why LoRA and QLoRA exist.
Docker runs a background service as root, and any user who controls it effectively has root on the machine. Apptainer runs containers as you, with your normal permissions, and reads Docker images directly. Same images, safe model.
Sandbox missions, then SSH key and config, then the environment build, then the GPU sanity check, then CIFAR end to end. After that, split by goal: chapter 10 for your paper, chapter 9 for the inference portfolio, chapter 11 for CUDA. Each later chapter assumes only chapters 1–8.
Research Computing’s documentation at rc-docs.northeastern.edu and the partitions page at rc.northeastern.edu/partitions are the sources of truth when anything here disagrees with the cluster. Help: rchelp@northeastern.edu, or book a consultation.