Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test multiple mpi4py versions #55

Merged
merged 3 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
Loading