IvanYashchuk / fecr

Easy interoperability with Automatic Differentiation libraries through NumPy interface to Firedrake and FEniCS
MIT License
14 stars 1 forks source link

Tests are broken with the latest Firedrake #20

Open IvanYashchuk opened 9 months ago

IvanYashchuk commented 9 months ago
=========================== short test summary info ============================
FAILED tests/firedrake_backend/test_assemble.py::test_vjp_assemble_eval - RuntimeError: Type unknown to numpy-fem-adjoint <class 'firedrake.cofunction.Cofunction'>
FAILED tests/firedrake_backend/test_assemble.py::test_jvp_assemble_eval - assert False
 +  where False = <function allclose at 0x7fd306e29990>(((0.024212965604809494 + -8.09023992310551e-16) + 0.22875878764471225), array(0.02421297))
 +    where <function allclose at 0x7fd306e29990> = np.allclose
FAILED tests/firedrake_backend/test_bcs.py::test_firedrake_vjp - TypeError: unsupported operand type(s) for +=: 'Cofunction' and 'Function'
FAILED tests/firedrake_backend/test_solve.py::test_firedrake_vjp - TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
FAILED tests/firedrake_backend/test_solve.py::test_firedrake_jvp - RuntimeError: Type unknown to numpy-fem-adjoint <class 'NoneType'>
============ 5 failed, 12 passed, 3 xfailed, 272 warnings in 9.04s =============
IvanYashchuk commented 9 months ago

The following test tests/firedrake_backend/test_solve.py::test_firedrake_vjp - TypeError: ufunc 'isfinite' not supported fails because Firedrake started to return None for Constant's adj_value. See https://github.com/firedrakeproject/firedrake/issues/3227.