Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mesh-adaptation/goalie into…
Browse files Browse the repository at this point in the history
… 220_clear_fields_after_indicate

merge #222 update caching fix into branch
  • Loading branch information
acse-ej321 committed Oct 24, 2024
2 parents d7e9f8b + fdd3bf5 commit 276cb3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ def pytest_runtest_teardown(item, nextitem):
"""
Clear caches after running a test
"""
from firedrake.tsfc_interface import TSFCKernel
from pyop2.global_kernel import GlobalKernel
from firedrake.tsfc_interface import clear_cache
from pyop2.caching import clear_memory_cache
from pyop2.mpi import COMM_WORLD

TSFCKernel._cache.clear()
GlobalKernel._cache.clear()
clear_cache()
clear_memory_cache(COMM_WORLD)
9 changes: 5 additions & 4 deletions test_adjoint/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,12 @@ def pytest_runtest_teardown(item, nextitem):
"""
Clear caches after running a test
"""
from firedrake.tsfc_interface import TSFCKernel
from pyop2.global_kernel import GlobalKernel
from firedrake.tsfc_interface import clear_cache
from pyop2.caching import clear_memory_cache
from pyop2.mpi import COMM_WORLD

TSFCKernel._cache.clear()
GlobalKernel._cache.clear()
clear_cache()
clear_memory_cache(COMM_WORLD)


@pytest.fixture(autouse=True)
Expand Down

0 comments on commit 276cb3a

Please sign in to comment.