Skip to content

Route all job arrays through cohort, delete legacy loop (MPI cohort Stage 2) - #373

Merged
scttfrdmn merged 2 commits into
mainfrom
feat/mpi-cohort-stage2-plain-array
Jul 19, 2026
Merged

scttfrdmn merged 2 commits into
mainfrom
feat/mpi-cohort-stage2-plain-array

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Stage 2 of the cohort MPI integration. Makes cohort the only engine for job-array launches and retires the hand-rolled goroutine loop.

What

spawn launch --count > 1 now always routes through the cohort reconciler:

  • --mpi → launchMPICohort (NewMPICohort, all-or-nothing — a missing rank makes the cluster useless).
  • plain array → launchPlainArrayCohort (NewPartialCohort) with the new --min-viable flag (default 1 = independent members; one member's terminal failure no longer tears down the rest, unlike the old loop). Set =--count for strict all-or-nothing.

Both share a launchCohort core (per-index intents + AZ chain + reconcile + render).

Removed / deprecated

  • Deleted launchJobArray (the hand-rolled parallel loop with best-effort cleanup). runLaunchBatch stays — it's shared with the sweep path. renderJobArrayResult stays — shared output contract.
  • --reconciler is now a hidden no-op that warns if passed; removed in a later stage.

Tests

  • TestBuildCohort — MPI is always MinViable=len; plain array uses clamped --min-viable; partial cohorts are NoAssembly.
  • TestBuildAZChain_PlacementGroupGate, TestOrderAZs (from Stage 1) still pass.
  • e2e: the cohort twin now exercises the --mpi path (both paths are cohort now); base job-array test covers the plain path.
  • go build ./..., cmd tests, gofmt clean; no new lint in changed files.

Depends on Stage 1 (#371, merged). Part of the cohort MPI integration; the plan's central PG↔AZ-fallback work is Stage 3.

…tage 2)

Job-array launches (--count > 1) now always use the cohort reconciler:
- --mpi → launchMPICohort (NewMPICohort, all-or-nothing: a missing rank makes
  the cluster useless).
- plain → launchPlainArrayCohort (NewPartialCohort, --min-viable members, default
  1 = independent; one member's terminal failure no longer drains the rest).
Both share launchCohort (intents + AZ chain + reconcile + render).

- Delete the hand-rolled launchJobArray goroutine loop. runLaunchBatch stays
  (shared with the sweep path); renderJobArrayResult stays (shared output).
- Add --min-viable (default 1); clamp to [1, count] in buildCohort.
- --reconciler is now a hidden deprecated no-op (warns if passed) — removed in a
  later stage.
- e2e: repurpose the cohort twin to cover the --mpi path (both paths are cohort
  now); add unit tests for buildCohort (MPI vs partial, min-viable clamping).

Stage 2 of the cohort MPI integration (plan: majestic-enchanting-kernighan).
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.71795% with 20 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/launch_jobarray.go 39.13% 14 Missing ⚠️
cmd/launch_single.go 0.00% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

…t model MPI setup)

The --mpi path runs EFA/placement-group validation against real EC2 APIs the
substrate fake doesn't model (and t3.small isn't MPI-capable), so the twin now
exercises the plain-array cohort with explicit all-or-nothing --min-viable=count.
The --mpi path is covered by the real-AWS MPI tier (Stage 5).
@scttfrdmn
scttfrdmn merged commit fec6f4e into main Jul 19, 2026
7 checks passed
@scttfrdmn
scttfrdmn deleted the feat/mpi-cohort-stage2-plain-array branch July 19, 2026 00:33
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.

1 participant