cbc.block, is it working?


120
views
0
3 months ago by
Hi!

Using fenics 2017.2.0 and python 3.6, I am trying to get cbc.block running. When running the Poisson demo of cbc.block I get some errors:
cbc.block/demo$ python3 poisson.py

constructed AMG preconditioner in 0.00 s
Traceback (most recent call last):
  File "lib/python3.6/site-packages/block/object_pool.py", line 54, in pooled_create_vec
    vec = self._vec_pool[dim].get()
  File "lib/python3.6/site-packages/block/object_pool.py", line 20, in get
    return self.free.pop()
IndexError: pop from empty list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "poisson.py", line 27, in <module>
    x = Ainv*b
  File "lib/python3.6/site-packages/block/block_base.py", line 17, in __mul__
    return self.matvec(other)
  File "lib/python3.6/site-packages/block/iterative/iterative.py", line 57, in matvec
    x = self.A.create_vec(dim=1)
  File "lib/python3.6/site-packages/block/object_pool.py", line 57, in pooled_create_vec
    self._vec_pool[dim].add(vec)
  File "lib/python3.6/site-packages/block/object_pool.py", line 16, in add
    self.all.add(obj)
TypeError: unhashable type: 'Vector'
Aborted (core dumped)
​

Any ideas about what I am doing wrong?

Best Regards,
Søren
Community: FEniCS Project

1 Answer


0
3 months ago by
Found the answer to this one: NO!

It is not working with fenics version 2017.2.0 and python3 :(

The problem is related to this one:
https://bitbucket.org/fenics-project/dolfin/issues/853/type-dolfinvector-unhashable

If the __eq__ method is removed for class GenericVector in ./site-packages/dolfin/cpp/la.py (it is not really implemented anyway...) the error is gone. Then comes a bunch of other errors which can also easily be fixed, so I the poisson demo can run at least....
Please login to add an answer/comment or follow this question.

Similar posts:
Search »