Skip to content

Commit

Permalink
Merge pull request #55 from adrn/mpi4py-versions
Browse files Browse the repository at this point in the history
Test multiple mpi4py versions
  • Loading branch information
adrn authored Aug 22, 2024
2 parents 86b5e7e + 625ea28 commit 4705892
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
mpi-dist: ["openmpi", "mpich"]
mpipy-version: ["~=3.0", "~=4.0"]
steps:

- uses: actions/checkout@v4
Expand All @@ -31,7 +32,9 @@ jobs:

- name: Install OpenMPI
if: matrix.mpi-dist == 'openmpi'
run: sudo apt-get install -y -q openmpi-bin libopenmpi-dev
run: |
sudo apt-get install -y -q openmpi-bin libopenmpi-dev
mpiexec --version
- name: Install MPICH
if: matrix.mpi-dist == 'mpich'
Expand All @@ -41,6 +44,7 @@ jobs:
run: |
python -m pip install -U pip
python -m pip install -e .[test]
python -m pip install mpi4py${{ matrix.mpipy-version }}
- name: Test MPI
run: |
Expand Down
2 changes: 2 additions & 0 deletions tests/test_mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def test_mpi(pool):
for r in results:
assert all([isclose(x, 42.01) for x in r])

print("All tests passed")


if __name__ == "__main__":
from schwimmbad.mpi import MPIPool
Expand Down
2 changes: 2 additions & 0 deletions tests/test_mpi_with_dill.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def test_mpi_with_dill():

pool.close()

print("All tests passed")


if __name__ == "__main__":
test_mpi_with_dill()

0 comments on commit 4705892

Please sign in to comment.