Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

hpc

БесплатноЗапускает вложенные скриптыНе проверен

Use when submitting jobs to UVA HPC (Rivanna/Afton), writing Slurm scripts (sbatch/srun/squeue), converting SGE to Slurm, running compute on any Slurm-managed…

edwinhuот edwinhu★ 28 звёзд на GitHub

Об этом скилле

What this skill carries — grep references/ for any subject the names below miss: !d=${CLAUDE_SKILL_DIR}; command -v skill-toc >/dev/null 2>&1 && exec skill-toc "$d"; s=$HOME/.claude/skills/plugin-utils/bin/skill-toc; [ -x "$s" ] && exec "$s" "$d"; echo "(skill-toc unavailable: references and scripts are NOT listed here — install the plugin-utils plugin, or start a new session so its bin/ reaches PATH)"

Contents

When to Use What

Three compute environments, each with a clear role:

Environment Use For Examples
Local / RJDS Exploration, prototyping, notebooks EDA, quick plots, marimo/Jupyter, test on small samples, iterate on code
WRDS (SGE) Data access, SAS ETL, file parsing SAS jobs against WRDS libraries, SEC filing parsers on /wrds/sec/, scan_covers, ad-hoc SQL
UVA HPC (Slurm) Scale compute Model estimation (PIN), large polars pipelines, anything needing >10 cores or >1 hour

The Workflow

1. EXPLORE (local/RJDS)     →  Prototype code, test on 5-10 items
2. BUILD DATA (WRDS)        →  SAS ETL or PostgreSQL queries (data lives there)
3. ESTIMATE AT SCALE (HPC)  →  sbatch when you need 100+ cores
4. ANALYZE RESULTS (local)  →  Pull results back, notebooks, regressions, tables

Decision Rules

  • Does it need WRDS filesystem access? (/wrds/sec/, SAS libraries) → WRDS
  • Is it CPU-intensive and embarrassingly parallel? → HPC
  • Is it exploratory or iterative? → Local / RJDS
  • Is it a quick SQL query? → Either WRDS or HPC (both have PostgreSQL access)

HPC Interactive Partition

The interactive partition (42 nodes, 12h max) is for testing sbatch scripts on one chunk before submitting 176 tasks, not for replacing local dev work:

salloc -p interactive --cpus-per-task=4 --mem=16G --time=1:00:00
# test your script, then exit and sbatch the real job

Why This Split Matters

PIN estimation proved it: WRDS SGE has 10 concurrent slots and took 8+ hours without starting OWR. UVA HPC ran 70+ OWR tasks simultaneously and finished in 30 minutes. But WRDS is still the right place to build the data — the SAS libraries and SEC filings live there.

Login Node Enforcement

IRON LAW: NEVER RUN COMPUTE ON THE LOGIN NODE

The login node is shared infrastructure. Running estimation, bulk processing, or any CPU-intensive work directly via SSH will get the account flagged and the process killed.

ALWAYS write a Slurm submission script and submit via sbatch. No exceptions.

  • ssh uva-hpc 'python3 est.py owr 2020' → WRONG. Use sbatch.
  • ssh uva-hpc 'nohup ./process &' → WRONG. Still the login node. Use sbatch.
  • ssh uva-hpc 'for year in 2003..2024; do python3 ...; done' → WRONG. Use sbatch --array.
  • sbatch run_est.sh owr → CORRECT.

The login node is for: sbatch, squeue, scancel, sinfo, scp, ls, head, short queries.

Login Node Facts

  • Tests go through the scheduler too: write the sbatch script first and test with --array=1-1. The login-node "quick test" is the run that flags the account — one stock becomes 5,000 when the args change, and you don't know it "only takes 30 seconds" until it runs.

Red Flags — STOP If You're About To

  • Write ssh uva-hpc 'python3 ... > output' → STOP. Write a submit script.
  • Write ssh uva-hpc 'nohup ... &' → STOP. Use sbatch.
  • Run a loop over years/permnos interactively → STOP. Use --array.

Cluster Reference

UVA HPC (Rivanna/Afton)

  • SSH: ssh uva-hpc (configured with ProxyJump through Mac via tailnet)
  • User: vwh7mb
  • Home: /home/vwh7mb (GPFS, 12PB shared, no per-user quota displayed)
  • Scratch: /scratch/vwh7mb/ (Weka, 12TB)
  • Allocation: 10M SUs (service units ≈ weighted CPU-core-hours)

Partitions

Partition Nodes CPUs/Node RAM/Node MaxTime MinNodes MaxNodes Use For
standard 301 40+ 384GB+ 7 days 0 1 Single-node jobs, array tasks
parallel 179 96 768GB 3 days 2 64 Multi-node MPI jobs only
gpu 44 36+ 257GB+ 3 days — — GPU workloads
interactive 42 32+ 128GB+ 12 hrs — — Interactive/debugging

CRITICAL: Partition Selection

**Use `standard` for embarrassingly parallel array jobs** (PIN estimation, file processing, per-year/per-stock
Полный SKILL.md на GitHub

Установить hpc в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/array_job_filelist.shexamples/array_job_year_chunk.shexamples/wrds_conn.pyreferences/sge-to-slurm.mdreferences/wrds-polars-pipeline.md

FAQ

Что делает скилл hpc?

Use when submitting jobs to UVA HPC (Rivanna/Afton), writing Slurm scripts (sbatch/srun/squeue), converting SGE to Slurm, running compute on any Slurm-managed cluster, or building WRDS data pipelines with polars on HPC. Triggers: 'submit to HPC', 'sbatch', 'squeue', 'slurm job', 'run on Rivanna', 'run on Afton', 'HPC array job', 'convert SGE to Slurm', 'polars on HPC', 'WRDS from HPC'.

Как установить скилл hpc?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл hpc запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить hpc с