Skip to content

Commit 98d7609

Browse files
CI pipeline for OpenMPI (#20)
1 parent 569e1bc commit 98d7609

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
3+
name: OpenMPI_test_env
4+
channels:
5+
- conda-forge
6+
dependencies:
7+
- pytest
8+
- openmpi
9+
- mpi4py

.github/workflows/ci_pipeline.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ on:
99
- cron: '1 5 * * 1'
1010

1111
jobs:
12-
1312
tests:
1413
runs-on: ubuntu-latest
1514
strategy:
1615
fail-fast: false
1716
matrix:
1817
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
18+
mpi: ['mpich', 'openmpi']
1919
defaults:
2020
run:
2121
shell: bash -l {0}
@@ -25,12 +25,20 @@ jobs:
2525
- name: Install Conda environment with Micromamba
2626
uses: mamba-org/setup-micromamba@v1
2727
with:
28-
environment-file: ".github/etc/test_environment_mpich.yml"
28+
environment-file: ".github/etc/test_environment_${{ matrix.mpi }}.yml"
2929
create-args: >-
3030
python=${{ matrix.python }}
3131
- name: Install mpi-pytest as a package in the current environment
3232
run: |
3333
pip install --no-deps -e .
3434
- name: Run tests
35+
if: matrix.mpi == 'mpich'
3536
run: |
3637
pytest --continue-on-collection-errors -v tests
38+
- name: Run tests
39+
if: matrix.mpi == 'openmpi'
40+
run: |
41+
for n in $(seq 1 3);
42+
do
43+
mpiexec --oversubscribe -np ${n} pytest --continue-on-collection-errors -v -m "parallel[${n}]" tests
44+
done

0 commit comments

Comments
 (0)