Skip to content

Commit 0b34825

Browse files
committed
abi: Add testing with Open MPI
1 parent cba063c commit 0b34825

File tree

1 file changed

+56
-16
lines changed

1 file changed

+56
-16
lines changed

.github/workflows/abi.yml

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
inputs:
1818
mpi-git:
1919
description: 'MPI git'
20-
default: pmodels/mpich
20+
default: ''
2121
required: false
2222
type: string
2323
mpi-ref:
@@ -92,10 +92,17 @@ jobs:
9292
path: mpi4py-*.whl
9393

9494

95-
mpich:
95+
test:
96+
name: ${{ contains(matrix.mpi-git, 'mpich') && 'mpich' || 'openmpi' }}
9697
needs: build
9798
runs-on: ubuntu-24.04
9899
timeout-minutes: 60
100+
strategy:
101+
fail-fast: false
102+
matrix:
103+
mpi-git: ${{ inputs.mpi-git &&
104+
fromJSON(format('["{0}"]', inputs.mpi-git)) ||
105+
fromJSON('["pmodels/mpich", "open-mpi/ompi"]') }}
99106

100107
steps:
101108

@@ -108,32 +115,55 @@ jobs:
108115
libhwloc-dev
109116
libfabric-dev
110117
libibverbs-dev
118+
libnuma-dev
111119
libpsm-infinipath1-dev
112120
libpsm2-dev
113121
librdmacm-dev
114122

115123
- name: Checkout MPI
116124
uses: actions/checkout@v6
117125
with:
118-
repository: ${{ inputs.mpi-git || 'pmodels/mpich' }}
119-
ref: ${{ inputs.mpi-ref }}
126+
repository: ${{ matrix.mpi-git }}
127+
ref: ${{ inputs.mpi-ref ||
128+
((matrix.mpi-git == 'open-mpi/ompi') &&
129+
'refs/pull/13280/head') || 'main' }}
120130
path: mpi-build
121131
submodules: recursive
122132

123133
- name: Bootstrap MPI
124-
run: ./autogen.sh
134+
run: ${{ contains(matrix.mpi-git, 'mpich') &&
135+
'./autogen.sh' || './autogen.pl' }}
125136
working-directory: mpi-build
126137

127138
- name: Configure MPI
128-
run: ./configure
129-
--with-pm=hydra
130-
--with-device=ch4:ofi
131-
--disable-dependency-tracking
132-
--disable-maintainer-mode
133-
--disable-doc
134-
--enable-g=all
135-
--enable-fast=none
136-
--enable-mpi-abi
139+
run: |
140+
# ./configure ...
141+
if [[ '${{ matrix.mpi-git }}' == *mpich* ]]
142+
then
143+
options=(
144+
--with-pm=hydra
145+
--with-device=ch4:ofi
146+
--disable-dependency-tracking
147+
--disable-maintainer-mode
148+
--disable-doc
149+
--enable-g=all
150+
--enable-fast=none
151+
--enable-mpi-abi
152+
)
153+
else
154+
options=(
155+
--disable-dependency-tracking
156+
--without-ofi
157+
--without-ucx
158+
--without-psm2
159+
--enable-debug
160+
--enable-mem-debug
161+
--disable-sphinx
162+
--disable-oshmem
163+
LDFLAGS=-Wl,-rpath,/usr/local/lib
164+
)
165+
fi
166+
./configure "${options[@]}"
137167
working-directory: mpi-build
138168

139169
- name: Build MPI
@@ -152,9 +182,19 @@ jobs:
152182
run: |
153183
# Tweak MPI
154184
echo "RDMAV_FORK_SAFE=1" >> $GITHUB_ENV
185+
# Tweak MPI
186+
mca_params="$HOME/.openmpi/mca-params.conf"
187+
mkdir -p "$(dirname "$mca_params")"
188+
echo mpi_param_check = true >> "$mca_params"
189+
echo mpi_show_handle_leaks = true >> "$mca_params"
190+
echo rmaps_base_oversubscribe = true >> "$mca_params"
191+
mca_params="$HOME/.prte/mca-params.conf"
192+
mkdir -p "$(dirname "$mca_params")"
193+
echo rmaps_default_mapping_policy = :oversubscribe >> "$mca_params"
155194
156195
- name: Show MPI
157-
run: mpichversion
196+
run: ${{ contains(matrix.mpi-git, 'mpich') &&
197+
'mpichversion' || 'ompi_info' }}
158198

159199
- name: Use Python
160200
uses: actions/setup-python@v6
@@ -194,7 +234,7 @@ jobs:
194234
timeout-minutes: 10
195235
- name: Test mpi4py (np=5)
196236
run: mpiexec -n 5 python test/main.py -v -f
197-
if: ${{ false }}
237+
if: ${{ !contains(matrix.mpi-git, 'mpich') }}
198238
timeout-minutes: 10
199239

200240
- name: Test mpi4py.futures (singleton)

0 commit comments

Comments
 (0)