Skip to content

--efa MPI cohorts can never enroll: probe runs fi_info without /opt/amazon/efa/bin on PATH (installer's zippy_efa.sh isn't sourced) — #684 again for EFA #693

Closed

Description

@scttfrdmn

Symptom

On 0.118.0 (0359c93), every --mpi --efa cohort dies at phase=enrolled after the full 5-minute budget, and the per-member SSM enrollment probe reports efa provider missing on every attempt:

spawn launch gchp-spawn-smoke2 --instance-type c8g.48xlarge --count 2 --job-array-name gchp-spawn-smoke2 --mpi --efa --skip-mpi-install ...
  gchp-spawn-smoke2-0: terminal/PhaseBudgetExceeded at phase=enrolled after 2 rung(s)
  gchp-spawn-smoke2-1: cohort-cancelled at phase=enrolled — culprit=gchp-spawn-smoke2-0 ...

aws ssm list-command-invocations on member 0 shows the probe failing every ~5 s from 16:03:30 PDT onward, ----------ERROR------- efa provider missing, until the cohort was cancelled at 23:08Z.

The same build passed the plain --mpi path on 2× c7g.large minutes earlier (details in #691). The only differences are --efa and --skip-mpi-install, and the latter only removes the mpirun check.

Cause: the #684 PATH bug, again, for fi_info

Enroller.enrollProbeScript() (pkg/mpicohort/adapter.go) sources only /etc/profile.d/mpi.sh and /etc/profile.d/efa.sh, then runs fi_info -p efa.

aws-efa-installer installs fi_info to /opt/amazon/efa/bin/ and puts that directory on PATH in its own /etc/profile.d/zippy_efa.sh. The efa.sh that pkg/userdata/mpi.go:102-103 writes only exports FI_PROVIDER and FI_EFA_USE_DEVICE_RDMA; it adds nothing to PATH. So in the SSM non-login shell, fi_info can't be found whether EFA is installed or not.

Verified on an AL2023 node with the installer's output (EFA installer 1.47.0, the same efa_installer.sh spawn runs):

$ ls /etc/profile.d/ | grep -i efa
zippy_efa.sh
$ env -i PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin bash -c 'command -v fi_info || echo NOT-on-default-PATH'
NOT-on-default-PATH
$ env -i PATH=... bash -c 'for p in /etc/profile.d/mpi.sh /etc/profile.d/efa.sh; do [ -f $p ] && . $p; done; command -v fi_info || echo still-missing'
still-missing
$ ls /opt/amazon/efa/bin/
fi_info  fi_mon_sampler  fi_pingpong  fi_strerror ...

Suggested fix

One of these, or both:

  • Probe the absolute path: /opt/amazon/efa/bin/fi_info -p efa. That's the path AWS's own EFA docs use for verification, and it doesn't depend on any profile file.
  • Source /etc/profile.d/*efa*.sh (the installer's zippy_efa.sh included), and/or have spawn's efa.sh also export PATH=/opt/amazon/efa/bin:$PATH. That also helps a workload running fi_info from --command.

A test that would have caught it: render the probe script and run it in env -i with a fixture /opt/amazon/efa/bin/fi_info present, and assert it exits 0. The current tests confirm the check exists, not that it can succeed on a real install layout. That's the same gap #684 closed for mpirun.

Also worth a look, separately

Even once the probe can find fi_info, the installer (./efa_installer.sh -y -g, internet download plus package installs) shares the 5-minute Enrolled budget with cold boot and SSM coming online. I couldn't time it here because the probe never succeeded. If it's tight on large instances, Enrolled could scale when --efa is set.

Cost of hitting this

2× c8g.48xlarge for about 5 min (~$1.30). The drain now works (#683): it terminated the running member, and cohort-cancel took the other. The placement group delete raced the shutdown (InvalidPlacementGroup.InUse), as the #672 PR anticipated; #685 covers the leftover.

Activity

  1. added a commit that references this issue on Oct 4, 2026
    946fcac
  2. scttfrdmn commented on Oct 5, 2026

    @scttfrdmn
    ContributorAuthor

    Confirmed on hardware, 0.120.0 (6dbc308): the --mpi --efa path works end to end. 2× c8g.48xlarge (arm64), us-east-1a, a real multi-node GCHP run over EFA.

    step time (UTC) elapsed
    spawn launch ... --count 2 --mpi --efa --skip-mpi-install 02:56:37 0
    RunInstances (both members) 02:57:03 0:26
    cohort enrolled + assembled, CLI returns 02:59:16 2:39
    --command starts on both nodes (#678 gate satisfied, hostfile present) 02:59:19 2:42
    fi_info -p efa → rdmap150s0-rdm 02:59:56 3:19
    all nodes ready (stack synced, 5 lith FUSE mounts, NFS run dir) 03:00:09 3:32
    GCHP C24 TransportTracers, 48 ranks (2×24), 1 sim day, SUCCEEDED 03:01:19 4:42
    node 0 self-terminates (--on-complete terminate) 03:02:16 5:39
    node 1 self-terminates 03:03:16 6:39

    That this ran at all is evidence the fabric works. GCHP/MAPL aborts at MPI_Win_create over TCP, as described in #659, so a 2-node run can't succeed without the EFA provider.

    The probe fix (#696) is what turned this from PhaseBudgetExceeded at phase=enrolled into a 2:39 enrollment on the same instance type. The per-launch ClientToken fix also held: the job-array name suffix changes per launch, and there were no idempotency errors.

    One attempt between these failed. That was my own wrapper, not spawn: it ran set -u, and GCHP's setCommonRunSettings.sh dereferences $4, which aborts the sourcing shell. spawn handled that failure correctly too. --on-complete terminated the node whose command exited, and nothing billed to TTL.

    Smoke cost across the three 2-node attempts was about $4.30, plus about $0.02 for the c7g.large plumbing check.

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