Skip to content

Commit b80c88d

Browse files
committed
abi: Test MPI ABI build
1 parent c66f44a commit b80c88d

File tree

3 files changed

+228
-0
lines changed

3 files changed

+228
-0
lines changed

.github/workflows/@ALL.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ on:
1919

2020
jobs:
2121

22+
abi:
23+
uses: ./.github/workflows/abi.yml
24+
with:
25+
mpi4py-git: ${{ inputs.mpi4py-git }}
26+
mpi4py-ref: ${{ inputs.mpi4py-ref }}
27+
2228
mpich:
2329
uses: ./.github/workflows/mpich.yml
2430
with:

.github/workflows/abi.yml

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
name: abi
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
mpi4py-git:
7+
description: 'mpi4py git'
8+
default: mpi4py/mpi4py
9+
required: false
10+
type: string
11+
mpi4py-ref:
12+
description: 'mpi4py ref'
13+
default: ''
14+
required: false
15+
type: string
16+
workflow_dispatch:
17+
inputs:
18+
mpi-git:
19+
description: 'MPI git'
20+
default: pmodels/mpich
21+
required: false
22+
type: string
23+
mpi-ref:
24+
description: 'MPI ref'
25+
default: ''
26+
required: false
27+
type: string
28+
mpi4py-git:
29+
description: 'mpi4py git'
30+
default: mpi4py/mpi4py
31+
required: false
32+
type: string
33+
mpi4py-ref:
34+
description: 'mpi4py ref'
35+
default: ''
36+
required: false
37+
type: string
38+
push:
39+
branches:
40+
- ci/all
41+
- ci/abi
42+
schedule:
43+
- cron: '0 0 * * *'
44+
45+
jobs:
46+
47+
build:
48+
runs-on: ubuntu-22.04
49+
50+
steps:
51+
52+
- name: Checkout MPI stubs
53+
uses: actions/checkout@v4
54+
with:
55+
repository: mpiwg-abi/header_and_stub_library
56+
ref: main
57+
path: mpi-stubs
58+
59+
- name: Build MPI stubs
60+
run: make
61+
working-directory: mpi-stubs
62+
63+
- name: Add MPI stubs to PATH
64+
run: |
65+
mpi_stubs=${{ github.workspace }}/mpi-stubs
66+
echo $mpi_stubs/bin >> $GITHUB_PATH
67+
68+
- name: Use Python
69+
uses: actions/setup-python@v5
70+
with:
71+
python-version: 3
72+
architecture: x64
73+
74+
- name: Checkout mpi4py
75+
uses: actions/checkout@v4
76+
with:
77+
repository: ${{ inputs.mpi4py-git || 'mpi4py/mpi4py' }}
78+
ref: ${{ inputs.mpi4py-ref }}
79+
path: mpi4py
80+
81+
- name: Build mpi4py wheel
82+
run: python -m pip wheel ./mpi4py
83+
env:
84+
CPPFLAGS: "-DMPI_ABI=1"
85+
CFLAGS: "-O0"
86+
87+
- name: Upload mpi4py wheel
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: mpi4py-wheel
91+
path: mpi4py-*.whl
92+
93+
94+
mpich:
95+
needs: build
96+
runs-on: ubuntu-22.04
97+
timeout-minutes: 60
98+
99+
steps:
100+
101+
- name: Configure hostname
102+
run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null
103+
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
104+
105+
- name: Install depencencies
106+
run: sudo apt-get install -y -q
107+
libhwloc-dev
108+
libfabric-dev
109+
libibverbs-dev
110+
libpsm-infinipath1-dev
111+
libpsm2-dev
112+
librdmacm-dev
113+
114+
- name: Checkout MPI
115+
uses: actions/checkout@v4
116+
with:
117+
repository: ${{ inputs.mpi-git || 'pmodels/mpich' }}
118+
ref: ${{ inputs.mpi-ref }}
119+
path: mpi-build
120+
submodules: recursive
121+
122+
- name: Bootstrap MPI
123+
run: ./autogen.sh
124+
working-directory: mpi-build
125+
126+
- name: Configure MPI
127+
run: ./configure
128+
--with-pm=hydra
129+
--with-device=ch4:ofi
130+
--disable-dependency-tracking
131+
--disable-maintainer-mode
132+
--disable-doc
133+
--enable-g=all
134+
--enable-fast=none
135+
--enable-mpi-abi
136+
working-directory: mpi-build
137+
138+
- name: Build MPI
139+
run: make -j $(nproc)
140+
working-directory: mpi-build
141+
142+
- name: Install MPI
143+
run: sudo make install
144+
working-directory: mpi-build
145+
146+
- name: Run ldconfig
147+
run: sudo ldconfig
148+
working-directory: mpi-build
149+
150+
- name: Tweak MPI
151+
run: |
152+
# Tweak MPI
153+
echo "RDMAV_FORK_SAFE=1" >> $GITHUB_ENV
154+
155+
- name: Show MPI
156+
run: mpichversion
157+
158+
- name: Use Python
159+
uses: actions/setup-python@v5
160+
with:
161+
python-version: 3
162+
architecture: x64
163+
164+
- name: Checkout mpi4py
165+
uses: actions/checkout@v4
166+
with:
167+
repository: ${{ inputs.mpi4py-git || 'mpi4py/mpi4py' }}
168+
ref: ${{ inputs.mpi4py-ref }}
169+
170+
- name: Download mpi4py wheel
171+
uses: actions/download-artifact@v4
172+
with:
173+
name: mpi4py-wheel
174+
path: dist
175+
176+
- name: Install mpi4py wheel
177+
run: python -m pip install mpi4py
178+
--no-index --find-links=dist
179+
180+
- name: Test mpi4py (singleton)
181+
run: python test/main.py -v
182+
if: ${{ true }}
183+
- name: Test mpi4py (np=1)
184+
run: mpiexec -n 1 python test/main.py -v
185+
- name: Test mpi4py (np=2)
186+
run: mpiexec -n 2 python test/main.py -v -f
187+
timeout-minutes: 10
188+
- name: Test mpi4py (np=3)
189+
run: mpiexec -n 3 python test/main.py -v -f
190+
timeout-minutes: 10
191+
- name: Test mpi4py (np=4)
192+
run: mpiexec -n 4 python test/main.py -v -f
193+
timeout-minutes: 10
194+
- name: Test mpi4py (np=5)
195+
run: mpiexec -n 5 python test/main.py -v -f
196+
if: ${{ false }}
197+
timeout-minutes: 10
198+
199+
- name: Test mpi4py.futures (singleton)
200+
run: python demo/futures/test_futures.py -v
201+
if: ${{ true }}
202+
- name: Test mpi4py.futures (np=1)
203+
run: mpiexec -n 1 python demo/futures/test_futures.py -v
204+
- name: Test mpi4py.futures (np=2)
205+
run: mpiexec -n 2 python demo/futures/test_futures.py -v
206+
- name: Test mpi4py.futures (np=3)
207+
run: mpiexec -n 3 python demo/futures/test_futures.py -v
208+
209+
- name: Test mpi4py.futures (np=1)
210+
run: mpiexec -n 1 python -m mpi4py.futures demo/futures/test_futures.py -v
211+
- name: Test mpi4py.futures (np=2)
212+
run: mpiexec -n 2 python -m mpi4py.futures demo/futures/test_futures.py -v
213+
- name: Test mpi4py.futures (np=3)
214+
run: mpiexec -n 3 python -m mpi4py.futures demo/futures/test_futures.py -v
215+
216+
- name: Test mpi4py.run
217+
run: python demo/test-run/test_run.py -v
218+
- name: Test init-fini
219+
run: bash demo/init-fini/run.sh
220+
- name: Test check-mpiexec
221+
run: bash demo/check-mpiexec/run.sh

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CI testing for [mpi4py](https://github.com/mpi4py/mpi4py) with in-development MP
44

55
| Implementation | Status |
66
| :--- | :--- |
7+
| [ABI](https://github.com/mpiwg-abi/header_and_stub_library) | [![abi](https://github.com/mpi4py/mpi4py-testing/actions/workflows/abi.yml/badge.svg)](https://github.com/mpi4py/mpi4py-testing/actions/workflows/abi.yml) |
78
| [MPICH](https://github.com/pmodels/mpich) | [![mpich](https://github.com/mpi4py/mpi4py-testing/actions/workflows/mpich.yml/badge.svg)](https://github.com/mpi4py/mpi4py-testing/actions/workflows/mpich.yml) |
89
| [MVAPICH](https://mvapich.cse.ohio-state.edu/) | [![mvapich](https://github.com/mpi4py/mpi4py-testing/actions/workflows/mvapich.yml/badge.svg)](https://github.com/mpi4py/mpi4py-testing/actions/workflows/mvapich.yml) |
910
| [Intel MPI](https://software.intel.com/intel-mpi-library) | [![intelmpi](https://github.com/mpi4py/mpi4py-testing/actions/workflows/intelmpi.yml/badge.svg)](https://github.com/mpi4py/mpi4py-testing/actions/workflows/intelmpi.yml) |

0 commit comments

Comments
 (0)