Skip to content

Commit

Permalink
mpi4py: enable spawn tests workflow by default
Browse files Browse the repository at this point in the history
The previous inter-communicator race condition has been fixed. Enable the
workflow by default to catch new regressions.

Signed-off-by: Wenduo Wang <[email protected]>
  • Loading branch information
wenduwan committed May 31, 2024
1 parent 55a2ac8 commit f5d769b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 129 deletions.
86 changes: 48 additions & 38 deletions .github/workflows/ompi_mpi4py.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ on:
type: string

jobs:
build:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
MPI4PY_TEST_SPAWN: true
steps:
- name: Configure hostname
run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null
Expand Down Expand Up @@ -105,43 +107,51 @@ jobs:
repository: ${{ inputs.repository || 'mpi4py/mpi4py' }}
ref: ${{ inputs.ref }}

- name: Build mpi4py wheel
run: python -m pip wheel .
- name: Install mpi4py
run: python -m pip install .
env:
CFLAGS: "-O0"

- name: Save the artifacts for other jobs
uses: actions/upload-artifact@v4
with:
path: |
/opt/openmpi
~/.openmpi
~/.prte
test
demo
mpi4py-*.whl
retention-days: 2
name: build-artifacts

#==============================================

run_defaults:
# This whole set of tests run with mpi4py's defaults. As of March
# 2024, this means disabling the spawn and dynamic tests. We want
# this job of tests to pass.
needs: [ build ]
uses: ./.github/workflows/ompi_mpi4py_tests.yaml

#==============================================

run_spawn:
# This whole set of tests runs explicitly with setting "enable the
# spawn tests". As of March 2024, we know that Open MPI is
# failing these tests.
needs: [ build ]
# Only run if the label "mpi4py" is set on this PR.
if: ${{ contains(github.event.pull_request.labels.*.name, 'mpi4py-all') }}
uses: ./.github/workflows/ompi_mpi4py_tests.yaml
with:
# Enable the spawn tests
env_name: MPI4PY_TEST_SPAWN
- name: Test mpi4py (singleton)
run: python test/main.py -v
if: ${{ true }}
timeout-minutes: 10
- name: Test mpi4py (np=1)
run: mpiexec -n 1 python test/main.py -v
if: ${{ true }}
timeout-minutes: 10
- name: Test mpi4py (np=2)
run: mpiexec -n 2 python test/main.py -v -f
if: ${{ true }}
timeout-minutes: 10
- name: Test mpi4py (np=3)
run: mpiexec -n 3 python test/main.py -v -f
if: ${{ true }}
timeout-minutes: 10
- name: Test mpi4py (np=4)
run: mpiexec -n 4 python test/main.py -v -f
if: ${{ true }}
timeout-minutes: 10
- name: Test mpi4py (np=5)
run: mpiexec -n 5 python test/main.py -v -f
if: ${{ true }}
timeout-minutes: 10

- name: Test mpi4py.run
run: python demo/test-run/test_run.py -v
if: ${{ true }}
timeout-minutes: 10

- name: Relocate Open MPI installation
run: mv /opt/openmpi /opt/ompi
- name: Update PATH and set OPAL_PREFIX and LD_LIBRARY_PATH
run: |
sed -i '\|/opt/openmpi/bin|d' $GITHUB_PATH
echo OPAL_PREFIX=/opt/ompi >> $GITHUB_ENV
echo LD_LIBRARY_PATH=/opt/ompi/lib >> $GITHUB_ENV
- name: Test mpi4py (singleton)
run: python test/main.py -v
if: ${{ true }}
timeout-minutes: 10

91 changes: 0 additions & 91 deletions .github/workflows/ompi_mpi4py_tests.yaml

This file was deleted.

0 comments on commit f5d769b

Please sign in to comment.