Skip to content

Commit 18bfd3e

Browse files
committed
Support for OFI and UCX
* MPICH: Configure --with-device=ch4:ucx,ofi * Open MPI: Configure --with-ucx --with-ofi * Remove support for ppc64le architecture * Use manylinux 2.28 image * Reproducible builds * Strip binaries to reduce size * Remove unneeded binaries * Package various licenses
1 parent 594ff39 commit 18bfd3e

21 files changed

+961
-159
lines changed

.github/workflows/cd-wheel.yml

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ on: # yamllint disable-line rule:truthy
5454
- all
5555
- Linux
5656
- Linux-aarch64
57-
- Linux-ppc64le
5857
- Linux-x86_64
5958
- macOS
6059
- macOS-arm64
@@ -76,11 +75,11 @@ jobs:
7675
shell: python
7776
name: 'setup build matrix'
7877
run: |
78+
# setup build matrix # "
7979
keys = ("os", "arch", "runner")
8080
rows = [
81-
("Linux", "aarch64", "ubuntu-22.04"),
82-
("Linux", "ppc64le", "ubuntu-22.04"),
83-
("Linux", "x86_64", "ubuntu-22.04"),
81+
("Linux", "aarch64", "ubuntu-24.04-arm"),
82+
("Linux", "x86_64", "ubuntu-24.04"),
8483
("macOS", "arm64", "macos-14"),
8584
("macOS", "x86_64", "macos-13"),
8685
]
@@ -93,6 +92,7 @@ jobs:
9392
import os, json
9493
with open(os.getenv("GITHUB_OUTPUT"), "w") as out:
9594
print(f"matrix={json.dumps(matrix)}", file=out)
95+
# "
9696
9797
build:
9898
needs: setup
@@ -113,16 +113,21 @@ jobs:
113113
if: ${{ runner.os == 'macOS' }}
114114
name: setup-macOS
115115
run: |
116+
# set macOS deployment target
117+
case $(uname -m) in
118+
arm64) echo MACOSX_DEPLOYMENT_TARGET=11.0 >> $GITHUB_ENV ;;
119+
x86_64) echo MACOSX_DEPLOYMENT_TARGET=10.15 >> $GITHUB_ENV ;;
120+
esac
116121
# create gfortran symlink
117122
cd $(brew --prefix)/bin
118123
gfortran=$(ls gfortran-* | sort | head -n 1)
119124
sudo ln -s $gfortran gfortran
125+
# unlink libevent
126+
brew unlink libevent || true
120127
# install autotools
121128
brew install autoconf
122129
brew install automake
123130
brew install libtool
124-
# unlink libevent
125-
brew unlink libevent || true
126131
# install uv
127132
brew install uv
128133
@@ -131,20 +136,19 @@ jobs:
131136
with:
132137
python-version: 3
133138

134-
- id: setup-qemu
135-
if: ${{ runner.os == 'Linux' }}
136-
uses: docker/setup-qemu-action@v3
137-
with:
138-
platforms: all
139-
140139
- id: bootstrap
141140
run: ./bootstrap.sh
142141

143142
- id: source-date-epoch
144143
run: |
145-
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
144+
read -r SOURCE_DATE_EPOCH < source-date-epoch || true
145+
SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-$(git log -1 --pretty=%ct)}
146146
echo SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH >> $GITHUB_ENV
147-
echo $(git log -1 --pretty=%ci) [timestamp=$SOURCE_DATE_EPOCH]
147+
test $(uname) = Darwin && (echo ZERO_AR_DATE=1 >> $GITHUB_ENV)
148+
echo [SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH] $(
149+
date -u -d @$SOURCE_DATE_EPOCH 2>/dev/null ||
150+
date -u -r $SOURCE_DATE_EPOCH 2>/dev/null )
151+
working-directory: package/source
148152

149153
- id: build
150154
uses: pypa/[email protected]
@@ -153,12 +157,16 @@ jobs:
153157
package-dir: package
154158
output-dir: wheelhouse
155159
env:
160+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
161+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
156162
CIBW_BUILD_FRONTEND: "build[uv]"
157163
CIBW_BUILD: "cp312-*"
158164
CIBW_SKIP: "*musllinux*"
159165
CIBW_ARCHS: "${{ matrix.arch }}"
160166
CIBW_BEFORE_ALL: >-
161167
bash {project}/cibw-build-mpi.sh
168+
CIBW_BEFORE_BUILD: >-
169+
bash {project}/cibw-patch-cmd.sh
162170
CIBW_TEST_COMMAND: >-
163171
bash {project}/cibw-check-mpi.sh
164172
CIBW_ENVIRONMENT_PASS: >-
@@ -171,12 +179,6 @@ jobs:
171179
SOURCE="$PWD/package/source"
172180
WORKDIR="$PWD/package/workdir"
173181
DESTDIR="$PWD/package/install"
174-
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
175-
delocate-wheel
176-
--ignore-missing-dependencies
177-
--exclude libmpi --exclude libpmpi
178-
--require-archs {delocate_archs}
179-
-w {dest_dir} -v {wheel}
180182
181183
- id: sha256sum
182184
run: |
@@ -190,8 +192,24 @@ jobs:
190192
- id: upload
191193
uses: actions/upload-artifact@v4
192194
with:
193-
name: wheel-${{ inputs.mpiname }}-${{ matrix.os }}-${{ matrix.arch }}
195+
name: "wheel-${{ inputs.mpiname }}-\
196+
${{ inputs.version || 'latest' }}-\
197+
${{ matrix.os }}-${{ matrix.arch }}"
194198
path: wheelhouse/*.whl
195199

196200
- id: check
197-
run: ./check-wheel.sh wheelhouse
201+
run: ./wheel-check.sh wheelhouse
202+
203+
- id: test
204+
run: |
205+
# ./wheel-test.sh
206+
test $(uname) = Linux && runner=(
207+
docker run
208+
-e MPINAME=${{ inputs.mpiname }}
209+
-v $(pwd):/${{ github.workspace }}
210+
-w ${{ github.workspace }}
211+
--platform linux/${{
212+
matrix.arch == 'aarch64' && 'arm64' ||
213+
matrix.arch == 'x86_64' && 'amd64'
214+
}} python:3)
215+
${runner[@]:-} ./wheel-test.sh wheelhouse

.github/workflows/cd.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ on: # yamllint disable-line rule:truthy
3232
- all
3333
- Linux
3434
- Linux-aarch64
35-
- Linux-ppc64le
3635
- Linux-x86_64
3736
- macOS
3837
- macOS-arm64

.github/workflows/ci.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,32 @@ on: # yamllint disable-line rule:truthy
1111

1212
jobs:
1313

14-
mpich:
14+
mpich-42:
1515
uses: ./.github/workflows/cd-wheel.yml
1616
with:
1717
mpiname: mpich
18+
version:
1819

19-
openmpi:
20+
mpich-41:
21+
uses: ./.github/workflows/cd-wheel.yml
22+
with:
23+
mpiname: mpich
24+
version: 4.1.3
25+
26+
mpich-34:
27+
uses: ./.github/workflows/cd-wheel.yml
28+
with:
29+
mpiname: mpich
30+
version: 3.4.3
31+
32+
openmpi-50:
33+
uses: ./.github/workflows/cd-wheel.yml
34+
with:
35+
mpiname: openmpi
36+
version:
37+
38+
openmpi-41:
2039
uses: ./.github/workflows/cd-wheel.yml
2140
with:
2241
mpiname: openmpi
42+
version: 4.1.6

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
/venv/
66
*.egg-info/
77
*.tar.gz
8+
*.tar.bz2
89
*~

.yamllint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# https://github.com/adrienverge/yamllint
2+
3+
extends: default
4+
rules:
5+
document-start: disable
6+
colons:
7+
max-spaces-before: 0
8+
max-spaces-after: -1
9+
indentation:
10+
indent-sequences: whatever
11+
line-length:
12+
level: warning
13+
max: 80

LICENSE.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
BSD 2-Clause License
2-
3-
Copyright (c) 2024, MPI for Python
1+
Copyright (c) 2025, Lisandro Dalcin
42

53
Redistribution and use in source and binary forms, with or without
64
modification, are permitted provided that the following conditions are met:
@@ -12,6 +10,10 @@ modification, are permitted provided that the following conditions are met:
1210
this list of conditions and the following disclaimer in the documentation
1311
and/or other materials provided with the distribution.
1412

13+
3. Neither the name of the copyright holder nor the names of its contributors
14+
may be used to endorse or promote products derived from this software
15+
without specific prior written permission.
16+
1517
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1618
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1719
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
build:
22
./bootstrap.sh
3-
./build-wheel.sh dist
4-
./check-wheel.sh dist
3+
./wheel-build.sh dist
4+
./wheel-check.sh dist
5+
./wheel-test.sh dist
56

67
lint:
78
codespell *.sh */*.py
89
shellcheck *.sh
9-
ruff check -qn package/*.py
10+
ruff check -qn */*.py
1011
yamllint .github/
1112

1213
clean:
14+
$(RM) -r package/METADATA
15+
$(RM) -r package/LICENSE*
1316
$(RM) -r package/build
14-
$(RM) -r package/LICENSE
15-
$(RM) -r package/install
1617
$(RM) -r package/source
1718
$(RM) -r package/workdir
19+
$(RM) -r package/install
1820
$(RM) -r package/*.egg-info
1921
$(RM) -r .*_cache

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This repository builds and publishes [MPICH](https://www.mpich.org) and
55
a variety of
66

77
- operating systems: *Linux*, *macOS*;
8-
- processor architectures: *AMD64*, *ARM64*, *PPC64*;
8+
- processor architectures: *AMD64*, *ARM64*;
99
- Python implementations: *CPython*, *PyPy*.
1010

1111
MPI wheels are uploaded to the [Anaconda.org](https://anaconda.org/mpi4py)

0 commit comments

Comments
 (0)