Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/small_molecule_binding/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
| 2026-10-06 | — | **Runner failures now reach Slurm (BACKLOG 12); 32-pipeline scale gate submitted.** `dragon -w ssh` exits 0 even when the runner dies with a traceback, so `set -e` never fired and job `22692267` was recorded `COMPLETED`. The first diagnosis, that the final `echo` masked the status, was wrong. `run_small_molecule_binding.py` now writes `ok` or `failed: <exc>` to `<work_dir>/runner_status` at exit. `delta_gpu_run.sh` deletes any old status file before the run, prints the status in the done banner, and exits 1 unless it reads `ok`. A missing file fails for the default runner and only warns for the others. A wall-clock `TIMEOUT` kill never reaches that check, so such jobs still show `TIMEOUT`. Tested offline: the real runner with a forced `ValueError` wrote `failed: ...` and exited 1, and the launcher check returned the right exit code in all 5 cases. Not yet seen on Delta. **Scale gate:** job `22701168` (8 nodes / 32 pipelines / 4 h, account `<allocation A>`) was submitted 09:00 and was queued at the end of the session. Plan and pass criteria are in `plans/2026-10-06-scale-gate.md`; the follow-up is BACKLOG 13. Queue note: `--test-only` estimated Oct 25 on `<allocation B>` (lower fairshare) against Oct 8 on `<allocation A>` (higher fairshare), and the real estimate on `<allocation A>` was the same morning |
| 2026-10-06 | — | **32-pipeline scale gate passed (`22701168`); BACKLOG 1, 6, 10 and 13 closed.** 8 nodes / 32 pipelines / 4 h on gpub[073-080] (primary gpub075), `TIMEOUT` 04:00:08, 0 task failures, tracebacks or OOM. **Throughput:** rfd3/pipeline/h by hour 15.16 / 16.22 / 16.28 / 15.19, 15.71 overall, which is 1.37× the 11.46 baseline. This is the same configuration that collapsed to ~4 after hour 2 on `22534628`, and here it held flat. **Adaptive callback:** 0.96 % of wall clock, p99 0.071 s (13,074 calls), against 67.1 % / 56.0 s on `22534628`. **GPUs:** all 32 used at 9.4–15.3 % mean, no decay. Per node they sum to only ~45–55 %. **Science:** 871 folds, 802 passed (92.1 %), so 0.160 GPU-h per passing fold (baseline 0.194; `22534628` 0.666). **Primary CPU:** 62.7 % against ~47 % on the other nodes; it has headroom. Spare GPU and primary capacity point to more than one pipeline per GPU as the next throughput lever; untested. The scale-gate doc's fold criterion had inverted units (0.194 is GPU-h per passing fold) and is corrected. Not exercised: the `runner_status` launcher check (`TIMEOUT` kills before it) and the teardown hang (item 2). Details: `plans/2026-10-06-scale-gate.md` |
| 2026-10-07 | — | **GPU saturation ladder: GPUs saturate at ~8 pipelines per GPU; staggered start and GPU logger added.** 1-node, 1-hour rungs at 2/4/6/8 pipelines per GPU (`22716150`, `22714866`, `22717753`, `22718758`). rfd3 per node-hour went 57.8 (k=1) → 104.6 → 183.3 → 255.8 → **315.5**, a 5.5× gain; boltz went 18.3 → **94.3**. At k=8 the GPUs were at 100 % for 55–63 % of the time (mean 74 %), and the rfd3 median rose 74 → 110 s. CPU (68 %), host RAM (62 %) and GPU memory (32 of 48 GB) all had room, so the GPU is the limit. Cost was ~0.048 GPU-h per passing fold, against 0.160 at k=1. **Staggered start:** each running rfd3 holds ~9.5 GB of host RAM, so 32 pipelines starting at once OOM-killed the node in 2 min (`22714785`). The runner now delays pipeline N by `((N-1)//slots)*60` s, where `slots` = GPUs × nodes; this is 0 at one pipeline per GPU. `run()` sleeps that long before its first stage. **GPU logger:** `delta_gpu_run.sh` writes `nvidia-smi` utilization and memory every 10 s to `${IMPRESS_WORK_DIR}/nvsmi.csv`, batch node only. New BACKLOG items: 14 (host RAM per rfd3), 15 (a failed stage kills the pipeline), 16 (rfd3 reported failed after writing outputs), 17 (make the operating point the default; restate the gate per node). Details: `plans/2026-10-07-gpu-saturation.md` |
| 2026-10-08 | — | **8-node, 8-per-GPU follow-up (`22726386`) failed on the shared inode quota; run storage planned (BACKLOG 18–21).** 256 pipelines on 8 nodes: 245 failed. 59 tasks hit CUDA OOM during the staggered ramp (03:06–03:13); 174 hit `Errno 122 Disk quota exceeded` (03:36–03:39) because the `<allocation A>` project's inode count (shared by its `/work/nvme` and `/work/hdd` dirs) was over its 2.55M soft limit. The runner then idled to the `TIMEOUT` (~27 node-h, no `runner_status`). All 13 surviving run dirs were packed one tarball per job into `<hdd work dir>/impress_run_archive/` (tracker `RUNS.md` there, which records each job's work-dir partition) and removed, cutting the project to ~1.66M inodes. About 90% of run bytes are mpnn `packed/`/`backbones/` PDBs of which only `best_packed_pdb` is read. Details: [gpu-saturation](plans/2026-10-07-gpu-saturation.md) (Result section), [run-storage-footprint](plans/2026-10-08-run-storage-footprint.md). |

## Context

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GPU saturation: pipelines-per-GPU ladder, staggered start, GPU logger

**Status:** ladder done (2026-10-06/07). The GPUs saturate at about **8 pipelines per GPU**. The 8-node production-scale follow-up is job `22747xxx` (see the end of this doc).
**Status:** ladder done (2026-10-06/07). The GPUs saturate at about **8 pipelines per GPU**. The 8-node production-scale follow-up, job `22726386`, **failed**: 245 of 256 pipelines died, most of them on the project's inode quota (see the end of this doc).
**Evidence:** jobs `22714785`, `22714866`, `22716150`, `22717753`, `22718758`; reference `22692293`.

## Why
Expand Down Expand Up @@ -80,3 +80,22 @@ Production-scale check of the operating point:
- **Dragon's worker pool:** 32 per node × 8 = 256, exactly one per pipeline.
- **The primary:** it carries all 256 pipelines' in-process analysis and adaptive work. That projects to ~8 % of the event loop each.
- **nvsmi:** logs only the batch node.

### Result: `22726386` failed on the inode quota, then hung (recorded 2026-10-08)

Run from this checkout while it was still on `scaling-wide`. The checkout has since moved to `main`, which now contains the `scaling-wide` work (PR #70).

- **Ran** 02:59–06:59 on 2026-10-08: 8 nodes, `TIMEOUT` at 04:00:19. The log goes silent at about 03:39. The runner never wrote `runner_status`, so the job held all 8 nodes for about 3 h 20 min doing nothing (about 27 node-hours).
- **245 of 256 pipelines failed**, from 234 task failures:

| When | Cause | Tasks |
|---|---|---|
| 03:06–03:13 (ramp) | CUDA OOM / `CUBLAS_STATUS_ALLOC_FAILED`: rfd3, boltz, mpnn on a GPU already holding several models | 59 |
| 03:36–03:39 | `OSError: [Errno 122] Disk quota exceeded` writing under `logs/22726386/` | 174 |
| – | other | 1 |

- **The quota hit was on inodes, not bytes.** On 2026-10-08 the `<allocation A>` project held about 2.77M files against a 2.55M soft and 2.805M hard limit (`quota`). The count is shared by its `/work/nvme` and `/work/hdd` directories. The run dirs in the nvme checkout alone held about 1.03M files. One 8-node, 4 h run writes about 230k files, 90% of the bytes in mpnn `packed/` and `backbones/` PDBs.
- **The ramp OOMs** show that 8 pipelines per GPU with the 7-minute stagger still overcommits GPU memory on some GPUs. That is consistent with the "Dragon placement" risk above. The ladder rungs ran on one node and never saw it.
- **Next:** before any rerun, free inodes (done 2026-10-08: the run dirs were archived to `<hdd work dir>/impress_run_archive/`, and the inode count is now about 1.66M). Then land BACKLOG 18–21 ([run-storage-footprint](2026-10-08-run-storage-footprint.md)): keep only the selected mpnn PDBs, pack each job's dir when it ends, exit when every pipeline has failed, and keep each job's files in one dir.

Evidence: `impress_run_archive/22726386_nvme.tar.gz` (the `.out`, the `asyncflow.session.94bf7d31/task.*.stderr` files and `nvsmi.csv`).
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Run storage footprint: mpnn PDB retention, per-job packing, all-failed exit, self-contained job dirs

**Severity:** high (a run was killed by it) · **Status:** open, design only · **BACKLOG:** 18–21
**Evidence:** job `22726386` (8 nodes, 256 pipelines, 2026-10-08). Inventory of 13 run dirs, 2026-10-08:
`22669434`, `22670942`, `22675825`, `22684833`, `22692267`, `22692293`, `22701168`, `22714785`, `22714866`,
`22716150`, `22717753`, `22718758`, `22726386`. Archived per job at `<hdd work dir>/impress_run_archive/`.

## Why

`22726386` lost 174 of its 234 failed tasks to `OSError: [Errno 122] Disk quota exceeded` between 03:36 and 03:39.
The limit was the `<allocation A>` project's **inode** quota, which `/work/nvme` and `/work/hdd` share
(about 2.77M files against a 2.55M soft and 2.805M hard limit). The run dirs alone held about 1.1M inodes.

What a run writes (sizes are apparent bytes):

| Job | Shape | Files | Bytes | mpnn `packed/` | mpnn `backbones/` |
|---|---|---|---|---|---|
| `22701168` | 8 nodes, 32 pipelines, 4 h | 383k | 20.3 GB | 11.6 GB | 6.5 GB |
| `22726386` | 8 nodes, 256 pipelines, died at ~40 min | 227k | 12.5 GB | 7.0 GB | 3.9 GB |
| `22718758` | 1 node, 32 pipelines, 1 h | 59k | 3.2 GB | 1.8 GB | 1.0 GB |
| `22670942` | 2 nodes, 8 pipelines, 1 h | 21k | 1.1 GB | 0.65 GB | 0.37 GB |

About 90% of the bytes and most of the files are LigandMPNN's per-candidate PDBs. In `22670942`, `packed/` and
`backbones/` each held 8,628 files from 337 mpnn tasks, about 26 per task each. But
`SmallMoleculeBindingPipeline` reads exactly one of them afterwards:
`self.state['best_packed_pdb'] = f"{out_dir}/packed/binder_packed_{best_id}_1.pdb"` (`small_molecule_binding.py`, mpnn
selection). The `seqs/*.fa` files (2 MB in total) hold every candidate's sequence and confidences.

## Items

### 18 — Keep only the selected mpnn candidate's PDBs
After the selection loop picks `best_id`, delete the other `packed/binder_packed_*_*.pdb` and
`backbones/*.pdb` in that task's `out_dir`. Keep `seqs/` intact, since it records every candidate.
Put this behind a flag (`keep_all_mpnn_pdbs`, default `False`) so a debugging run can keep everything.
Expected effect: about −25 files per mpnn task, and roughly −85% of a run's bytes.
**Test:** a 1-node run, then count `find logs/<job> -type f`. Packmin and fastrelax must still read `best_packed_pdb`.

### 19 — Pack the job's work dir when the job ends
At the end of `delta_gpu_run.sh`, after the runner has exited (on success or failure), run
`tar -I 'pigz -p 8' -cf ${IMPRESS_WORK_DIR}.tar.gz -C $(dirname $IMPRESS_WORK_DIR) $(basename $IMPRESS_WORK_DIR)`.
Then compare the archive's file count with `find`, and only then remove the dir. Skip this when
`IMPRESS_KEEP_WORK_DIR=1`. For scale, packing `22701168` (383k files) took about 30 min on a login node with
pigz -p 8, and the job was I/O-bound. Inside the allocation it is faster, but it spends GPU-node time, so
consider using `--signal` to start it before the wall limit.

### 20 — Exit when every pipeline has failed
After its last pipeline failed at about 03:39, `22726386` held 8 nodes until the 06:59 `TIMEOUT` (about 27
node-hours). It never wrote `runner_status`, so the runner did not return. Two candidate causes:
- the manager keeps waiting after the last pipeline fails;
- the Dragon teardown hangs (BACKLOG 2).

Fix: when the live-pipeline count reaches 0, the manager returns. The runner then writes `runner_status`
(`failed: all N pipelines failed`) and calls `flow.shutdown()` under the BACKLOG 2 watchdog.
**Test:** a mock run (`mock.py`) whose every pipeline raises must exit in well under a minute.

### 21 — Make each job dir self-contained
Today these land in the submit dir, not in `IMPRESS_WORK_DIR`:
- `#SBATCH --output=impress_%j.out`;
- asyncflow's `asyncflow.session.<id>/` (per-task stdout/stderr, 16k files and 427 MB for `22726386`);
- `ddict_orc_*`.

So a job's evidence is split across three places, and stray session dirs pile up (12 in one checkout).
Point all three into `${IMPRESS_WORK_DIR}`: `--output` via a wrapper or `-o` at submit; the session dir via
asyncflow's working-directory setting or by `cd ${IMPRESS_WORK_DIR}` before launch. Item 19 then packs one directory.

## Order
18 first: it removes most of the footprint, and the rerun of `22726386` depends on it.
Then 20 (wasted allocation), then 21, then 19 (it is simpler once 21 has landed).
4 changes: 4 additions & 0 deletions examples/small_molecule_binding/plans/BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Run artifacts archived at
| 15 | A failed stage kills its whole pipeline: after a `TaskFailed`, the pipeline dies with `'NoneType' object is not subscriptable` (`22714866` p7/p15) instead of retrying or escalating | medium | open | [gpu-saturation](2026-10-07-gpu-saturation.md) |
| 16 | rfd3 reported `TaskFailed` (`error_type=unknown`) after writing all its outputs (`22714866` p7/p15, both on GPU 2, unstaggered run) | low | open; not seen in the staggered runs (0 failures at 2/6/8 per GPU). Watch for recurrence | [gpu-saturation](2026-10-07-gpu-saturation.md) |
| 17 | Operating point is 6–8 pipelines per GPU (5.5× per-node rfd3 at 8/GPU, GPUs pegged 55–63 % of the time), but `delta_gpu_run.sh` still defaults to 1 per GPU and needs one `p*_in` dir per pipeline. Also restate the per-pipeline throughput gate (11 rfd3/pipeline-h) per node | medium | open; being exercised by the 8-node / 256-pipeline run | [gpu-saturation](2026-10-07-gpu-saturation.md) |
| 18 | mpnn keeps every candidate's `packed/` and `backbones/` PDB (~26 each per task, ~90% of run bytes) but only `best_packed_pdb` is read later. `22726386` lost 174 tasks to the shared inode quota (`Errno 122`) | high | open; blocks the `22726386` rerun | [run-storage-footprint](2026-10-08-run-storage-footprint.md) |
| 19 | No per-job packing: run dirs stay as 20k–400k loose files each after the job ends | medium | open | [run-storage-footprint](2026-10-08-run-storage-footprint.md) |
| 20 | Runner does not exit when every pipeline has failed: `22726386` idled from 03:39 to its 06:59 `TIMEOUT` (~27 node-h), no `runner_status` written. Related to 2 | high | open | [run-storage-footprint](2026-10-08-run-storage-footprint.md) |
| 21 | Job evidence split across the submit dir: `impress_%j.out`, `asyncflow.session.*`, `ddict_orc_*` land outside `IMPRESS_WORK_DIR` | low | open | [run-storage-footprint](2026-10-08-run-storage-footprint.md) |

## Closed 2026-10-06 by the 32-pipeline scale gate (`22701168`; [scale-gate](2026-10-06-scale-gate.md))

Expand Down
Loading