Skip to content

Commit

Permalink
tweaks to build.yml, need to check before running
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjward committed Jan 9, 2025
1 parent ea03f73 commit 788c910
Showing 1 changed file with 27 additions and 94 deletions.
121 changes: 27 additions & 94 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:

jobs:
build:
name: "Build Firedrake"
name: "Build Firedrake (Linux)"
# Run on our self-hosted machines
runs-on: [self-hosted, Linux]
container:
Expand Down Expand Up @@ -90,112 +90,35 @@ jobs:
. ../firedrake_venv/bin/activate
python "$(which firedrake-clean)"
python -m pip install \
pytest-xdist pytest-timeout ipympl pytest-split
pip install git+https://github.com/JDBetteridge/mpispawn
pytest-xdist \
pytest-timeout \
ipympl \
pytest-split \
git+https://github.com/JDBetteridge/mpispawn
python -m pip list
- name: Test Firedrake Serial
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 \
-m "not parallel" \
-n 12 --dist worksteal \
--junit-xml=firedrake1.xml \
-sv tests/firedrake
timeout-minutes: 60
- name: Test Firedrake 2 ranks
test:
name: Run tests (Linux)
runs-on: [self-hosted, Linux]
needs: build
strategy:
matrix:
nprocs: [1, 2, 3, 4, 6, 7, 8]
steps:
- name: Run tests (nprocs=${{ matrix.nprocs }})
run: |
. ../firedrake_venv/bin/activate
echo OMP_NUM_THREADS is "$OMP_NUM_THREADS"
echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS"
mpispawn -nU 12 -nW 2 --propagate-errcodes pytest \
--splitting-algorithm least_duration \
--splits \$MPISPAWN_NUM_TASKS \
--group \$MPISPAWN_TASK_ID1 \
--timeout=1800 \
--timeout-method=thread \
-o faulthandler_timeout=1860 \
--junit-xml=firedrake2_\$MPISPAWN_TASK_ID1.xml \
-m "parallel[\$MPISPAWN_WORLD_SIZE] and not broken" \
-v tests/firedrake
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"
mpispawn -nU 12 -nW 3 --propagate-errcodes pytest \
--splitting-algorithm least_duration \
--splits \$MPISPAWN_NUM_TASKS \
--group \$MPISPAWN_TASK_ID1 \
--timeout=1800 \
--timeout-method=thread \
-o faulthandler_timeout=1860 \
--junit-xml=firedrake3_\$MPISPAWN_TASK_ID1.xml \
--junit-xml=firedrake${{ matrix.nprocs }}_\$MPISPAWN_TASK_ID1.xml \
-m "parallel[\$MPISPAWN_WORLD_SIZE] and not broken" \
-v tests/firedrake
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"
mpispawn -nU 8 -nW 4 --propagate-errcodes pytest \
--splitting-algorithm least_duration \
--splits \$MPISPAWN_NUM_TASKS \
--group \$MPISPAWN_TASK_ID1 \
--timeout=1800 \
--timeout-method=thread \
-o faulthandler_timeout=1860 \
--junit-xml=firedrake4_\$MPISPAWN_TASK_ID1.xml \
-m "parallel[\$MPISPAWN_WORLD_SIZE] and not broken" \
-v tests/firedrake
timeout-minutes: 30
- name: Test Firedrake 6 ranks
run: |
. ../firedrake_venv/bin/activate
echo OMP_NUM_THREADS is "$OMP_NUM_THREADS"
echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS"
mpiexec -n 6 python -m pytest \
--timeout=1800 \
--timeout-method=thread \
-o faulthandler_timeout=1860 \
--junit-xml=firedrake6.xml \
-m "parallel[6] and not broken" \
-sv tests/firedrake
timeout-minutes: 30
- name: Test Firedrake 7 ranks
run: |
. ../firedrake_venv/bin/activate
echo OMP_NUM_THREADS is "$OMP_NUM_THREADS"
echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS"
mpiexec -n 7 python -m pytest \
--timeout=1800 \
--timeout-method=thread \
-o faulthandler_timeout=1860 \
--junit-xml=firedrake7.xml \
-m "parallel[7] and not broken" \
-sv tests/firedrake
timeout-minutes: 30
- name: Test Firedrake 8 ranks
run: |
. ../firedrake_venv/bin/activate
echo OMP_NUM_THREADS is "$OMP_NUM_THREADS"
echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS"
mpiexec -n 8 python -m pytest \
--timeout=1800 \
--timeout-method=thread \
-o faulthandler_timeout=1860 \
--junit-xml=firedrake8.xml \
-m "parallel[8] and not broken" \
-sv tests/firedrake
timeout-minutes: 30
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5.0.0-a02
if: ${{ always() && ( github.ref != 'refs/heads/master') }}
Expand All @@ -205,6 +128,10 @@ jobs:
check_name: "Firedrake ${{ matrix.scalar-type }}"
updateComment: true
flaky_summary: true

test_pyadjoint:
runs-on: [self-hosted, Linux]
needs: build
- name: Test pyadjoint
if: ${{ matrix.scalar-type == 'real' }}
run: |
Expand All @@ -218,12 +145,17 @@ jobs:
-n 12 --dist worksteal \
-sv tests/firedrake_adjoint
timeout-minutes: 30

cleanup:
runs-on: [self-hosted, Linux]
needs: test, test_pyadjoint
- 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 @@ -240,6 +172,7 @@ 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,
Expand Down

0 comments on commit 788c910

Please sign in to comment.