Skip to content

Block system: Work around memory leak #840

Block system: Work around memory leak

Block system: Work around memory leak #840

Workflow file for this run

name: test-tlm_adjoint-firedrake
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test-real:
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: firedrakeproject/firedrake:latest
options: --user root
env:
OMP_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'tlm_adjoint'
- name: Install dependencies
run: |
. /home/firedrake/firedrake/bin/activate
python3 -m pip install jax[cpu] ruff pytest-timeout pytest-xdist
python3 -m pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Lint
run: |
. /home/firedrake/firedrake/bin/activate
cd tlm_adjoint
flake8
ruff check
- name: Run tests
run: |
. /home/firedrake/firedrake/bin/activate
cd tlm_adjoint
pytest -v tests/base tests/checkpoint_schedules tests/firedrake -n 2 --timeout=300 --timeout-method=thread
test-complex:
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: firedrakeproject/firedrake-complex:latest
options: --user root
env:
OMP_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'tlm_adjoint'
- name: Install dependencies
run: |
. /home/firedrake/firedrake/bin/activate
python3 -m pip install jax[cpu] ruff pytest-timeout pytest-xdist
python3 -m pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Lint
run: |
. /home/firedrake/firedrake/bin/activate
cd tlm_adjoint
flake8
ruff check
- name: Run tests
run: |
. /home/firedrake/firedrake/bin/activate
cd tlm_adjoint
pytest -v tests/base tests/checkpoint_schedules tests/firedrake -n 2 --timeout=300 --timeout-method=thread