agentleFS
AI-ModConAI-ModCon/genesis-skills/skills/hpc-skills/perlmutter/SKILL.md

perlmutter

Skill30 starsChanged 50 days agoBSD-2-ClauseView on GitHub

NERSC Perlmutter supercomputer (Lawrence Berkeley National Lab). Use when submitting Slurm jobs on Perlmutter, choosing CPU vs GPU node types (-C cpu or -C gpu), selecting QOS tiers (debug, regular, premium, preempt, shared), checking NERSC allocations with the iris command or iris.nersc.gov, working with scratch storage ($SCRATCH/$PSCRATCH), loading modules, or writing job scripts for Perlmutter's NVIDIA A100 GPU nodes or AMD Milan CPU nodes.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always write job output to $SCRATCH, not $HOME.

    line 130
  2. Very specific:

    Write to $HOME instead of $SCRATCH → quota exceeded, job fails

    line 164
  3. Very specific:

    Not setting SLURM_CPU_BIND=cores on GPU nodes → suboptimal CPU affinity

    line 166

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Perlmutter — NERSC Supercomputer

Perlmutter is NERSC's GPU-accelerated Cray EX system at Lawrence Berkeley National Laboratory. It uses Slurm as its workload manager.

System Overview

ComponentSpecification
CPU nodes3,072 × 2× AMD EPYC 7763 "Milan" (128 cores/node, 512 GB RAM)
GPU nodes1,792 × 1× AMD Milan + 4× NVIDIA A100 40 GB (256 GB RAM)
NetworkHPE Slingshot-11, 3-hop dragonfly
Scratch44 PB Lustre (all-flash, >6 TB/s)

Critical Requirements

Every Perlmutter job MUST include -A <account> and -C cpu or -C gpu. Jobs without these will fail or target the wrong node type.

#SBATCH -A myproject       # your NERSC project name (required)
#SBATCH -C gpu             # or -C cpu (required)

Partitions and QOS

QOSMax walltimeMax nodesSU costNotes
debug30 min8 (GPU), 8 (CPU)1×Fast start; use for testing
regular12 hr256 (GPU), 512 (CPU)1×Standard production
premium24 hrsame as regular2×Higher priority
preempt48 hrlarger0.25× (GPU) / 0.5× (CPU)Discounted; may be preempted
shared12 hr—fractionalPartial node, billed per resource

Big job discount: jobs using ≥128 GPU nodes or ≥256 CPU nodes are charged at 50% SU rate.

Specify with --qos=<name>, e.g. #SBATCH --qos=debug.

Quick Slurm Reference

sbatch script.sh                   # submit
squeue -u $USER                    # your jobs
squeue -j 12345 --start            # estimated start time
scontrol show job 12345            # full detail
scancel 12345                      # cancel
sacct -j 12345 --format=JobID,State,Elapsed,MaxRSS,ExitCode
salloc -N1 -C gpu --qos=debug -t 30:00 -A myproject   # interactive

Job state codes: PD=Pending, R=Running, CD=Completed, CA=Cancelled, F=Failed, TO=Timeout

Minimal Job Script — GPU

#!/bin/bash
#SBATCH -A myproject
#SBATCH -C gpu
#SBATCH -q regular
#SBATCH -N 1
#SBATCH --ntasks-per-node=4
#SBATCH --gpus-per-task=1
#SBATCH -c 32                    # CPU cores per task (128 cores / 4 tasks)
#SBATCH -t 2:00:00
#SBATCH -o job_%j.out
#SBATCH -e job_%j.err

module load cudatoolkit
export SLURM_CPU_BIND="cores"
srun ./my_gpu_app

Minimal Job Script — CPU

#!/bin/bash
#SBATCH -A myproject
#SBATCH -C cpu
#SBATCH -q regular
#SBATCH -N 4
#SBATCH --ntasks-per-node=128
#SBATCH -t 4:00:00
#SBATCH -o job_%j.out

module load PrgEnv-gnu cray-mpich
srun ./my_mpi_app

Checking Allocations

# CLI (run on any Perlmutter login node)
iris                          # summary of your projects
iris hours                    # CPU/GPU hours used vs. allocated
iris jobs                     # recent job history with charges
iris jobs --project myproject # filter by project

# Web
# https://iris.nersc.gov  — "My Account" tab shows remaining balance

Storage

FilesystemPathQuotaPurge policyUse for
$HOME/global/homes/u/user40 GBNoneCode, configs
$SCRATCH / $PSCRATCH/pscratch/sd/u/user20 TB8-week auto-purgeJob I/O
$CFS/global/cfs/cdirs/<proj>variesNoneLong-term project data
$TMPDIRnode-local~200 GBJob lifetimeFast temporary scratch

Warning: Files in $SCRATCH not accessed for 8 weeks are automatically deleted without notice. Always check ages with lfs find $SCRATCH --atime +56 -maxdepth 2.

Always write job output to $SCRATCH, not $HOME.

Modules

module avail                      # list available modules
module spider <pkg>               # search for a package
module load PrgEnv-gnu            # GCC-based Cray PE
module load cudatoolkit           # NVIDIA CUDA for GPU nodes
module load cray-mpich            # Cray MPI library
module list                       # show what's loaded
module purge                      # unload everything

Cray compiler wrappers (cc, CC, ftn) link the correct MPI and libraries automatically when the appropriate PrgEnv module is loaded.

Interactive Jobs

# GPU interactive session (debug QOS, 30 min)
salloc -N 1 -C gpu --qos=debug -t 30:00 -A myproject \
  --ntasks-per-node=4 --gpus-per-task=1 -c 32

# CPU interactive session
salloc -N 2 -C cpu --qos=debug -t 30:00 -A myproject \
  --ntasks-per-node=128

# Once inside, run steps with srun
srun -n 4 --gpus-per-task=1 ./my_app

Common Gotchas

  • Forget -C cpu/-C gpu → job may queue indefinitely or hit wrong partition
  • Write to $HOME instead of $SCRATCH → quota exceeded, job fails
  • $SCRATCH files older than 8 weeks → silently deleted
  • Not setting SLURM_CPU_BIND=cores on GPU nodes → suboptimal CPU affinity
  • Using wrong account name → charges wrong allocation or job rejected

Additional Resources

  • Annotated job script examples: references/job-scripts.md
  • Storage details, Lustre striping, HPSS archiving: references/storage.md
  • Allocation system, iris, ERCAP, sacct: references/allocations.md
  • NERSC docs: https://docs.nersc.gov/

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.