Segmentation fault when using class derived from Expression with multiple threads
Bug #1047820 reported by
James Maddison
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The following example leads to a segmentation fault:
#!/usr/bin/env python
from dolfin import *
parameters[
class TestExpression(
def eval(self, value, x):
value[:] = 1.0
return
def value_shape(self):
return tuple()
mesh = Rectangle(0.0, 0.0, 1.0, 1.0, 10, 10)
space = FunctionSpace(mesh, "CG", 1)
test = TestFunction(space)
trial = TrialFunction(
mass = assemble(
rhs = assemble(
F = Function(space)
solve(mass, F.vector(), rhs)
print assemble(F * dx)
If TestExpression() is replaced with Constant(1.0) or Expression("1.0") then the test runs without error.
Changed in dolfin: | |
status: | New → Confirmed |
To post a comment you must log in.
Probably because eval() is being called from inside a threaded region, but doesn't grab the python GIL