diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b8d1bd634..a46acb85c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,7 +89,8 @@ jobs: . ../firedrake_venv/bin/activate python "$(which firedrake-clean)" python -m pip install \ - pytest-xdist pytest-timeout ipympl + pytest-xdist pytest-timeout ipympl pytest-split + pip install git+https://github.com/JDBetteridge/mpispawn python -m pip list - name: Test Firedrake Serial run: | @@ -111,36 +112,42 @@ jobs: . ../firedrake_venv/bin/activate echo OMP_NUM_THREADS is "$OMP_NUM_THREADS" echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS" - mpiexec -n 2 python -m pytest \ + mpispawn -nU 12 -nW 2 --propagate-errcodes pytest \ + --splits \$MPISPAWN_NUM_TASKS \ + --group \$MPISPAWN_TASK_ID1 \ --timeout=1800 \ --timeout-method=thread \ -o faulthandler_timeout=1860 \ - -m "not broken and not slow and parallel[2]" \ - -sv tests + -m "parallel[\$MPISPAWN_WORLD_SIZE] and not broken and not slow" \ + -v tests timeout-minutes: 30 - name: Test Firedrake 3 ranks run: | . ../firedrake_venv/bin/activate echo OMP_NUM_THREADS is "$OMP_NUM_THREADS" echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS" - mpiexec -n 3 python -m pytest \ + mpispawn -nU 12 -nW 3 --propagate-errcodes pytest \ + --splits \$MPISPAWN_NUM_TASKS \ + --group \$MPISPAWN_TASK_ID1 \ --timeout=1800 \ --timeout-method=thread \ -o faulthandler_timeout=1860 \ - -m "not broken and not slow and parallel[3]" \ - -sv tests + -m "parallel[\$MPISPAWN_WORLD_SIZE] and not broken and not slow" \ + -v tests timeout-minutes: 60 - name: Test Firedrake 4 ranks run: | . ../firedrake_venv/bin/activate echo OMP_NUM_THREADS is "$OMP_NUM_THREADS" echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS" - mpiexec -n 4 python -m pytest \ + mpispawn -nU 12 -nW 4 --propagate-errcodes pytest \ + --splits \$MPISPAWN_NUM_TASKS \ + --group \$MPISPAWN_TASK_ID1 \ --timeout=1800 \ --timeout-method=thread \ -o faulthandler_timeout=1860 \ - -m "not broken and not slow and parallel[4]" \ - -sv tests + -m "parallel[\$MPISPAWN_WORLD_SIZE] and not broken and not slow" \ + -v tests timeout-minutes: 30 - name: Test Firedrake 6 ranks run: | diff --git a/requirements-git.txt b/requirements-git.txt index b6e9e8e1dd..6d8b3d7019 100644 --- a/requirements-git.txt +++ b/requirements-git.txt @@ -5,3 +5,4 @@ git+https://github.com/firedrakeproject/tsfc.git#egg=tsfc git+https://github.com/OP2/PyOP2.git#egg=pyop2 git+https://github.com/dolfin-adjoint/pyadjoint.git#egg=pyadjoint git+https://github.com/firedrakeproject/petsc.git@firedrake#egg=petsc +git+https://github.com/firedrakeproject/pytest-mpi.git@JDBetteridge/spawn#egg=pytest-mpi