Dear David,

I am now running into the following error message:

Traceback (most recent call last):
  File "buoy-swe.py", line 84, in <module>
    F_solver = solver_F(phi0_5, eta1, lambda0_5, mu0_5, I, w, phi0, eta0, Z0, W0, etaR, phi_t, eta_t, lambda_t, mu_t, I_t, v1, v2, v3, v4, v5, dt, Hb, H0, L, dR_dt, lambda_bar, (2/dt)*mu_bar, g, rho, Mass, solvers_print);
  File "/Users/matak/Documents/Simulations/Firedrake/Ship/Modules/Inequality constraint/Mixed system/solvers.py", line 52, in solver_F
    F_solver = LinearVariationalSolver(F_problem, solver_parameters=solvers_print)
  File "/Users/matak/firedrake/src/firedrake/firedrake/variational_solver.py", line 262, in __init__
    super(LinearVariationalSolver, self).__init__(*args, **kwargs)
  File "/Users/matak/firedrake/src/firedrake/firedrake/variational_solver.py", line 132, in __init__
    appctx=appctx)
  File "/Users/matak/firedrake/src/firedrake/firedrake/solving_utils.py", line 213, in __init__
    appctx=appctx)
  File "/Users/matak/firedrake/src/firedrake/firedrake/assemble.py", line 104, in allocate_matrix
    allocate_only=True)
  File "<decorator-gen-278>", line 2, in _assemble
  File "/Users/matak/firedrake/src/firedrake/firedrake/utils.py", line 62, in wrapper
    return f(*args, **kwargs)
  File "/Users/matak/firedrake/src/firedrake/firedrake/assemble.py", line 261, in _assemble
    "%s_%s_matrix" % fs_names)
  File "/Users/matak/firedrake/src/firedrake/firedrake/matrix.py", line 152, in __init__
    self._M = op2.Mat(*args, **kwargs)
  File "/Users/matak/firedrake/src/PyOP2/pyop2/petsc_base.py", line 626, in __init__
    self._init()
  File "/Users/matak/firedrake/src/PyOP2/pyop2/petsc_base.py", line 637, in _init
    self._init_nest()
  File "/Users/matak/firedrake/src/PyOP2/pyop2/petsc_base.py", line 696, in _init_nest
    '_'.join([self.name, str(i), str(j)])))
  File "/Users/matak/firedrake/src/PyOP2/pyop2/petsc_base.py", line 626, in __init__
    self._init()
  File "/Users/matak/firedrake/src/PyOP2/pyop2/petsc_base.py", line 642, in _init
    self._init_block()
  File "/Users/matak/firedrake/src/PyOP2/pyop2/petsc_base.py", line 709, in _init_block
    self._init_global_block()
  File "/Users/matak/firedrake/src/PyOP2/pyop2/petsc_base.py", line 773, in _init_global_block
    self._version_set_zero()
AttributeError: 'Mat' object has no attribute '_version_set_zero'

Here is the relevant part of the code:

    aphi = v1*(phi - lambda_t)*dx
    Lphi = v1*(phi0 - 0.5*dt*g*(eta0-etaR))*dx

    aeta = (v2*eta - dt*Hb*inner(grad(v2),grad(phi)))*dx
    Leta = v2*eta0*dx + dt*H0*dR_dt*v2*ds(1) #ds_v(1)

    alambda = v3*(eta/dt + rho/Mass*I_t + mu_bar*mu_t)*dx
    Llambda = v3*(Z0/dt + W0)*dx

    amu = v4*(mu_bar*lambda_t + lambda_bar*mu_t)*dx

    aI = v5*(I_t/L-lambda_t)*dx

    a_solve = aphi + aeta + alambda + amu + aI
    L_solve = Lphi + Leta + Llambda

    Ap = v1*phi*dx + Hb*inner(grad(v1),grad(phi))*dx \
       + v2*eta*dx \
       + v3*(rho/Mass-mu_bar**2)*lambda_t*dx \
       + v4*lambda_bar*mu_t*dx \
       + v5*1.0/L*I_t*dx

    F_problem = LinearVariationalProblem(a_solve, L_solve, w, aP=Ap)
    F_solver = LinearVariationalSolver(F_problem, solver_parameters=solvers_print)

Thank you,

Anna.

On 7 Nov 2016, at 17:23, David Ham <david.ham@imperial.ac.uk> wrote:

Yes. This is because trace elements were very recently (after my email) merged into other components of Firedrake and the globals branch needs to catch up.

I've just pushed the relevant commits to the real-function-space branch so that might work now.

Regards,

David


On Mon, 7 Nov 2016 at 17:15 Anna Kalogirou <a.kalogirou@leeds.ac.uk> wrote:
Dear David,

I have just updated firedrake using the branches you mention in the email below but I now get some error related to the mesh (?), when running various codes which were previously working. Any idea what this is?

Thanks, Anna.


  File "/e/data1/users/matak/opt/firedrake-installation/firedrake/src/firedrake/firedrake/functionspace.py", line 42, in make_scalar_element
    mesh.init()
  File "/e/data1/users/matak/opt/firedrake-installation/firedrake/src/firedrake/firedrake/mesh.py", line 898, in init
    self._callback(self)
  File "/e/data1/users/matak/opt/firedrake-installation/firedrake/src/firedrake/firedrake/mesh.py", line 1245, in callback
    dim=geometric_dim)
  File "/e/data1/users/matak/opt/firedrake-installation/firedrake/src/firedrake/firedrake/functionspace.py", line 174, in VectorFunctionSpace
    return FunctionSpace(mesh, element, name=name)
  File "<decorator-gen-280>", line 2, in FunctionSpace
  File "/e/data1/users/matak/opt/firedrake-installation/firedrake/src/PyOP2/pyop2/profiling.py", line 59, in wrapper
    return f(*args, **kwargs)
  File "/e/data1/users/matak/opt/firedrake-installation/firedrake/src/firedrake/firedrake/functionspace.py", line 127, in FunctionSpace
    check_element(element)
  File "/e/data1/users/matak/opt/firedrake-installation/firedrake/src/firedrake/firedrake/functionspace.py", line 85, in check_element
    ufl.TraceElement, ufl.HDivElement, ufl.HCurlElement):
AttributeError: 'module' object has no attribute 'TraceElement'



 
On 04/11/16 16:16, David Ham wrote:
A brief status update on this: the real-function-spaces branch of Firedrake taken together with the globals_petsc_changes branch of PyOP2 no longer exhibits the direct crash observed. However I am also yet to actually successfully solve using a block preconditioner. I need to consult with Lawrence to establish whether the problem is another bug or pilot error.

Regards,

David

On Mon, 24 Oct 2016 at 11:37 Mitchell, Lawrence <lawrence.mitchell@imperial.ac.uk> wrote:

> On 24 Oct 2016, at 11:13, Anna Kalogirou <A.Kalogirou@leeds.ac.uk> wrote:
>
> Hi Lawrence,
>
> Any update regarding the bug reported below?

This appears to be more involved than I had first thought.  So no luck yet, sorry! David and I need to find some time together to work out the differences/corner cases.

Cheers,

Lawrence
_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake


_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake

_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake