Hello, below are more details on the current test failure of python-dolfin-adjoint version 2019.1.0. Maybe an option would be to try to update to a newer version? There is 2019.1.2.
Andreas =================================== FAILURES =================================== _____________________________ test_read_checkpoint _____________________________ def test_read_checkpoint(): with stop_annotating(): N = 15 mesh = UnitSquareMesh(N, N) V = FunctionSpace(mesh, "CG", 1) x = SpatialCoordinate(mesh) v = project(x[0]*x[1]*cos(x[1]), V) out = XDMFFile(file_from_curr_dir("scalar.xdmf")) out.write_checkpoint(v, "u", 0.0) out.close() exact = assemble(v*dx) mesh = UnitSquareMesh(N, N) V = FunctionSpace(mesh, "CG", 1) v = Function(V) c = Control(v) J = assemble(v*dx) infile = XDMFFile(file_from_curr_dir("scalar.xdmf")) u = Function(V) > infile.read_checkpoint(u,'u', -1) tests/fenics_adjoint/test_io.py:38: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <dolfin.cpp.io.XDMFFile object at 0x7fffb58557f0> args = (Coefficient(FunctionSpace(Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 38754), FiniteElement('Lagrange', triangle, 1)), 38769), 'u', -1) kwargs = {}, annotate = True def XDMFFile_read_checkpoint(self, *args, **kwargs): annotate = annotate_tape(kwargs) > output = __XDMFFile_read_checkpoint__(self, *args, **kwargs) E RuntimeError: basic_string::_M_construct null not valid /gnu/store/p7hjddizapgmdk62dpvmrdkac0d4l3r9-python-dolfin-adjoint-2019.1.0/lib/python3.10/site-packages/fenics_adjoint/types/io.py:48: RuntimeError ----------------------------- Captured stdout call ----------------------------- Calling FFC just-in-time (JIT) compiler, this may take some time. ------------------------------ Captured log call ------------------------------- Level 25 FFC:log.py:127 Calling FFC just-in-time (JIT) compiler, this may take some time. INFO FFC:log.py:127 Compiling form ffc_form_e905624fad7a62b101d5d4bc784070d31ec0cc46 INFO FFC:log.py:127 Compiler stage 1: Analyzing form(s) INFO FFC:log.py:127 ----------------------------------- DEBUG FFC:log.py:127 Preprocessing form using 'uflacs' representation family. INFO FFC:log.py:127 INFO FFC:log.py:127 Geometric dimension: 2 Number of cell subdomains: 0 Rank: 1 Arguments: '(v_0)' Number of coefficients: 0 Coefficients: '[]' Unique elements: 'CG1(?,?), Vector<2 x CG1(?,?)>' Unique sub elements: 'CG1(?,?), Vector<2 x CG1(?,?)>' INFO FFC:log.py:127 representation: auto --> uflacs INFO FFC:log.py:127 quadrature_rule: auto --> default INFO FFC:log.py:127 quadrature_degree: auto --> 6 INFO FFC:log.py:127 quadrature_degree: 6 INFO FFC:log.py:127 INFO FFC:log.py:127 Compiler stage 1 finished in 0.00596237 seconds. INFO FFC:log.py:127 Compiler stage 2: Computing intermediate representation INFO FFC:log.py:127 ------------------------------------------------------- INFO FFC:log.py:127 Computing representation of 0 elements INFO FFC:log.py:127 Computing representation of 0 dofmaps INFO FFC:log.py:127 Computing representation of 0 coordinate mappings INFO FFC:log.py:127 Computing representation of integrals INFO FFC:log.py:127 Computing uflacs representation DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG FFC:log.py:127 Reusing element from cache DEBUG UFL:log.py:127 Blocks of each mode: 1 full INFO FFC:log.py:127 Computing representation of forms INFO FFC:log.py:127 INFO FFC:log.py:127 Compiler stage 2 finished in 0.0164835 seconds. INFO FFC:log.py:127 Compiler stage 3: Optimizing intermediate representation INFO FFC:log.py:127 -------------------------------------------------------- INFO FFC:log.py:127 Optimizing uflacs representation INFO FFC:log.py:127 INFO FFC:log.py:127 Compiler stage 3 finished in 0.000202894 seconds. INFO FFC:log.py:127 Compiler stage 4: Generating code INFO FFC:log.py:127 --------------------------------- INFO FFC:log.py:127 Generating code for 0 finite_element(s) INFO FFC:log.py:127 Generating code for 0 dofmap(s) INFO FFC:log.py:127 Generating code for 0 coordinate_mapping(s) INFO FFC:log.py:127 Generating code for integrals INFO FFC:log.py:127 Generating code from ffc.uflacs representation INFO FFC:log.py:127 Generating code for forms INFO FFC:log.py:127 INFO FFC:log.py:127 Compiler stage 4 finished in 0.00399137 seconds. INFO FFC:log.py:127 Compiler stage 4.1 finished in 9.53674e-07 seconds. INFO FFC:log.py:127 Compiler stage 5: Formatting code INFO FFC:log.py:127 --------------------------------- INFO FFC:log.py:127 INFO FFC:log.py:127 Compiler stage 5 finished in 0.000437498 seconds. INFO FFC:log.py:127 FFC finished in 0.0274181 seconds. =============================== warnings summary =============================== ../../../gnu/store/v36c8jmb0316czxkqajpkai70kjkmkfy-fenics-2019.1.0.post0/lib/python3.10/site-packages/dolfin_utils/test/fixtures.py:96 /gnu/store/v36c8jmb0316czxkqajpkai70kjkmkfy-fenics-2019.1.0.post0/lib/python3.10/site-packages/dolfin_utils/test/fixtures.py:96: PytestDeprecationWarning: @pytest.yield_fixture is deprecated. Use @pytest.fixture instead; they are the same. @pytest.yield_fixture(scope="function") ../../../gnu/store/v36c8jmb0316czxkqajpkai70kjkmkfy-fenics-2019.1.0.post0/lib/python3.10/site-packages/dolfin_utils/test/fixtures.py:230 /gnu/store/v36c8jmb0316czxkqajpkai70kjkmkfy-fenics-2019.1.0.post0/lib/python3.10/site-packages/dolfin_utils/test/fixtures.py:230: PytestDeprecationWarning: @pytest.yield_fixture is deprecated. Use @pytest.fixture instead; they are the same. @pytest.yield_fixture(scope="function") ../../../gnu/store/v36c8jmb0316czxkqajpkai70kjkmkfy-fenics-2019.1.0.post0/lib/python3.10/site-packages/dolfin_utils/test/fixtures.py:255 /gnu/store/v36c8jmb0316czxkqajpkai70kjkmkfy-fenics-2019.1.0.post0/lib/python3.10/site-packages/dolfin_utils/test/fixtures.py:255: PytestDeprecationWarning: @pytest.yield_fixture is deprecated. Use @pytest.fixture instead; they are the same. def pushpop_parameters(): -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/fenics_adjoint/test_io.py::test_read_checkpoint - RuntimeError: ... = 1 failed, 125 passed, 9 skipped, 1 xfailed, 3 warnings in 839.66s (0:13:59) ==