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 suite clean up #3385

Open
wants to merge 91 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
fcdeace
Draft changes to pyop2.caching
JDBetteridge Aug 12, 2024
056ba30
Change package branch
JDBetteridge Aug 12, 2024
314ff8e
Just notes
JDBetteridge Aug 13, 2024
3f272d6
WIP
JDBetteridge Aug 15, 2024
557a7e8
Linting
JDBetteridge Aug 15, 2024
d573b70
Do TODOs (that I added...)
JDBetteridge Aug 18, 2024
d10f7c0
Add event decorators for compilation functions
JDBetteridge Aug 23, 2024
b018642
Mark and skip slow tests
JDBetteridge Feb 2, 2024
02af4ab
Update build.yml
JDBetteridge Feb 4, 2024
9afc992
Allow querying number of MPI ranks requested
JDBetteridge Feb 5, 2024
731ddd3
Check MPI overheads
JDBetteridge Feb 5, 2024
ba99a37
Uninstall pytest-mpi
JDBetteridge Feb 5, 2024
f275e9f
Mark broken test?
JDBetteridge Feb 8, 2024
3d6f3ab
Fixes
JDBetteridge Feb 9, 2024
38311d9
Fix hanging test
JDBetteridge Feb 9, 2024
cf33c93
Remove coverage and durations for parallel tests
JDBetteridge Feb 9, 2024
62deffd
Netgen again!
JDBetteridge Mar 5, 2024
69967f0
Lint
JDBetteridge Jun 6, 2024
60a5770
Where did all my comm handles go!?
JDBetteridge Jun 7, 2024
c31127c
Remove obsolete markers
JDBetteridge Jun 10, 2024
c64829c
Free more comms
JDBetteridge Jun 10, 2024
fd3e030
Increase gc frequency
JDBetteridge Jun 10, 2024
a477060
Implement per communicator universal identifiers for Firedrake objects
JDBetteridge Jun 14, 2024
1acc58d
Mark some tests as broken
JDBetteridge Jun 14, 2024
54954e8
Make the ensemble a module level fixture
JDBetteridge Aug 5, 2024
3b70c9f
Revert "Uninstall pytest-mpi"
JDBetteridge Aug 5, 2024
85b3bb6
Tests be getting slower!
JDBetteridge Aug 5, 2024
33367cf
Parallelise the parallel tests
JDBetteridge Aug 31, 2024
81e95dc
Urgh
JDBetteridge Aug 31, 2024
f3dd994
Try splitting on a timed execution
JDBetteridge Aug 31, 2024
911b0ad
Workaround for desynchronised constant counts
JDBetteridge Sep 1, 2024
3d1b3ee
Remove run file add comment in hdg
JDBetteridge Sep 1, 2024
571b860
Try with a univers of 8 ranks on parallel[4] tests
JDBetteridge Sep 1, 2024
1b16177
Add slow tests back in
JDBetteridge Sep 1, 2024
40fe506
Only do 3 iterations
JDBetteridge Sep 1, 2024
ea0ebf6
How did this ever work before!? (complex mode)
JDBetteridge Sep 1, 2024
fc7a2aa
Try new FInAT hashes
JDBetteridge Sep 1, 2024
4d35c8d
Fix disk heckpointing test.
Ig-dolci Sep 11, 2024
def2665
linting test
Ig-dolci Sep 11, 2024
33104ca
Update .github/workflows/build.yml
JDBetteridge Sep 11, 2024
7833adc
Change tests for reporting
JDBetteridge Sep 13, 2024
ae6a442
More smothing to improve solutions
JDBetteridge Sep 13, 2024
0f31713
Try to prevent pytest overwriting xml files in parallel
JDBetteridge Sep 13, 2024
f493334
Dog food flavoured makefile
JDBetteridge Oct 3, 2024
8cee812
Remove package branch
JDBetteridge Oct 10, 2024
c3dafc5
Error in loop on failure
JDBetteridge Oct 15, 2024
b9205bb
Give mesh session scope
JDBetteridge Oct 15, 2024
9ec599e
Apply reviewers comments
JDBetteridge Oct 15, 2024
2b8938c
Icosahedral radial mesh appears fixed?
JDBetteridge Oct 15, 2024
d26ea36
Remove duplication from rebase
JDBetteridge Oct 15, 2024
fd3f337
Test to see if Constant magically works again
JDBetteridge Oct 15, 2024
200682f
Fix constant numbering in SLATE
connorjward Oct 18, 2024
6d8c93c
Mark another slow demo
JDBetteridge Oct 21, 2024
130b7b8
Stop using pytest-mpi branch
JDBetteridge Oct 22, 2024
ea03f73
Merge remote-tracking branch 'origin/master' into JDBetteridge/faster…
connorjward Jan 9, 2025
788c910
tweaks to build.yml, need to check before running
connorjward Jan 9, 2025
d62b3a9
Remove slow markers
connorjward Jan 10, 2025
2f18719
More to remove
connorjward Jan 10, 2025
399694f
Split apart build.yml
connorjward Jan 10, 2025
897b9bb
Merge branch 'connorjward/from-testing-branch' into JDBetteridge/fast…
connorjward Jan 10, 2025
ac1a2cf
cleanup
connorjward Jan 10, 2025
d29c285
Experimental: add testing action
connorjward Jan 10, 2025
9f34981
fixup, maybe works
connorjward Jan 13, 2025
1ff0f91
testing
connorjward Jan 13, 2025
7c2afde
fixup
connorjward Jan 13, 2025
ebda6c0
fixup?
connorjward Jan 13, 2025
1eab6a8
fixups, I think
connorjward Jan 13, 2025
611c92b
fail slow and remove flaky test
connorjward Jan 13, 2025
31356d4
linting
connorjward Jan 13, 2025
6969c39
Stop using a custom action
connorjward Jan 14, 2025
77fa692
for debugging, much smaller timeout
connorjward Jan 14, 2025
6587b16
silly fixup
connorjward Jan 14, 2025
1ae8c4b
try another parallel testing approach
connorjward Jan 16, 2025
b6f76d5
Merge remote-tracking branch 'origin/master' into connorjward/avoid-c…
connorjward Jan 16, 2025
e052e2e
silly sudo error
connorjward Jan 16, 2025
4cf20cb
fixup
connorjward Jan 16, 2025
edc288b
fixup
connorjward Jan 16, 2025
7fb13ab
try again
connorjward Jan 16, 2025
07b57d7
fixup?
connorjward Jan 16, 2025
8b82c4d
bad linting but correct I think, escaping is hard
connorjward Jan 16, 2025
2a6c83a
Re-enable all tests
connorjward Jan 16, 2025
5a56d8a
fixups, make sure taping is disabled after each test
connorjward Jan 17, 2025
27ec0b2
fixup
connorjward Jan 20, 2025
51b810c
fixup
connorjward Jan 21, 2025
3a99214
fixup
connorjward Jan 21, 2025
bda45e2
Merge pull request #3978 from firedrakeproject/connorjward/avoid-comm…
connorjward Jan 21, 2025
e077d21
Tidy up the Makefile and add utility testing script
connorjward Jan 22, 2025
85d7208
Comments for bash script
connorjward Jan 22, 2025
63113b6
cleanup
connorjward Jan 22, 2025
07b8806
Change make check verbosity
connorjward Jan 22, 2025
ce50f26
fixup
connorjward Jan 22, 2025
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
5 changes: 1 addition & 4 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ jobs:
- name: Run smoke tests
run: |
. ../firedrake_venv/bin/activate
python -m pytest -v tests/firedrake/regression/ -k "poisson_strong or stokes_mini or dg_advection"
# also test for 'problem libraries' (spatialindex and libsupermesh)
python -m pytest -v tests/firedrake/regression/test_locate_cell.py
python -m pytest -v tests/firedrake/supermesh/test_assemble_mixed_mass_matrix.py
make check
timeout-minutes: 30
- name: Post-run cleanup
if: ${{ always() }}
Expand Down
91 changes: 69 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ env:
RELEASE_TAG: latest

jobs:
build:
name: "Build Firedrake"
# Run on our self-hosted machines
test:
name: "Run Firedrake tests (Linux)"
runs-on: [self-hosted, Linux]
container:
image: firedrakeproject/firedrake-env:latest
strategy:
# Don't immediately kill real if complex fails and vice versa.
fail-fast: false
matrix:
include:
Expand All @@ -47,13 +45,18 @@ jobs:
OPENBLAS_NUM_THREADS: 1
COMPLEX: ${{ matrix.complex }}
RDMAV_FORK_SAFE: 1
EXTRA_PYTEST_ARGS: --splitting-algorithm least_duration --timeout=1800 --timeout-method=thread -o faulthandler_timeout=1860 tests/firedrake
outputs:
scalar-type: ${{ matrix.scalar-type }}
steps:
- uses: actions/checkout@v4

- name: Cleanup
if: ${{ always() }}
run: |
cd ..
rm -rf firedrake_venv

- name: Build Firedrake
run: |
cd ..
Expand Down Expand Up @@ -85,56 +88,99 @@ jobs:
--install gadopt \
--install asQ \
|| (cat firedrake-install.log && /bin/false)

- name: Install test dependencies
id: build
run: |
sudo apt update
sudo apt -y install parallel
. ../firedrake_venv/bin/activate
python "$(which firedrake-clean)"
python -m pip install \
pytest-xdist pytest-timeout ipympl
python -m pip install pytest-timeout ipympl pytest-split
python -m pip list
- name: Test Firedrake

- name: Run tests (nprocs = 1)
run: |
. ../firedrake_venv/bin/activate
echo OMP_NUM_THREADS is "$OMP_NUM_THREADS"
echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS"
python -m pytest -v tests/firedrake/test_0init.py
python -m pytest \
--durations=200 \
--timeout=1800 \
--timeout-method=thread \
-o faulthandler_timeout=1860 \
-n 12 --dist worksteal \
--junit-xml=firedrake.xml \
-sv tests/firedrake
timeout-minutes: 120
firedrake-run-split-tests 1 12 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake1_{#}.xml"

- name: Run tests (nprocs = 2)
# Run even if earlier tests failed
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
firedrake-run-split-tests 2 6 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake2_{#}.xml"

- name: Run tests (nprocs = 3)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
firedrake-run-split-tests 3 4 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake3_{#}.xml"

- name: Run tests (nprocs = 4)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
firedrake-run-split-tests 4 3 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake4_{#}.xml"

# NOTE: We do not have any tests that run with 5 processes

- name: Run tests (nprocs = 6)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
firedrake-run-split-tests 6 2 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake6_{#}.xml"

- name: Run tests (nprocs = 7)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
firedrake-run-split-tests 7 1 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake7_{#}.xml"

- name: Run tests (nprocs = 8)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
firedrake-run-split-tests 8 1 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake8_{#}.xml"

- name: Publish Test Report
uses: mikepenz/[email protected]
if: ${{ always() && ( github.ref != 'refs/heads/master') }}
with:
report_paths: '/__w/firedrake/firedrake/firedrake.xml'
report_paths: 'firedrake*.xml'
comment: true
check_name: "Firedrake ${{ matrix.scalar-type }}"
updateComment: true
flaky_summary: true

- name: Upload log files
uses: actions/upload-artifact@v4
with:
name: firedrake-logs-${{ matrix.scalar-type }}
path: pytest_*.log

- name: Test pyadjoint
if: ${{ matrix.scalar-type == 'real' }}
run: |
. ../firedrake_venv/bin/activate
cd ../firedrake_venv/src/pyadjoint
python -m pytest \
--strict-markers \
--durations=200 \
--timeout=600 \
--timeout-method=thread \
-o faulthandler_timeout=660 \
-n 12 --dist worksteal \
-sv tests/firedrake_adjoint
timeout-minutes: 30

- name: Cleanup
# Belt and braces: clean up before and after the run.
if: ${{ always() }}
run: |
cd ..
rm -rf firedrake_venv

docker_tag:
name: "Set the Docker release tag"
runs-on: [self-hosted, Linux]
Expand All @@ -151,14 +197,15 @@ jobs:
echo The release tag is "$RELEASE_TAG"
outputs:
tag: ${{ env.RELEASE_TAG }}

docker:
name: "Build Docker containers"
# Only run on master, but always generate firedrake-env image,
# even if build fails (see docker.yml)
if: ${{ (github.ref == 'refs/heads/master') && always() }}
needs: [build, docker_tag]
needs: [test, docker_tag]
uses: ./.github/workflows/docker.yml
with:
tag: ${{ needs.docker_tag.outputs.tag }}
status: ${{ needs.build.result }}
status: ${{ needs.test.result }}
secrets: inherit
7 changes: 2 additions & 5 deletions .github/workflows/pip-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
# Only run this action if we are pushing to master or the PR is labelled "macOS"
if: ${{ (github.ref == 'refs/heads/master') || contains(github.event.pull_request.labels.*.name, 'macOS') }}
env:
FIREDRAKE_CI_TESTS: 1
OMP_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
steps:
Expand Down Expand Up @@ -98,11 +99,7 @@ jobs:
run: |
source pip_venv/bin/activate
cd pip_venv/src/firedrake
python -m pytest --timeout=1800 -v tests/firedrake/regression \
-k "poisson_strong or stokes_mini or dg_advection"
# also test for 'problem libraries' (spatialindex and libsupermesh)
python -m pytest -v tests/firedrake/regression/test_locate_cell.py
python -m pytest -v tests/firedrake/supermesh/test_assemble_mixed_mass_matrix.py
make check
timeout-minutes: 30

- name: Cleanup (post)
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,7 @@ jobs:
run: |
source pip_venv/bin/activate
cd pip_venv/src/firedrake
pytest -v tests/firedrake/test_0init.py
pytest \
--durations=200 \
--timeout=1800 \
--timeout-method=thread \
-o faulthandler_timeout=1860 \
-n 12 --dist worksteal \
--junit-xml=firedrake.xml \
-sv tests/firedrake/regression -k "poisson_strong or stokes_mini or dg_advection"
make check
timeout-minutes: 120

- name: Publish Test Report
Expand Down
Loading
Loading