Skip to content

mpi4py: enable spawn tests workflow by default #12591

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

Merged
merged 1 commit into from
May 31, 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
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.