Skip to content

--mpi --efa runs the distribution's Open MPI, not the EFA installer's /opt/amazon/openmpi #1491

Closed

Description

@scttfrdmn

Summary

With --mpi --efa, mpirun is the distribution's Open MPI, not the EFA installer's /opt/amazon/openmpi. This holds on AL2, AL2023 and, with #1487, Ubuntu. AWS documents the EFA installer's Open MPI, built against its own libfabric, as the one to use with EFA.

Evidence (code and containers; not checked on EFA hardware)

  • Install order: in pkg/userdata/mpi.go the install step runs first (yum install openmpi openmpi-devel, or apt-get install openmpi-bin libopenmpi-dev with MPI: add an apt install path for Ubuntu AMIs (today --mpi on Ubuntu can never work) #1487), and only then efa_installer.sh -y -g.
  • PATH: spawn's /etc/profile.d/mpi.sh prepends /usr/lib64/openmpi/bin, and nothing adds /opt/amazon/openmpi/bin to the script's PATH. The installer's own profile.d snippet is read only by login shells, and the user data is not one. So rank 0's mpirun resolves to /usr/lib64/openmpi/bin/mpirun on AL and /usr/bin/mpirun on Ubuntu.
  • The distribution builds do have an OFI path:
    • ompi_info shows MCA mtl: ofi for AL2's Open MPI 4.0.1, and mtl: ofi and btl: ofi for Ubuntu 24.04's 4.1.6.
    • Ubuntu 24.04's libfabric1 is 1.17.0, depends on libibverbs1/ibverbs-providers, and contains the efa provider's symbols.
    • So EFA may well work through them, on an older libfabric than the installer's. Which libfabric mca_mtl_ofi.so loads once the installer has added its own is not known: it depends on the ld.so.conf order.

To decide

  • Should --efa deliberately run /opt/amazon/openmpi/bin/mpirun? That means putting it first on PATH, or invoking it by absolute path, which also gives Open MPI the prefix it needs to find orted on the peers. It would also mean skipping the distribution install when --efa is set.
  • Or keep the distribution's Open MPI, and document and verify it.

Either way, check it on EFA hardware (e.g. 2x c7gn) with fi_info -p efa and an OSU latency run, on AL2023 and Ubuntu.

Related: #1487.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions