Skip to content

AllAtOnceReducedFunctional - initial time-parallel implementation #6910

AllAtOnceReducedFunctional - initial time-parallel implementation

AllAtOnceReducedFunctional - initial time-parallel implementation #6910

GitHub Actions / Firedrake complex failed Dec 17, 2024 in 0s

8141 tests run, 6663 passed, 1474 skipped, 4 failed.

Annotations

Check failure on line 37 in tests/firedrake/regression/test_4dvar_reduced_functional.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_4dvar_reduced_functional.test_advection[nprocs=1]

ufl.algorithms.check_arities.ArityMismatch: Adding expressions with non-matching form arguments conj((Argument(WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7fe65c131730>, FiniteElement('Discontinuous Lagrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Discontinuous Lagrange', interval, 1, variant='equispaced'), dim=1, variant='equispaced'), 6)), 0, None), True)) vs conj((Argument(WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7fe65c131730>, FiniteElement('Discontinuous Lagrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Discontinuous Lagrange', interval, 1, variant='equispaced'), dim=1, variant='equispaced'), 6)), 0, None), False)).
Raw output
@pytest.mark.parallel(nprocs=[1, 2, 3, 4])
    def test_advection():
>       main_test_advection()

tests/firedrake/regression/test_4dvar_reduced_functional.py:281: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/firedrake/regression/test_4dvar_reduced_functional.py:300: in main_test_advection
    Jhat_pyadj = fdvar_pyadjoint(V)
tests/firedrake/regression/test_4dvar_reduced_functional.py:164: in fdvar_pyadjoint
    qn, qn1, stepper = timestepper(V)
tests/firedrake/regression/test_4dvar_reduced_functional.py:37: in timestepper
    stepper = fd.LinearVariationalSolver(
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
    ???
/usr/lib/python3.12/contextlib.py:81: in inner
    return func(*args, **kwds)
firedrake/adjoint_utils/variational_solver.py:44: in wrapper
    init(self, problem, *args, **kwargs)
firedrake/variational_solver.py:243: in __init__
    ctx.set_jacobian(self.snes)
firedrake/solving_utils.py:288: in set_jacobian
    snes.setJacobian(self.form_jacobian, J=self._jac.petscmat,
/usr/lib/python3.12/functools.py:995: in __get__
    val = self.func(instance)
firedrake/solving_utils.py:493: in _jac
    return self._assembler_jac.allocate()
firedrake/assemble.py:1316: in allocate
    self._make_maps_and_regions())
firedrake/assemble.py:1345: in _make_maps_and_regions
    elif any(local_kernel.indices == (None, None) for assembler in self._all_assemblers for local_kernel, _ in assembler.local_kernels):
firedrake/assemble.py:1345: in <genexpr>
    elif any(local_kernel.indices == (None, None) for assembler in self._all_assemblers for local_kernel, _ in assembler.local_kernels):
/usr/lib/python3.12/functools.py:995: in __get__
    val = self.func(instance)
firedrake/assemble.py:1054: in local_kernels
    kernels = tsfc_interface.compile_form(
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
    ???
pyop2/caching.py:550: in wrapper
    value = func(*args, **kwargs)
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
    ???
pyop2/caching.py:550: in wrapper
    value = func(*args, **kwargs)
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/tsfc_interface.py:220: in compile_form
    tsfc_kernel = TSFCKernel(
firedrake/tsfc_interface.py:95: in __init__
    tree = tsfc_compile_form(form, prefix=name, parameters=parameters,
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
    ???
pyop2/caching.py:550: in wrapper
    value = func(*args, **kwargs)
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
    ???
pyop2/caching.py:550: in wrapper
    value = func(*args, **kwargs)
tsfc/driver.py:68: in compile_form
    fd = ufl_utils.compute_form_data(form, complex_mode=complex_mode)
tsfc/ufl_utils.py:56: in compute_form_data
    fd = ufl_compute_form_data(
../firedrake_venv/src/ufl/ufl/algorithms/compute_form_data.py:427: in compute_form_data
    check_form_arity(preprocessed_form, self.original_form.arguments(), complex_mode)
../firedrake_venv/src/ufl/ufl/algorithms/check_arities.py:213: in check_form_arity
    check_integrand_arity(itg.integrand(), arguments, complex_mode)
../firedrake_venv/src/ufl/ufl/algorithms/check_arities.py:194: in check_integrand_arity
    arg_tuples = map_expr_dag(rules, expr, compress=False)
../firedrake_venv/src/ufl/ufl/corealg/map_dag.py:35: in map_expr_dag
    (result,) = map_expr_dags(
../firedrake_venv/src/ufl/ufl/corealg/map_dag.py:103: in map_expr_dags
    r = handlers[v._ufl_typecode_](v, *[vcache[u] for u in v.ufl_operands])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ufl.algorithms.check_arities.ArityChecker object at 0x7fe65a1f05f0>
o = Sum(Product(Conj(ReferenceValue(Argument(WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7fe65c131...Index((Index(0), Index(0)))), MultiIndex((Index(0),)))), Constant([0.14701875+0.j], name='constant_8651', count=8651)))
a = ((Argument(WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7fe65c131730>, FiniteElement('Discontin...ment('Discontinuous Lagrange', interval, 1, variant='equispaced'), dim=1, variant='equispaced'), 6)), 1, None), False))
b = ((Argument(WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7fe65c131730>, FiniteElement('Discontin...ment('Discontinuous Lagrange', interval, 1, variant='equispaced'), dim=1, variant='equispaced'), 6)), 1, None), False))

    def sum(self, o, a, b):
        """Apply to sum."""
        if a != b:
>           raise ArityMismatch(
                f"Adding expressions with non-matching form arguments {_afmt(a)} vs {_afmt(b)}."
            )
E           ufl.algorithms.check_arities.ArityMismatch: Adding expressions with non-matching form arguments conj((Argument(WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7fe65c131730>, FiniteElement('Discontinuous Lagrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Discontinuous Lagrange', interval, 1, variant='equispaced'), dim=1, variant='equispaced'), 6)), 0, None), True)) vs conj((Argument(WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology object at 0x7fe65c131730>, FiniteElement('Discontinuous Lagrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Discontinuous Lagrange', interval, 1, variant='equispaced'), dim=1, variant='equispaced'), 6)), 0, None), False)).

../firedrake_venv/src/ufl/ufl/algorithms/check_arities.py:59: ArityMismatch

Check failure on line 1 in tests/firedrake/regression/test_4dvar_reduced_functional.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_4dvar_reduced_functional.test_advection[nprocs=2]

subprocess.CalledProcessError: Command '['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHILD_PROCESS', '1', '/__w/firedrake/firedrake_venv/bin/python', '-m', 'pytest', '--runxfail', '-s', '-q', '/__w/firedrake/firedrake/tests/firedrake/regression/test_4dvar_reduced_functional.py::test_advection[nprocs=2]', ':', '-n', '1', '/__w/firedrake/firedrake_venv/bin/python', '-m', 'pytest', '--runxfail', '-s', '-q', '/__w/firedrake/firedrake/tests/firedrake/regression/test_4dvar_reduced_functional.py::test_advection[nprocs=2]', '--tb=no', '--no-summary', '--no-header', '--disable-warnings', '--show-capture=no']' returned non-zero exit status 1.
Raw output
args = (), kwargs = {}

    def parallel_callback(*args, **kwargs):
>       subprocess.run(cmd, check=True)

../firedrake_venv/src/pytest-mpi/pytest_mpi.py:240: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

input = None, capture_output = False, timeout = None, check = True
popenargs = (['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHILD_PROCESS', '1', ...],)
kwargs = {}
process = <Popen: returncode: 1 args: ['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHI...>
stdout = None, stderr = None, retcode = 1

    def run(*popenargs,
            input=None, capture_output=False, timeout=None, check=False, **kwargs):
        """Run command with arguments and return a CompletedProcess instance.
    
        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
        or pass capture_output=True to capture both.
    
        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.
    
        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.
    
        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.
    
        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.
    
        The other arguments are the same as for the Popen constructor.
        """
        if input is not None:
            if kwargs.get('stdin') is not None:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE
    
        if capture_output:
            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
                raise ValueError('stdout and stderr arguments may not be used '
                                 'with capture_output.')
            kwargs['stdout'] = PIPE
            kwargs['stderr'] = PIPE
    
        with Popen(*popenargs, **kwargs) as process:
            try:
                stdout, stderr = process.communicate(input, timeout=timeout)
            except TimeoutExpired as exc:
                process.kill()
                if _mswindows:
                    # Windows accumulates the output in a single blocking
                    # read() call run on child threads, with the timeout
                    # being done in a join() on those threads.  communicate()
                    # _after_ kill() is required to collect that and add it
                    # to the exception.
                    exc.stdout, exc.stderr = process.communicate()
                else:
                    # POSIX _communicate already populated the output so
                    # far into the TimeoutExpired exception.
                    process.wait()
                raise
            except:  # Including KeyboardInterrupt, communicate handled that.
                process.kill()
                # We don't call process.wait() as .__exit__ does that for us.
                raise
            retcode = process.poll()
            if check and retcode:
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHILD_PROCESS', '1', '/__w/firedrake/firedrake_venv/bin/python', '-m', 'pytest', '--runxfail', '-s', '-q', '/__w/firedrake/firedrake/tests/firedrake/regression/test_4dvar_reduced_functional.py::test_advection[nprocs=2]', ':', '-n', '1', '/__w/firedrake/firedrake_venv/bin/python', '-m', 'pytest', '--runxfail', '-s', '-q', '/__w/firedrake/firedrake/tests/firedrake/regression/test_4dvar_reduced_functional.py::test_advection[nprocs=2]', '--tb=no', '--no-summary', '--no-header', '--disable-warnings', '--show-capture=no']' returned non-zero exit status 1.

/usr/lib/python3.12/subprocess.py:571: CalledProcessError

Check failure on line 1 in tests/firedrake/regression/test_4dvar_reduced_functional.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_4dvar_reduced_functional.test_advection[nprocs=3]

failed on setup with "worker 'gw7' crashed while running 'tests/firedrake/regression/test_4dvar_reduced_functional.py::test_advection[nprocs=3]'"
Raw output
worker 'gw7' crashed while running 'tests/firedrake/regression/test_4dvar_reduced_functional.py::test_advection[nprocs=3]'

Check failure on line 1 in tests/firedrake/regression/test_4dvar_reduced_functional.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_4dvar_reduced_functional.test_advection[nprocs=4]

failed on setup with "worker 'gw12' crashed while running 'tests/firedrake/regression/test_4dvar_reduced_functional.py::test_advection[nprocs=4]'"
Raw output
worker 'gw12' crashed while running 'tests/firedrake/regression/test_4dvar_reduced_functional.py::test_advection[nprocs=4]'