Repository navigation
Scaling wide - #70
Merged
Merged
Scaling wide#70
Conversation
scripts/rfd3.sh: dump_trajectories=False. The per-step *_noisy_* and
*_denoised_* cif.gz files are 11.85 MB of each 11.92 MB rfd3 output dir --
99.4% of rfd3's footprint and ~88% of a whole campaign's. Verified safe two
ways: a repo-wide grep for "traj" outside the flag returns no hits, and
analysis_backbone cannot pick one up by accident because it builds its
candidate list from .json files containing '_model_' and only then derives the
structure via .replace('.json', '.cif.gz') -- trajectory files ship no .json at
all. Campaign footprint ~30 GB -> ~3.8 GB.
delta_gpu_run.sh: --time 48:00:00 -> 12:00:00. The wall limit is the only
backstop against the Dragon teardown hang: on 22491438 flow.shutdown() never
returned after all 16 pipelines finished, the job sat 60 minutes and had to be
scancelled, burning ~64 GPU-h for zero output. At 8 nodes that is 32 GPU-h per
hung hour, so 48h would let an unattended hang bill ~1536 GPU-h versus 384 at
12h. Sized as ~6.8h measured compute (unchanged by width, since each pipeline
independently accumulates its own max_tasks entries) + ~1h teardown + slack
down to ~62% of baseline throughput. sbatch --test-only returns an identical
queue start estimate for 8/12/16/24/48h, so shortening costs nothing. Not below
12h: no checkpoint exists, so a TIMEOUT loses all in-memory ensemble state, and
8h leaves only a 1.18x margin.
p17_in..p32_in created (gitignored, all 32 checksum-identical) so 8 nodes
yields 32 pipelines with zero idle GPUs.
Also corrects the Stage 3 load analysis: the Dragon primary is not the batch
node. dragon-network-config marks gpub068 is_primary, and it was the busiest
node at 39.7/64 (62%), ~10 cores above the others -- the local_task load. A
naive doubling to 32 pipelines projects to ~124%, i.e. oversubscribed, with
OMP_NUM_THREADS already at its floor of 1. This does not invalidate the 98%
efficiency figure, which is measured throughput, but it does make the degraded
regime more likely than first reported, so the tracker now carries an explicit
decision rule for reading the result.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Submitted 8 nodes / 32 pipelines / 12h as job 22534628 (PENDING, est. start 2026-10-04). No smoke test: this is the first HPC execution of the telemetry wiring, the PR #64 argv/cfg changes and dump_trajectories=False, so the tracker now carries an early-abort gate instead. The gate is cheap because checkpoint_interval=300.0 flushes the telemetry file every 5 minutes -- the decisive "8 distinct node_ids" question is answerable ~10 minutes into the production run itself rather than needing a separate job. It distinguishes failures worth cancelling for (wrong manager count, wrong pipeline count, srun/ssh errors, empty rfd3 out dirs) from one that is not (a telemetry no-op costs only instrumentation, while re-queuing costs ~6 days). Also records the completion rule: scancel if "pipeline done" has not printed within ~10 min of "All pipelines finished. Exiting.", rather than repeating 22491438's 60-minute hang -- at 8 nodes that is 32 GPU-h per hung hour and the flow.shutdown() bounding fix remains declined. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ent loop Job 22534628 (8 nodes / 32 pipelines) hit TIMEOUT at Elapsed=12:00:10 with only 1 of 32 pipelines reaching max_tasks=300. Throughput ran at 105% of the 4-node baseline for two hours, then collapsed to 14-15% and never recovered (4.24 rfd3/pipeline/h over the run, 37% of baseline) while mean GPU utilisation fell 11.1% -> 0.7% and per-node CPULoad held 26-34 of 64. The hardware was idle, so this was starvation, not contention. adaptive_decision() was declared `async def` with zero `await` in its 220-line body, so every call blocked the single event loop shared by all 32 pipelines -- dispatch, subprocess reaping and Dragon completion handling alike. What made each call expensive: _ensemble_selective_avg() invokes sim_fn once per prior ensemble entry, and _seq_identity -> _read_fasta_seq was uncached, so a decision cost ~540 blocking Lustre opens at ensemble 270 and a run cost O(entries^2) against ~245k small files. _parse_pdb_ca_coords was already lru_cache'd, which is exactly why backbone/fold cost ~0 while sequence took 4.93 of 4.98 adaptive hours. Adaptive occupancy of manager wall clock went 3.4% at 16 pipelines to 67.1% at 32 (73-95% for the last nine hours), with p99 per-call 1.36s -> 56.0s while the median stayed flat -- a tail explosion, i.e. a serial server crossing saturation. Ruling out the filesystem: in hour 4 every stage's median inflated together (mpnn 23x, packmin 41x, filter_shape 32x, boltz 32x) with GPUs at 0.7%, which only a blocked loop that cannot reap completions produces. Fix both halves: - _read_fasta_seq memoised via _FASTA_SEQ_CACHE, keyed on path alone (sound because taskcount makes every output path write-once). Negative results are not cached, so a transiently missing file does not pin the failure. - _parse_pdb_ca_coords lru_cache 512 -> 4096: the manager is one process shared by all pipelines, so the working set is entries x n_pipelines, and 512 thrashed at 32. - adaptive_decision() split into an async wrapper that awaits asyncio.to_thread(_adaptive_decision_sync, ...). Safe because the body only touches its own pipeline's state and the manager awaits each pipeline's adaptive task before advancing it. Verified offline: 12/12 adaptive branch cases (six steps x pass/fail) give identical (next_step, seq_retry_count, rfd3_input_pdb) cached vs uncached; the memo matches a fresh read on real run artifacts; negative results stay uncached; and a concurrent heartbeat now ticks during a cold 1200-entry decision. Not yet validated at scale -- acceptance test is in plans/. Cost of the defect: 0.666 GPU-h per passing fold vs the baseline's 0.194, i.e. 2x the hardware for 1.05x the output. Science was unaffected and is the best recorded: 624 folds, 577 passing (92.5%), median complex_plddt 93.3 / ligand_iptm 0.870, 392 (62.8%) high-quality on both axes across 31 of 32 pipelines, zero tracebacks/OOM/task failures in 63,589 log lines. Also: - Correct the CLAUDE.md 2026-09-28 row: its ~124% primary-node oversubscription projection did not materialise (gpub068 ran 34.68/64, ~4 cores above mean). - Add plans/ with a backlog tracker and one doc per open item (teardown-hang watchdog, fastrelax 58% pass rate, ligand_iptm gate). - Narrow examples/.gitignore */p*/ to */p[0-9]*/ so it stops swallowing plans/. Verified no other path changes ignore state. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
multinode-scaleup and scaling-wide grew compute management in the example runner: process-wide OMP_* caps sized sched_getaffinity // (2*n_pipelines), _timed_local telemetry for stages asyncflow could not see, and asyncio.to_thread for the adaptive callback. All three compensate for d8c1b4b making every stage local_task=True, so five stages (mpnn, packmin, fastrelax, filter_shape, filter_energy) spawned their own subprocesses on the Dragon primary node. That also left mpnn -- LigandMPNN selects CUDA when available (run.py:38) -- running unscheduled on the primary's GPUs. - The five stages are now asyncflow executable tasks on the default `compute` backend, following the rfd3/boltz pattern: the coroutine does taskcount/taskdir/input prep in-process and returns the command. - Thread caps are per task via a task_description default (_tool_task_description; ROSETTA_THREADS=1, MPNN_THREADS=4). Dragon's process_template env is merged into the target node's env by local services, so only the delta is sent; the concurrent backend's env replaces the environment, so it is merged over os.environ. The runner's os.environ block is removed. - One WorkflowEngine over two named backends: `compute` (Dragon, or a process pool off-HPC) and `local` (thread-pool ConcurrentExecutionBackend). adaptive_decision runs as flow.function_task(backend="local") in place of asyncio.to_thread; it must stay a thread pool since it mutates live state. - scripts/run_logged.sh keeps the per-stage {taskdir}/<stage>.log files and puts the log tail on stderr on failure. - mpnn.sh/filter_energy.sh gain the VIRTUAL_ENV guard now that they can run off the primary. Kept: the --n-pipelines/--work-dir argv plumbing (a `dragon -w ssh` launcher limit, not compute delegation) and the _read_fasta_seq memo. Verified offline against the real stack (asyncflow 0.5.1, rhapsody 0.5.0): stub tools saw per-task caps while the runner env had none; logs land at the old paths; an empty fixed_residues arg survives quoting; failures raise with the log tail; 144/144 adaptive decisions ran as backend=local tasks in a 3-pipeline manager run with telemetry; run_test_small_molecule_binding.py passes. Not yet run on Delta -- acceptance test in plans/2026-10-04-backend-delegation.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Smoke job 22670942 (2 nodes, 8 pipelines, gpuA40x4-interactive, 1h, TIMEOUT as expected) ran the delegated stages with 0 task failures: mpnn 337, packmin 108, fastrelax 82, filter_shape 32, rfd3 101, boltz 29, and 689 adaptive decisions on `local`; 24/29 folds passed; ~13 rfd3/pipeline/h (first-hour figure only -- the 8-node throughput gate stays open). Sampling /proc on both nodes during 22669434 confirmed the converted stages run on the non-primary node with their per-task caps intact after the `dragon -w ssh` hop. Thread caps: the first change capped only the five converted stages. On 22670942 uncapped boltz took ~3030% CPU and rfd3 ~680% on the Dragon primary, which sat at 3.8% idle. Both now take GPU_TOOL_THREADS=8 through the same _tool_task_description default; rfd3.sh's apptainer exec has no --cleanenv, so the caps reach the container. Docs: - plans/2026-10-04-backend-delegation.md: Delta results for 22669434 and 22670942, acceptance-test status (smoke and env check passed, throughput gate open). - plans/upstream/dragon-batch-idle-spin.md: Batch pool workers (hardcoded num_cpus // 2 = 32/node) spin in the FLI ADAPTIVE wait for the whole 0.2s timeout, and Manager._run busy-loops on get_nowait -- ~21-25 cores per node regardless of load. No Batch kwarg sets pool size; a _setup_managers pool-shrink workaround is drafted, not applied. - plans/upstream/asyncflow-telemetry-backend-and-node-id.md: Started/Completed/Failed/Canceled (and Created/Resolved) omit the task's target_backend in _emit and report the default backend; node_id is never set on task events because no backend records the execution host. - BACKLOG: item 6 status; new items 7 (Dragon spin), 8 (telemetry), 9 (launcher counts p*_in dirs but never checks contents -- p2_in..p8_in held only ALR.smiles and 7/8 pipelines died on 22669434; dirs restored from p1_in, which is gitignored data). - CLAUDE.md: 2026-10-05 revision row; execution-backends section documents all per-stage caps and how to read node load and telemetry under Dragon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…docs (PR #68) PR #67 replaced SCRATCH with WORK_DIR across the Delta scripts and fixed `boltz: command not found`; PR #68 is a docs overhaul whose src/impress changes are docstrings only (auto_register_task / ImpressManager behaviour is unchanged). Three files conflicted: - delta_gpu_run.sh: kept this branch's structure (multi-node `dragon -w ssh` path, CUDA/MPI/FAB autodetect, argv run config, per-job IMPRESS_WORK_DIR, 12h walltime, SLURM_OVERLAP, refusal of the node-local /tmp foundry extraction on --nodes>1) with main's WORK_DIR defaults (IMPRESS_VENV, MPNN_DIR, BOLTZ_CACHE, foundry paths, WORKDIR). Main's version re-hardcodes CUDA_HOME/MPI_LIB/FAB_LIB, which this branch removed because stale values hang `dragon -m` after Delta's Cray PE upgrade -- the autodetect is kept. The SLURM_EXPORT_ENV comment now notes that under `dragon -w ssh` remote tasks get WORK_DIR & tool paths only from ~/.bashrc. - scripts/boltz.sh: both the branch's VIRTUAL_ENV re-activation guard and main's BOLTZ_VENV/VIRTUAL_ENV PATH prepend (activate first, then prepend). - scripts/rfd3.sh: main's WORK_DIR apptainer bind with the branch's dump_trajectories=False rationale, plus a note that on a remote node WORK_DIR comes only from ~/.bashrc. Also renamed the remaining live SCRATCH references in pull_foundry.sh, two runner comments and README.md; historical CLAUDE.md revision rows are left as written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dragon Batch gives a process task with no gpu_affinity every GPU on its node, so rfd3, boltz and LigandMPNN all ran on GPU 0 and GPUs 1-3 sat idle. Each pipeline now gets one device round-robin, and its GPU stages request it as Policy(gpu_affinity=[g]) (CUDA_VISIBLE_DEVICES on the Concurrent backend; under Dragon a template-env CUDA_VISIBLE_DEVICES is overwritten by local services). Verified on Delta job 22692293 (2 nodes, 8 pipelines, 1 h): all 8 GPUs used, 0 failures, rfd3 +18% and boltz +28% vs 22684833. Adds BACKLOG 12 (launcher masks the runner's exit status) and an upstream note on Batch's missing GPU accounting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dragon -w ssh exits 0 even when the runner raises, so a crashed run (22692267) was recorded COMPLETED. The runner now writes ok or failed: <exc> to <work_dir>/runner_status for the launcher to check. The matching delta_gpu_run.sh check is not in this commit (that file carries a local account edit). Adds the 8-node / 32-pipeline / 4 h throughput-gate plan (job 22701168, submitted, queued) and BACKLOG 13 to follow it up; corrects the BACKLOG 12 diagnosis in the docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Job 22701168 (8 nodes / 32 pipelines / 4 h, TIMEOUT 04:00:08) passed every criterion with 0 failures: rfd3/pipeline/h 15.16/16.22/16.28/15.19 by hour (15.71 overall, 1.37x baseline, no hour-2 collapse); adaptive callback 0.96% of wall clock, p99 0.071 s; all 32 GPUs used at 9.4-15.3% with no decay; 0.160 GPU-h per passing fold (802/871). Marks both acceptance tests passed, confirms the GPU spread at 8 nodes, fixes the inverted units on the scale gate's fold criterion, and removes the closed rows from BACKLOG with a pointer to the evidence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion ladder Staggered start: a running rfd3 holds ~9.5 GB host RAM, so 32 pipelines starting together OOM-killed a node in 2 min (22714785). The runner now delays pipeline N by ((N-1)//(GPUs*nodes))*60 s (0 at one pipeline per GPU) and run() sleeps that long before its first stage. delta_gpu_run.sh: log nvidia-smi utilisation/memory every 10 s to $IMPRESS_WORK_DIR/nvsmi.csv (batch node), and exit 1 unless the runner wrote runner_status=ok, since dragon exits 0 when the runner raises (BACKLOG 12). Ladder (1 node, 1 h; 2/4/6/8 pipelines per GPU): rfd3 per node-hour 57.8 -> 315.5 (5.5x) at 8/GPU, GPUs pegged 55-63% of the time, CPU/host RAM/GPU memory with headroom. Writes up results; adds BACKLOG 14-17. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
This branch now supercedes the referenced earlier branches with fixes addressing @AymenFJA comments regarding backend separation of concerns and personal info left in batch scripts. No [intentional] change made to the sbatch parameters of the job script as those things are user-specific in a way that defies prepackaging; command line overrides are also available that allow the scripts to be utilized intact. Code is functioning on Delta. |
… files Replace a personal #SBATCH --mail-user address, allocation names in #SBATCH --account lines and docs, an allocation balance figure, and user-specific /work, /scratch paths with placeholders. Active directives become ##SBATCH (disabled); set SBATCH_ACCOUNT or pass sbatch --account= instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-setup findings Runs (all gpuA40x4-interactive, 1h, TIMEOUT as expected, 0 task failures): - 22675825, 4 nodes / 16 pipelines: mpnn 667, packmin 212, fastrelax 165, filter_shape 86, rfd3 209, boltz 79, adaptive 1417; 71/79 folds passed; 13.1 rfd3/pipeline/h -- ~100% first-hour scaling from 2 to 4 nodes. Node CPU 51% primary / ~46% others (58% before the rfd3/boltz caps). The caps were not live-verified on this run. - 22684833, post-merge gate, 2 nodes, run entirely from WORK_DIR=$WORK_DIR: all stages completed (rfd3 99, boltz 29), 27/29 folds, 13.1 rfd3/pipeline/h. Remote rfd3/boltz placement is inferred from GPU 0 activity on the non-primary node plus zero failures, not sampled from /proc. Findings: - BACKLOG 10 / plans/2026-10-05-gpu0-only.md: every GPU tool runs on GPU 0. Dragon process tasks get no gpu_affinity, so each sees CUDA_VISIBLE_DEVICES=0,1,2,3 and picks cuda:0. On 22684833 GPU 0 averaged 52%/45% and GPUs 1-3 were exactly 0% on both nodes; the ~10-15% "mean GPU" of every campaign is one busy GPU averaged over four. Candidate fix: a per-task gpu_affinity or CUDA_VISIBLE_DEVICES; not implemented. - BACKLOG 11: delta_env_setup.sh as merged from main does not build a working venv today (unpinned drift to numpy 2.x against boltz's pins, 13 missing boltz dependencies so the CLI and its cache warm-up fail, missing ml_collections for LigandMPNN, PyRosetta installer using the first pip on PATH, verify step only checking `import boltz`). ve/small_mol was built against a 203-pin constraints file from the old venv, keeping the tested stack. CLAUDE.md: 2026-10-05 revision row for the merge, the move to /work/nvme (~/.bashrc now exports WORK_DIR and the tool paths) and the runs; the execution-backends section states the GPU-0 effect and that multi-node runs need WORK_DIR from ~/.bashrc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remaining site-specific identifiers in current files:
- /work/nvme/<allocation>/$USER examples -> /work/nvme/<project>/$USER
- setup/readme.md: a teammate's /scratch path and a staff support-ticket
path -> placeholders ($BASE_DIR, <path to the shared ...>)
- discontinuous_scaffolds and protein_binding defaults on Bridges-2
(/ocean/projects/<alloc>/<user>, /jet/home/<user>) and Anvil
(/anvil/projects/<alloc>/<user>), and a /home/<user> scripts path:
executable shell lines use ${PROJECT:?...}/$USER and $HOME (fail
clearly if unset); Python constants, requirements and comments use
<project>/<user> placeholders.
Text replacements only; no logic changes. Public references
(github.com/rhaas80/alphafold, the mtitov/alphafold_delta image) kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
To be clear, supercedes the earlier branches, not the earlier PRs -- the intent is still to merge the three in order. |
AymenFJA
approved these changes
Oct 8, 2026
AymenFJA
left a comment
Collaborator
There was a problem hiding this comment.
Looks great to me thanks @drawadiagram
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #65 and #66, with corrections to address comments on those.