Skip to content

Multinode scaleup - #65

Merged
drawadiagram merged 4 commits into
mainfrom
multinode-scaleup
Oct 8, 2026
Merged

drawadiagram merged 4 commits into
mainfrom
multinode-scaleup

Conversation

@drawadiagram

Copy link
Copy Markdown
Contributor

modify scripts to support multinode runs. confirmed working

Mason Hooten and others added 3 commits September 27, 2026 21:27
Fixes the TIMEOUT that killed the three previous PROD runs (21933600,
21945304, 21960876) and enables 4-node / 16-pipeline execution, measured
at 98% per-pipeline scaling efficiency vs a 2-node baseline (job 22491438).

Allocation sizing (delta_gpu_run.sh):
  --cpus-per-task 16 -> 64, --mem 220G -> 240G, --time 4h -> 48h, explicit
  --account. seff on the three TIMEOUT runs showed 97.7-98.1% CPU efficiency
  on 16 cores at 29% memory. The extra cores are free: billing is
  max(cpu*31.25, mem/8, gpu*500) under MAX_TRES and the GPU term already
  pins it at 2000.

`dragon -m` does not work on Delta:
  Dragon's slurm backend launcher builds `srun --nodelist=` from
  gethostname(), which returns FQDNs here, while Slurm's NodeName is short
  (gpub039) -- the step is unsatisfiable ("Requested node configuration is
  not available") and the job hangs to the wall clock (job 22456499).
  --hostlist is not a workaround: SlurmWLM.__init__ accepts _hostlist and
  never references it. Multi-node now follows ARCHIVE-run_impress.slurm:
  dragon-network-config --output-to-yaml into a per-job dir, then
  `dragon -w ssh --network-config <yaml> -t tcp`. ssh builds no --nodelist
  (Delta sets HostbasedAuthentication/EnableSSHKeysign cluster-wide, so no
  user keys are needed) and -t tcp avoids the HSTA/OFI libdfabric dlopen.

Run config travels as argv, not environment:
  `dragon -w ssh` forwards only BASE_ENV_VARNAMES (PATH, PYTHONPATH,
  LD_LIBRARY_PATH, PYTHONSTARTUP, VIRTUAL_ENV, DRAGON_*), so IMPRESS_*
  and OMP_NUM_THREADS were silently dropped -- job 22466127 ran PROD
  defaults despite IMPRESS_TEST_MODE=1. The runner now takes
  --n-pipelines / --work-dir / --test-mode (CLI > env > default) and sets
  OMP_NUM_THREADS and friends in os.environ itself, sized from
  sched_getaffinity so it respects the cgroup rather than the physical
  core count. MPNN_DIR/BOLTZ_CACHE/FOUNDRY_SIF_PATH/SCRATCH survive that
  hop only because ~/.bashrc exports them; that is noted, not relied on.

Also:
  - autodetect CUDA_HOME/MPI_LIB/FAB_LIB with an existence check; the
    hardcoded CUDA 25.3 / mpich 8.1.32 / libfabric 1.22.0 paths were
    removed by Delta's Cray PE upgrade. dragon-config add does not
    validate what it stores, and a bad FAB_LIB fails as a silent hang.
  - `--mail-user=<your e-mail>` made sbatch parse `e-mail>` as a directive,
    so the script could not be submitted at all.
  - IMPRESS_WORK_DIR scoped per job: taskcount restarts at 1 each run, so a
    shared work dir silently overwrites the previous run's task dirs.
  - correct three ${SCRATCH}/${USER} defaults that doubled the user segment.
  - dragon-config -c before add (it appends); SLURM_OVERLAP=1; refuse the
    node-local /tmp foundry extraction when --nodes>1.
  - boltz.sh gains the VIRTUAL_ENV guard the other scripts already carry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Job 22491438 (4 nodes / 16 pipelines) completed its science: all 16
pipelines reached the max_tasks=300 budget in 6h41m, producing 552
passing folds with 0 OOM, tracebacks, or task failures. Scaling measured
at 98% per-pipeline efficiency vs the 2-node baseline (11.46 vs 11.69
rfd3/pipeline/h; 3.9x job-wide for 4x pipelines). Per-node CPULoad stayed
balanced at 26-40 of 64 with the primary no busier than the rest, so the
"11 of 13 tasks are local_task=True and pinned to the primary node"
ceiling, while real, is not binding at 16 pipelines.

New defect recorded: the Dragon teardown hangs. After

  22:23:11  [MANAGER] All pipelines finished. Exiting.
  22:23:11  Shutting down Dragon backend

flow.shutdown() never returned. The job sat for exactly 60 minutes and
had to be scancelled, ending State=CANCELLED at Elapsed=07:41:11 with
"=== Small Molecule Binding pipeline done ===" never printed.

That burned ~64 GPU-hours -- 37% of the job's billed 172 GPU-h -- for
zero output, and the rate doubles to 32 GPU-h per hung hour at 8 nodes.
There is no resume and no watchdog, so the SLURM wall limit is currently
the only backstop: a 48h request lets an unattended hang bill the entire
remainder. Mitigations for the next campaign are to right-size --time and
to bound flow.shutdown() in code so the job self-terminates once the work
is provably complete.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
PR #64 (adbd249, "Remove IMPRESS_TEST_MODE") deleted the TEST RunConfig, the
`cfg = TEST if ... else PROD` conditional and the IMPRESS_TEST_MODE export --
the same three regions this branch had rewritten so that run config travels as
argv over `dragon -w ssh`, which forwards only BASE_ENV_VARNAMES. Neither file
auto-merged.

Resolved in main's favour on whether test mode exists (it does not): --test-mode
dropped from the argparse and from RUNNER_ARGS, cfg = PROD unconditionally.
Resolved in this branch's favour on everything else: the --n-pipelines/--work-dir
argv plumbing and the sched_getaffinity thread caps are load-bearing for
multi-node and orthogonal to the flag.

The `cfg is PROD` guard on IMPRESS_N_PIPELINES existed only to stop the pipeline
count overriding the fixed-size TEST config; with TEST gone it is vacuous and
was removed.

Docs: CLAUDE.md's architecture and thresholds sections described PROD/TEST
selection as live; the revision-history rows and multinode-scaleup-testing.md's
Stage 1/2 records are left intact as history, with a note that the flag they
used has since been retired.

Verified: the runner imports cleanly under the real stack with cfg is PROD and
no TEST attribute, --n-pipelines 32 still reaches replace() with PROD left
unmutated, `bash -n` passes, and no executable reference to IMPRESS_TEST_MODE
or --test-mode remains.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@AymenFJA AymenFJA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i left some comments

# Account: set SBATCH_ACCOUNT=<project>-delta-gpu before calling sbatch
#SBATCH --account=bdyk-delta-gpu
#SBATCH --partition=gpuA40x4
#SBATCH --nodes=1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is titled multi-node scale but the rquest is 1 node?

# Override nodes per run without editing this file: sbatch --nodes=2 ...
#SBATCH --job-name=impress_sm_binding
#SBATCH --mail-user=<your e-mail>
#SBATCH --mail-user=mh1314@scarletmail.rutgers.edu

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no hard coded email please.

# sbatch delta_gpu_run.sh run_nonadaptive.py # non-adaptive runner
#
# Account: set SBATCH_ACCOUNT=<project>-delta-gpu before calling sbatch
#SBATCH --account=bdyk-delta-gpu

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no hardcoded project name please

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the following worked for me:
if [ "${SLURM_NNODES:-1}" -gt 1 ]; then
# dragon -m fails on Delta: gethostname() returns FQDNs but SLURM NodeName is short
# (e.g. gpub081.delta.internal vs gpub081) so srun --nodelist is unsatisfiable.
# Workaround: generate network config yaml, then launch via SSH + TCP transport.
# Delta has cluster-wide HostbasedAuthentication so no user SSH keys are needed.
NET_DIR="/tmp/dragon_net_${SLURM_JOB_ID}"
mkdir -p "${NET_DIR}"
dragon-network-config --output-to-yaml "${NET_DIR}/network.yaml"
DRAGON_MODE="-w ssh --network-config ${NET_DIR}/network.yaml -t tcp"
else
DRAGON_MODE="-s"
fi

echo "Running: dragon ${DRAGON_MODE} ${RUNNER} (nodes=${SLURM_NNODES:-1})"
dragon ${DRAGON_MODE} "${RUNNER}"
if [ "${SLURM_NNODES:-1}" -gt 1 ]; then
# Multi-node. Do NOT use `dragon -m` here: its slurm backend launcher

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kinda misleading and doesn't make sense. Dragon Slurm launcher sets the natasks-per-node to 1, which Delta Slurm does not like with other Slurm configs. This is SLURM issue in general


# Thread caps, set here rather than in the batch script for the same reason:
# OMP_NUM_THREADS exported by delta_gpu_run.sh never survives the ssh hop.
# 11 of the 13 tasks are local_task=True and run as concurrent subprocesses of

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if 11 tasks run locally for each pipeline, how would the pipeline scale? All of these N pipelines X 11 tasks would end up on a single node (the node on which the code is run). Without some form of coordination or task distribution, I’m concerned that this approach may not scale effectively. The other question is why these tasks are set to local? Even if these tasks are trivial, they can occupy the resource for T time and can show some utilization across the nodes.

# sched_getaffinity respects the cgroup/CPU mask SLURM applies to the job;
# os.cpu_count() reports the physical core count and would over-subscribe on any
# allocation smaller than a whole node.
try:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to the comment above. You are kinda replicating the backend job.

@drawadiagram drawadiagram mentioned this pull request Oct 6, 2026
@drawadiagram
drawadiagram merged commit 8ff3121 into main Oct 8, 2026
11 checks passed
@drawadiagram
drawadiagram deleted the multinode-scaleup branch October 8, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants