Skip to content

Commit

Permalink
Parallelise the parallel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JDBetteridge committed Aug 31, 2024
1 parent fd14681 commit 1122a3b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down
1 change: 1 addition & 0 deletions requirements-git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1122a3b

Please sign in to comment.