GitHub Actions / Firedrake complex
failed
Oct 21, 2024 in 0s
8079 tests run, 6496 passed, 1582 skipped, 1 failed.
Annotations
Check failure on line 156 in tests/multigrid/test_transfer_manager.py
github-actions / Firedrake complex
test_transfer_manager.test_cached_transfer[DG]
NotImplementedError: In complex mode we are waiting for Slate
Raw output
Vf = WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7f63da373d40>, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 13267))
Vc = WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7f63da344e00>, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 13266))
def inject_kernel(Vf, Vc):
hierarchy, level = utils.get_level(Vc.mesh())
cache = hierarchy._shared_data_cache["transfer_kernels"]
coordinates = Vf.mesh().coordinates
if Vf.extruded:
assert Vc.extruded
level_ratio = (Vf.mesh().layers - 1) // (Vc.mesh().layers - 1)
else:
level_ratio = 1
key = (("inject", level_ratio)
+ Vf.ufl_element().value_shape
+ entity_dofs_key(Vc.finat_element.complex.get_topology())
+ entity_dofs_key(Vf.finat_element.complex.get_topology())
+ entity_dofs_key(Vc.finat_element.entity_dofs())
+ entity_dofs_key(Vf.finat_element.entity_dofs())
+ entity_dofs_key(Vc.mesh().coordinates.function_space().finat_element.entity_dofs())
+ entity_dofs_key(coordinates.function_space().finat_element.entity_dofs()))
try:
> return cache[key]
E KeyError: ('inject', 1, (0, (0,), (1,), (2,)), (1, (1, 2), (0, 2), (0, 1)), (2, (0, 1, 2)), (0, (0,), (1,), (2,)), (1, (1, 2), (0, 2), (0, 1)), (2, (0, 1, 2)), (0, (), (), ()), (1, (), (), ()), (2, (0,)), (0, (), (), ()), (1, (), (), ()), (2, (0,)), (0, (0,), (1,), (2,)), (1, (), (), ()), (2, ()), (0, (0,), (1,), (2,)), (1, (), (), ()), (2, ()))
firedrake/mg/kernels.py:400: KeyError
During handling of the above exception, another exception occurred:
family = 'DG'
@pytest.mark.parametrize("family", ("DG", "R"))
def test_cached_transfer(family):
# Test that we can properly reuse transfers within solve
sp = {"mat_type": "matfree",
"pc_type": "mg",
"mg_coarse_pc_type": "none",
"mg_levels_pc_type": "none"}
base = UnitSquareMesh(1, 1)
hierarchy = MeshHierarchy(base, 3)
mesh = hierarchy[-1]
V = FunctionSpace(mesh, family, 0)
u = Function(V)
F = inner(u - 1, TestFunction(V)) * dx
# This test will fail if we raise this warning
with warnings.catch_warnings():
warnings.filterwarnings("error", "Creating new TransferManager", RuntimeWarning)
> solve(F == 0, u, solver_parameters=sp)
tests/multigrid/test_transfer_manager.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
???
firedrake/adjoint_utils/solving.py:57: in wrapper
output = solve(*args, **kwargs)
firedrake/solving.py:141: in solve
_solve_varproblem(*args, **kwargs)
firedrake/solving.py:195: in _solve_varproblem
solver.solve()
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
???
firedrake/adjoint_utils/variational_solver.py:89: in wrapper
out = solve(self, **kwargs)
firedrake/variational_solver.py:324: in solve
self.snes.solve(None, work)
petsc4py/PETSc/SNES.pyx:1724: in petsc4py.PETSc.SNES.solve
???
petsc4py/PETSc/PETSc.pyx:323: in petsc4py.PETSc.PetscPythonErrorHandler
???
petsc4py/PETSc/PETSc.pyx:323: in petsc4py.PETSc.PetscPythonErrorHandler
???
petsc4py/PETSc/PETSc.pyx:323: in petsc4py.PETSc.PetscPythonErrorHandler
???
petsc4py/PETSc/PETSc.pyx:323: in petsc4py.PETSc.PetscPythonErrorHandler
???
petsc4py/PETSc/PETSc.pyx:323: in petsc4py.PETSc.PetscPythonErrorHandler
???
petsc4py/PETSc/PETSc.pyx:323: in petsc4py.PETSc.PetscPythonErrorHandler
???
petsc4py/PETSc/PETSc.pyx:323: in petsc4py.PETSc.PetscPythonErrorHandler
???
petsc4py/PETSc/PETSc.pyx:323: in petsc4py.PETSc.PetscPythonErrorHandler
???
petsc4py/PETSc/petscdmshell.pxi:239: in petsc4py.PETSc.DMSHELL_Coarsen
???
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
???
firedrake/dmhooks.py:433: in coarsen
cctx = coarsen(ctx, coarsen)
/usr/lib/python3.12/functools.py:909: in wrapper
return dispatch(args[0].__class__)(*args, **kw)
firedrake/mg/ufl_utils.py:251: in coarsen_snescontext
problem = self(context._problem, self, coefficient_mapping=coefficient_mapping)
/usr/lib/python3.12/functools.py:909: in wrapper
return dispatch(args[0].__class__)(*args, **kw)
firedrake/mg/ufl_utils.py:201: in coarsen_nlvp
coefficient_mapping[c] = self(c, self, coefficient_mapping=coefficient_mapping)
/usr/lib/python3.12/functools.py:909: in wrapper
return dispatch(args[0].__class__)(*args, **kw)
firedrake/mg/ufl_utils.py:158: in coarsen_function
manager.inject(expr, new)
firedrake/mg/embedded.py:299: in inject
self.op(uf, uc, transfer_op=Op.INJECT)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
???
firedrake/mg/embedded.py:250: in op
self._native_transfer(source_element, transfer_op)(source, target)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
???
firedrake/mg/interface.py:189: in inject
kernel, dg = kernels.inject_kernel(Vf, Vc)
firedrake/mg/kernels.py:404: in inject_kernel
return cache.setdefault(key, (dg_injection_kernel(Vf, Vc, ncandidate), True))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Vf = WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7f63da373d40>, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 13267))
Vc = WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7f63da344e00>, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 13266))
ncell = 4
def dg_injection_kernel(Vf, Vc, ncell):
from firedrake import Tensor, AssembledVector, TestFunction, TrialFunction
from firedrake.slate.slac import compile_expression
if complex_mode:
> raise NotImplementedError("In complex mode we are waiting for Slate")
E NotImplementedError: In complex mode we are waiting for Slate
firedrake/mg/kernels.py:521: NotImplementedError
Loading