Skip to content

--mpi-command never signals completion, so --on-complete terminate never fires; and its output isn't where 'spawn array logs' looks #894

Closed

Description

@scttfrdmn

Version: spawn 0.128.2 (38b2d66), macOS arm64, us-west-2

Repro:

spawn launch sim --job-array-name sim --count 4 --mpi --instance-type c8a.4xlarge --ttl 1h \
  --mpi-command hostname --mpi-processes-per-node 1 --on-complete terminate -y

1. The cohort never self-terminates. mpirun runs and finishes: the four hostnames are in /var/log/cloud-init-output.log (lines 329–332, at ~17:04 UTC). But no completion marker is ever written, so spored waits indefinitely:

$ spawn connect sim-0 -- 'ls /tmp/SPAWN_EXITCODE; sudo spored status | grep -i complete'
ls: cannot access '/tmp/SPAWN_EXITCODE': No such file or directory
  On complete:      terminate (watching)

At 17:05:58, all 4 members were still running, two minutes after mpirun exited. They would have ridden to idle or TTL. By contrast, the same flags with --command (8-member array) self-terminated correctly in about 2.5 minutes.

This looks like the --mpi-command analogue of #566: the --command path records /tmp/SPAWN_EXITCODE, the --mpi-command path doesn't.

2. Its output can't be read with the documented command:

$ spawn array logs sim --index 0
fetch index 0 log: ssh: exit status 1
Output: tail: cannot open '/var/log/spawn-command.log' for reading: No such file or directory

The mpirun output only exists in cloud-init's log.

Expected: --mpi-command behaves like --command on rank 0's node. Output goes to /var/log/spawn-command.log, the exit code goes to /tmp/SPAWN_EXITCODE, and --on-complete fires (on every member, once rank 0 finishes).

Impact: the cost backstop that --on-complete terminate promises doesn't hold for MPI, the most expensive launch type. Found while preparing a conference demo, where "the cluster cleans itself up" is the point.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions