Skip to content

Give the Linux wheel verification an MPI to load - #193

Merged
ryanmrichard merged 1 commit into
masterfrom
fix_linux_import_check_mpi
Sep 14, 2026
Merged

ryanmrichard merged 1 commit into
masterfrom
fix_linux_import_check_mpi

Conversation

@ryanmrichard

Copy link
Copy Markdown
Member

Summary

The Linux build_pypi_dist leg fails verification for any MPI-linked wheel:

Importing parallelzone ...
ImportError: libmpi.so.40: cannot open shared object file: No such file or directory

The wheel itself builds and repairs correctly — this is the "Verify Wheel Installs" step.

Why

By design the Linux wheel does not vendor MPI. CIBW_REPAIR_WHEEL_COMMAND_LINUX excludes libmpi/libopen-rte/libopen-pal so it links against the runtime system's OpenMPI, because vendoring is a dead end — auditwheel bundles shared libraries but never the accompanying bin/orted that OpenMPI's singleton startup needs. The action documents this at lines 244-250.

The other half of that contract is that something has to supply MPI wherever such a wheel is imported. Nothing did: CIBW_BEFORE_ALL_LINUX builds OpenMPI into /usr/local/openmpi inside the manylinux container, while verification runs on the runner host, which has no MPI at all.

Installing libopenmpi-dev/openmpi-bin there makes the host resemble the end user's machine the wheel already documents as a requirement. Same packages setup_nwx_dev_env uses, so the ABI matches what CIBW_BEFORE_ALL_LINUX compiled against (Ubuntu 24.04 ships the OpenMPI 4.1.x providing libmpi.so.40).

macOS is unaffected — delocate vendors MPI into the wheel there. That's exactly the split seen in the run that surfaced this: macos-14 passed, ubuntu-latest failed.

Not a regression

import_check.py arrived in 65681cd — the same commit that introduced the SKBUILD_CMAKE_DEFINE quoting defect fixed in #192. Every build died before reaching verification, so this check had never once run on Linux. #192 fixed the first bug and uncovered the second.

How it was found

NWChemEx/ParallelZone#161, a no-op rebuild to republish wheels against NWXCMake 0.2.2. deploy_to_pypi has needs: build_pypi_dist, so the failing Linux leg skipped the publish entirely and nothing was released — which is the blocker for rebuilding the ecosystem.

🤖 Generated with Claude Code

The Linux leg's import check has never been able to pass for an MPI-linked
wheel:

  ImportError: libmpi.so.40: cannot open shared object file

By design the Linux wheel does not vendor MPI --
CIBW_REPAIR_WHEEL_COMMAND_LINUX excludes libmpi/libopen-rte/libopen-pal so it
links against the runtime system's OpenMPI, because vendoring is a dead end
(auditwheel bundles shared libraries but never the bin/orted that OpenMPI's
singleton startup needs). The other half of that contract is that something
must supply MPI wherever the wheel is imported, and nothing did:
CIBW_BEFORE_ALL_LINUX builds OpenMPI into /usr/local/openmpi inside the
manylinux *container*, while "Verify Wheel Installs" runs on the runner host.

Installing libopenmpi-dev/openmpi-bin there makes the host resemble the end
user's machine the wheel already documents as a requirement. Same packages
setup_nwx_dev_env uses, so the ABI matches what CIBW_BEFORE_ALL_LINUX compiled
against.

macOS is unaffected -- delocate vendors MPI into the wheel there -- which is
why the ParallelZone release that surfaced this passed on macos-14 and failed
only on Linux.

This was masked rather than new: import_check.py arrived in 65681cd, the same
commit that introduced the SKBUILD_CMAKE_DEFINE quoting defect fixed in #192.
Every build died before reaching verification, so the check had never actually
run on Linux. Found by NWChemEx/ParallelZone#161.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ryanmrichard
ryanmrichard merged commit b762441 into master Sep 14, 2026
2 of 3 checks passed
@ryanmrichard
ryanmrichard deleted the fix_linux_import_check_mpi branch September 14, 2026 16:59
@github-actions

Copy link
Copy Markdown
Contributor

🚀 [bumpr] Bumped!
New version:v0.3.92
Changes:v0.3.91...v0.3.92

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.

1 participant