Skip to content

No attribute 'UNUSED_NONZERO_LOCATION_ERR' when projecting #286

Description

@ctjacobs

I've just upgraded PyOP2, Firedrake, FFC and UFL. I now get the following error when running the swe_dam_break_1d test case (in the firedrake-fluids repository):

christian@elevate ~/firedrake-fluids/tests/swe_dam_break_1d $ python ../../models/shallow_water.py swe_dam_break_1d.swml 
Initialising simulation...
Setting up a new Continuous Lagrange function space of degree 2 called VelocityFunctionSpace
Setting up a new Continuous Lagrange function space of degree 1 called FreeSurfaceFunctionSpace
pyop2:WARNING *** Projecting output function to CG1
Compiling form form

Compiler stage 1: Analyzing form(s)
-----------------------------------

  Name:                   ''
  Cell:                   <interval cell in 1D>
  Topological dimension:  1
  Geometric dimension:    1
  Rank:                   2
  Number of coefficients: 0
  Arguments:              '[v_{-2}, v_{-1}]'
  Coefficients:           '[]'
  Argument names:         '[v0, v1]'
  Coefficient names:      '[]'
  Unique elements:        'Vector<1 x CG1(?)>'
  Unique sub elements:    'Vector<1 x CG1(?)>, CG1(?)'
  Domains:                (Domain(Cell('interval', 1), 'interval_multiverse', 1, 1),
                          )
  Top level domains:      (Domain(Cell('interval', 1), 'interval_multiverse', 1, 1),
                          )

  Extracting monomial form representation from UFL form
  Transforming monomial form to reference element
  representation:    auto --> tensor
  quadrature_degree: auto --> 2
  quadrature_rule:   auto --> default

Compiler stage 1 finished in 0.00439191 seconds.

Compiler stage 2: Computing intermediate representation
-------------------------------------------------------
  Computing representation of integrals
  Computing quadrature representation
  Transforming cell integral

Compiler stage 2 finished in 0.0155511 seconds.

Compiler stage 3: Optimizing intermediate representation
--------------------------------------------------------
  Skipping optimizations, add -O to optimize

Compiler stage 3 finished in 0.000208139 seconds.

Compiler stage 4 finished in 0.0028739 seconds.

FFC finished in 0.0235779 seconds.
Traceback (most recent call last):
  File "../../models/shallow_water.py", line 510, in <module>
    sw = ShallowWater(path)
  File "../../models/shallow_water.py", line 187, in __init__
    self.output_file[0] << self.output_function[0]
  File "/home/christian/firedrake/firedrake/io.py", line 100, in __lshift__
    self._file << data
  File "/home/christian/firedrake/firedrake/io.py", line 492, in __lshift__
    self._update_PVD(data)
  File "/home/christian/firedrake/firedrake/io.py", line 510, in _update_PVD
    new_vtk << function
  File "/home/christian/firedrake/firedrake/io.py", line 210, in __lshift__
    output = projection.project(function, Vo, name=function.name())
  File "/home/christian/firedrake/firedrake/projection.py", line 86, in project
    form_compiler_parameters=form_compiler_parameters)
  File "/home/christian/firedrake/firedrake/solving.py", line 890, in solve
    _solve_varproblem(*args, **kwargs)
  File "/home/christian/firedrake/firedrake/solving.py", line 918, in _solve_varproblem
    nullspace=nullspace)
  File "/home/christian/firedrake/firedrake/solving.py", line 355, in __init__
    super(LinearVariationalSolver, self).__init__(*args, **kwargs)
  File "/home/christian/firedrake/firedrake/solving.py", line 169, in __init__
    self.snes.setJacobian(self.form_jacobian, J=self._jac_tensor._M.handle,
  File "/usr/local/lib/python2.7/dist-packages/PyOP2-0.10.0-py2.7-linux-x86_64.egg/pyop2/petsc_base.py", line 422, in handle
    self._init()
  File "/usr/local/lib/python2.7/dist-packages/PyOP2-0.10.0-py2.7-linux-x86_64.egg/pyop2/petsc_base.py", line 217, in _init
    self._init_block()
  File "/usr/local/lib/python2.7/dist-packages/PyOP2-0.10.0-py2.7-linux-x86_64.egg/pyop2/petsc_base.py", line 285, in _init_block
    mat.setOption(mat.Option.UNUSED_NONZERO_LOCATION_ERR, False)
AttributeError: type object 'MatOption' has no attribute 'UNUSED_NONZERO_LOCATION_ERR'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions