Skip to content

slurm convert/submit: support multi-node MPI jobs (--nodes > 1) #1328

Open

Description

@scttfrdmn

Follow-up to #1242. spawn slurm convert and spawn slurm submit now refuse a job with --nodes > 1, because a param-file row is one independent instance and cannot stand for an MPI cohort.

Before that change the conversion emitted one row with mpi: true and count: N under defaults:. Neither is a param-file key, so both passed through as PARAM_mpi / PARAM_count environment variables: the launch would have started one instance with no MPI setup, after slurm estimate priced N nodes (TotalInstanceHours = nodes × time limit). The script: key made that output unlaunchable anyway (#1242), so nobody hit it.

spawn launch --mpi --count N exists, so submit could hand an MPI job to it rather than to --param-file. It needs a decision: a Slurm batch script runs once, on the first node, and usually calls mpirun/srun itself. --command runs on every member, and --mpi-command wraps its argument in mpirun on rank 0, so neither maps directly. Probably: run the script on rank 0 only, with the hostfile exported the way pkg/userdata/mpi.go builds it. generateMPIScript (pkg/slurm/convert.go) is kept, and still shellcheck-gated, for this.

Activity

  1. added this to the Later milestone on Oct 26, 2026
  2. modified the milestones: Later, Post-1.0 on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions