Skip to content

feat(executor): parallel/MPI jobs + real SLURM sbatch + connector-as-dispatch (IBM PE codified) - #24

Merged
mdheller merged 1 commit into
mainfrom
feat/parallel-slurm-connector
Aug 4, 2026
Merged

feat(executor): parallel/MPI jobs + real SLURM sbatch + connector-as-dispatch (IBM PE codified)#24
mdheller merged 1 commit into
mainfrom
feat/parallel-slurm-connector

Conversation

@mdheller

@mdheller mdheller commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

One Grant-gated executor now dispatches batch, parallel/MPI, stateful, and connector work alike.

  • Parallel / MPI (IBM PE POE): K8sAdapter emits an Indexed Job (parallelism/completions=N, JOB_COMPLETION_INDEX=rank); sourceosctl run --parallelism N --nodes M.
  • Real SLURM: SlurmAdapter emits a real sbatch script (--ntasks/--nodes/--gres, srun for MPI ranks, grant-bound) and submits via ssh $SOURCEOS_SLURM_LOGIN sbatch when configured.
  • Connector-as-dispatch: ConnectorAdapter + a connector backend (external/untrusted). A Gemini/OpenAI/Claude Files-API / MCP call is the same materialize→handle→dispatch→result shape as a compute job, gated by the same Grant.
  • Fixes a latent place bug (cmd_run read run-only flags → AttributeError; now defensive).

110 tools tests green. docs/PATTERN_INTEGRATION.md updated.

…dispatch (IBM PE codified)

Answers "what job types", "how do we leverage SLURM", and "the MCP-connector pattern" — one
Grant-gated executor now dispatches batch, parallel, stateful, and connector work alike.

  - Parallel / MPI (the IBM Parallel Environment POE pattern): K8sAdapter emits an Indexed Job
    (completions/parallelism=N, completionMode=Indexed) — each task gets JOB_COMPLETION_INDEX as
    its rank. `sourceosctl run --parallelism N --nodes M`.
  - Real SLURM: SlurmAdapter emits a real sbatch script (#SBATCH --ntasks/--nodes/--gres, `srun`
    to launch MPI ranks, grant-bound via --comment), and submits it via `ssh $SOURCEOS_SLURM_LOGIN
    sbatch` when configured (else emits the script). Replaces the hpc-slurm descriptor stub.
  - Connector-as-dispatch: ConnectorAdapter + a `connector` backend (external/untrusted, so
    sensitive data won't auto-route to a vendor). A Gemini/OpenAI/Claude Files-API / MCP call is
    the SAME materialize->handle->dispatch->result shape as a compute job, gated by the same Grant.

Also fixes a latent bug: `place` reused cmd_run but its parser omits the run-only flags
(--cost/--inception/--parallelism) -> AttributeError; cmd_run now reads them defensively.

Tests: +1 indexed-job +1 sbatch +1 connector +1 connector-plane +1 place-regression = 110 green.
docs/PATTERN_INTEGRATION.md updated (these three frontiers now shipped; volunteer-mesh is next).
@mdheller
mdheller merged commit 6b31544 into main Aug 4, 2026
1 check passed
@mdheller
mdheller deleted the feat/parallel-slurm-connector branch August 4, 2026 04:54
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