Skip to content

Commit 10c1260

Browse files
committed
github-action: add a MPI4PY sanity check
seems like mpi4py finds a problem almost every time we advance openpmix/prrte shas so catch it early here. we test mpi4py master as it contains the mpi 4 stuff that so often breaks. related to open-mpi#12195 Signed-off-by: Howard Pritchard <howardp@lanl.gov>
1 parent 5fa32f7 commit 10c1260

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed

.github/workflows/ompi_mpi4py.yaml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: GitHub Action CI
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
mpi4py:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 60
9+
steps:
10+
- name: Configure hostname
11+
run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null
12+
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
13+
14+
- name: Install depencencies
15+
run: sudo apt-get install -y -q
16+
libnuma-dev
17+
18+
- name: Checkout Open MPI
19+
uses: actions/checkout@v4
20+
with:
21+
path: mpi-build
22+
submodules: recursive
23+
24+
- name: Bootstrap Open MPI
25+
run: ./autogen.pl
26+
working-directory: mpi-build
27+
28+
- name: Configure Open MPI
29+
run: ./configure
30+
--disable-dependency-tracking
31+
--enable-debug
32+
--enable-mem-debug
33+
--disable-sphinx
34+
--disable-man-pages
35+
--disable-mpi-fortran
36+
LDFLAGS=-Wl,-rpath,/usr/local/lib
37+
working-directory: mpi-build
38+
39+
- name: Build MPI
40+
run: make -j 2
41+
working-directory: mpi-build
42+
43+
- name: Install MPI
44+
run: sudo make install
45+
working-directory: mpi-build
46+
47+
- name: Tweak MPI
48+
run: |
49+
# Tweak MPI
50+
mca_params="$HOME/.openmpi/mca-params.conf"
51+
mkdir -p "$(dirname "$mca_params")"
52+
echo mpi_param_check = true >> "$mca_params"
53+
echo mpi_show_handle_leaks = true >> "$mca_params"
54+
echo rmaps_base_oversubscribe = true >> "$mca_params"
55+
mca_params="$HOME/.prte/mca-params.conf"
56+
mkdir -p "$(dirname "$mca_params")"
57+
echo rmaps_default_mapping_policy = :oversubscribe >> "$mca_params"
58+
59+
- name: Show MPI
60+
run: ompi_info
61+
62+
- name: Show MPICC
63+
run: mpicc -show
64+
65+
- name: Use Python
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: 3
69+
architecture: x64
70+
71+
- name: Install Python packages (build)
72+
run: python -m pip install --upgrade
73+
setuptools pip wheel
74+
75+
- name: Install Python packages (test)
76+
run: python -m pip install --upgrade
77+
numpy cffi pyyaml
78+
79+
- name: Checkout mpi4py
80+
uses: actions/checkout@v4
81+
with:
82+
repository: "mpi4py/mpi4py"
83+
84+
- name: Install mpi4py
85+
run: python -m pip install .
86+
env:
87+
CFLAGS: "-O0"
88+
89+
- name: Test mpi4py (singleton)
90+
run: python test/main.py -v
91+
if: ${{ true }}
92+
- name: Test mpi4py (np=1)
93+
run: mpiexec -n 1 python test/main.py -v
94+
- name: Test mpi4py (np=2)
95+
run: mpiexec -n 2 python test/main.py -v -f
96+
- name: Test mpi4py (np=3)
97+
run: mpiexec -n 3 python test/main.py -v -f
98+
if: ${{ true }}
99+
timeout-minutes: 10
100+
- name: Test mpi4py (np=4)
101+
run: mpiexec -n 4 python test/main.py -v -f
102+
if: ${{ true }}
103+
timeout-minutes: 20
104+
- name: Test mpi4py (np=5)
105+
run: mpiexec -n 5 python test/main.py -v -f
106+
if: ${{ true }}
107+
timeout-minutes: 20

0 commit comments

Comments
 (0)