Skip to content

Commit 42da2ba

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 * Use manylinux_2_28 image * Use MACOSX_DEPLOYMENT_TARGET=11.0 * Reproducible builds * Strip binaries to reduce size * Remove unneeded binaries * Package various licenses
1 parent bdba910 commit 42da2ba

22 files changed

+1008
-164
lines changed

.github/workflows/cd-wheel.yml

Lines changed: 38 additions & 23 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,18 @@ jobs:
113113
if: ${{ runner.os == 'macOS' }}
114114
name: setup-macOS
115115
run: |
116+
# set macOS deployment target
117+
echo MACOSX_DEPLOYMENT_TARGET=11.0 >> $GITHUB_ENV
116118
# create gfortran symlink
117119
cd $(brew --prefix)/bin
118120
gfortran=$(ls gfortran-* | sort | head -n 1)
119121
sudo ln -s $gfortran gfortran
122+
# unlink libevent
123+
brew unlink libevent || true
120124
# install autotools
121125
brew install autoconf
122126
brew install automake
123127
brew install libtool
124-
# unlink libevent
125-
brew unlink libevent || true
126128
# install uv
127129
brew install uv
128130
@@ -131,20 +133,19 @@ jobs:
131133
with:
132134
python-version: 3
133135

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

143139
- id: source-date-epoch
144140
run: |
145-
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
141+
read -r SOURCE_DATE_EPOCH < source-date-epoch || true
142+
SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-$(git log -1 --pretty=%ct)}
146143
echo SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH >> $GITHUB_ENV
147-
echo $(git log -1 --pretty=%ci) [timestamp=$SOURCE_DATE_EPOCH]
144+
test $(uname) = Darwin && (echo ZERO_AR_DATE=1 >> $GITHUB_ENV)
145+
echo [SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH] $(
146+
date -u -d @$SOURCE_DATE_EPOCH 2>/dev/null ||
147+
date -u -r $SOURCE_DATE_EPOCH 2>/dev/null )
148+
working-directory: package/source
148149

149150
- id: build
150151
uses: pypa/[email protected]
@@ -154,11 +155,13 @@ jobs:
154155
output-dir: wheelhouse
155156
env:
156157
CIBW_BUILD_FRONTEND: "build[uv]"
157-
CIBW_BUILD: "cp312-*"
158+
CIBW_BUILD: "cp313-*"
158159
CIBW_SKIP: "*musllinux*"
159160
CIBW_ARCHS: "${{ matrix.arch }}"
160161
CIBW_BEFORE_ALL: >-
161162
bash {project}/cibw-build-mpi.sh
163+
CIBW_BEFORE_BUILD: >-
164+
bash {project}/cibw-patch-cmd.sh
162165
CIBW_TEST_COMMAND: >-
163166
bash {project}/cibw-check-mpi.sh
164167
CIBW_ENVIRONMENT_PASS: >-
@@ -171,12 +174,8 @@ jobs:
171174
SOURCE="$PWD/package/source"
172175
WORKDIR="$PWD/package/workdir"
173176
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}
177+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
178+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
180179

181180
- id: sha256sum
182181
run: |
@@ -190,8 +189,24 @@ jobs:
190189
- id: upload
191190
uses: actions/upload-artifact@v4
192191
with:
193-
name: wheel-${{ inputs.mpiname }}-${{ matrix.os }}-${{ matrix.arch }}
192+
name: "wheel-${{ inputs.mpiname }}-\
193+
${{ inputs.version || 'latest' }}-\
194+
${{ matrix.os }}-${{ matrix.arch }}"
194195
path: wheelhouse/*.whl
195196

196197
- id: check
197-
run: ./check-wheel.sh wheelhouse
198+
run: ./wheel-check.sh wheelhouse
199+
200+
- id: test
201+
run: |
202+
# ./wheel-test.sh
203+
test $(uname) = Linux && runner=(
204+
docker run
205+
-e MPINAME=${{ inputs.mpiname }}
206+
-v $(pwd):/${{ github.workspace }}
207+
-w ${{ github.workspace }}
208+
--platform linux/${{
209+
matrix.arch == 'aarch64' && 'arm64' ||
210+
matrix.arch == 'x86_64' && 'amd64'
211+
}} python:3)
212+
${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: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,38 @@ on: # yamllint disable-line rule:truthy
1111

1212
jobs:
1313

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

19-
openmpi:
20+
mpich-42:
21+
uses: ./.github/workflows/cd-wheel.yml
22+
with:
23+
mpiname: mpich
24+
version: 4.2.3
25+
26+
mpich-41:
27+
uses: ./.github/workflows/cd-wheel.yml
28+
with:
29+
mpiname: mpich
30+
version: 4.1.3
31+
32+
mpich-34:
33+
uses: ./.github/workflows/cd-wheel.yml
34+
with:
35+
mpiname: mpich
36+
version: 3.4.3
37+
38+
openmpi-50:
39+
uses: ./.github/workflows/cd-wheel.yml
40+
with:
41+
mpiname: openmpi
42+
version:
43+
44+
openmpi-41:
2045
uses: ./.github/workflows/cd-wheel.yml
2146
with:
2247
mpiname: openmpi
48+
version: 4.1.7

.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)