Skip to content

build: compile OpenPMIx from source for MPI plugin in Dockerfile - #602

Merged
yansun1996 merged 2 commits into
ROCm:mainfrom
sgopinath1:mpi_docker
Aug 9, 2026
Merged

build: compile OpenPMIx from source for MPI plugin in Dockerfile#602
yansun1996 merged 2 commits into
ROCm:mainfrom
sgopinath1:mpi_docker

Conversation

@sgopinath1

Copy link
Copy Markdown
Collaborator

Summary

Nightly and release builds with BUILD_MPI_PLUGIN=1 fail in the Docker builder because AlmaLinux 8 has no openpmix-devel package. The distro pmix-devel RPM (PowerTools) ships PMIx 2.2.x, which is below Spur's pmix_min_version (4.1.0).

This change builds OpenPMIx 5.0.3 from source in the AlmaLinux 8 builder stage when BUILD_MPI_PLUGIN=1, then compiles spur-mpi-pmix against the installed pkg-config metadata. Nightly/release tarballs can include a functional lib/spur/spur_mpi_pmix.so again.

Approach

  • Add OPENPMIX_VERSION build arg (default 5.0.3).
  • Enable PowerTools and install build deps (hwloc-devel, libevent-devel, python3, etc.).
  • Configure/install OpenPMIx to /usr/local, run ldconfig, then cargo build -p spur-mpi-pmix with PKG_CONFIG_PATH set.
  • cd /build before the cargo step so removing the OpenPMIx source tree does not leave the shell in a deleted directory.

No changes to spur-ci-infra — nightly/release build entirely inside this Dockerfile on GitHub-hosted runners.

Test plan

  • Local nightly-equivalent build:
    DOCKER_BUILDKIT=1 docker build --target dist --output type=local,dest=./dist \
      --build-arg BUILD_MPI_PLUGIN=1 \
      --build-arg SPUR_GIT_SHA=$(git rev-parse --short=8 HEAD) \
      --build-arg SPUR_GIT_DIRTY=false .
  • Verified dist/lib/spur/spur_mpi_pmix.so is produced
  • Verified spur, spurctld, spurd, spur-k8s-operator in dist/bin/ (GLIBC_2.28)

AlmaLinux 8 has no openpmix-devel package and distro pmix-devel is 2.x,
below pmix_min_version. Build OpenPMIx 5.0.3 during the builder stage
when BUILD_MPI_PLUGIN=1 so nightly and release tarballs include a functional
spur_mpi_pmix.so.
Copilot AI lite review requested due to automatic review settings August 9, 2026 11:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Docker image builds (nightly/release dist target) when BUILD_MPI_PLUGIN=1 by building OpenPMIx from source on AlmaLinux 8, since the distro-provided PMIx packages are either unavailable (openpmix-devel) or too old (pmix-devel 2.x) for Spur’s minimum supported PMIx version.

Changes:

  • Adds OPENPMIX_VERSION build arg and documents why OpenPMIx must be built from source on AlmaLinux 8.
  • Enables PowerTools and installs build dependencies needed to compile and install OpenPMIx to /usr/local.
  • Builds spur-mpi-pmix with PKG_CONFIG_PATH pointing at the installed OpenPMIx pkg-config metadata.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Dockerfile Outdated
Comment thread Dockerfile
@codecov-commenter

codecov-commenter commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #602      +/-   ##
==========================================
+ Coverage   76.32%   76.48%   +0.16%     
==========================================
  Files         166      167       +1     
  Lines       65511    67824    +2313     
==========================================
+ Hits        49999    51871    +1872     
- Misses      15512    15953     +441     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Address Copilot review on PR ROCm#602: install pkgconf-pkg-config and tar
explicitly for the MPI plugin build, and fetch the OpenPMIx source
archive to a temp file before extraction.

@biluriuday biluriuday left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yansun1996
yansun1996 merged commit 07ab338 into ROCm:main Aug 9, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants