Skip to content

--mpi --efa: auto MPI security group is TCP-only, so EFA cannot pass traffic; and it silently overwrites --security-group-ids #659

Closed

Description

@scttfrdmn

Found while porting GCHP (multi-node EFA MPI) from ParallelCluster to spawn. Read from source @528e038; not yet reproduced on hardware.

CreateOrGetMPISecurityGroup (https://github.com/spore-host/spawn/blob/528e038/pkg/aws/securitygroup.go#L79) authorizes only IpProtocol: tcp 0-65535 from the group itself. EFA's SRD traffic is not TCP; the AWS EFA docs require the SG to allow all inbound and all outbound traffic to/from itself (IpProtocol -1, both directions). With the current rules an --efa cohort comes up with the device present but endpoints that cannot reach each other.

Second half: under --mpi, ensureSecurityGroup unconditionally assigns config.SecurityGroupIDs = []string{sgID} (https://github.com/spore-host/spawn/blob/528e038/cmd/launch_single.go#L1100), discarding any --security-group-ids the user passed, so there is no flag-level workaround.

Why it matters concretely: GCHP/MAPL (and anything using MPI one-sided windows with THREAD_MULTIPLE) aborts at MPI_Win_create over TCP; it only runs over EFA. So the TCP-only SG is not a slowdown, it is a hard failure for this class of code.

Workaround in use: pre-create spawn-mpi-<job-array-name> in the default VPC with all-traffic self-ref ingress+egress; CreateOrGet reuses it by name.

Suggested fix:

  1. When --efa (or always for --mpi), create the rule with IpProtocol: "-1" ingress and a matching self-ref egress rule.
  2. Honor --security-group-ids under --mpi (append the MPI SG, or use the user's list as-is and validate it has an all-traffic self rule).
  3. Existing spawn-mpi-* groups created by older versions keep the TCP rule; detect and add the missing rule on reuse.
  4. A tier-3 test that actually moves bytes over EFA (e.g. fi_pingpong -p efa or osu_latency between the two nodes) — TestTier3_MPI today asserts the peers file only.

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