Deadlock with constant function space
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Confirmed
|
Low
|
Unassigned |
Bug Description
Mass matrix assembly deadlocks when using constant function spaces, as illustrated by the following code:
#!/usr/bin/env python
from dolfin import *
set_log_
mesh = Rectangle(0.0, 0.0, 1.0, 1.0, 16, 16)
space = FunctionSpace(mesh, "R", 0)
a = assemble(
L = assemble(
F = Function(space)
sv = LUSolver("default")
sv.solve(a, F.vector(), L)
print assemble(F * dx)
The final log output when run on two processes is:
$ mpirun -np 2 ./test
...
Process 0: Initializing PETSc (ignoring command-line arguments).
Process 1: Initializing PETSc (ignoring command-line arguments).
Process 0: Matrix of size 1 x 1 has 1 (100%) nonzero entries.
Process 0: Elapsed time: 0.000280142 (Build sparsity)
Process 0: Elapsed time: 0.00020504 (Init tensor)
Process 0: Elapsed time: 5.96046e-06 (Delete sparsity)
Process 0: Elapsed time: 9.799e-05 (Assemble cells)
Process 0: Elapsed time: 5.96046e-06 (Apply (matrix))
Changed in dolfin: | |
status: | New → Confirmed |
Changed in dolfin: | |
importance: | Undecided → Low |
The problem is that you're assembling a 1x1 matrix in parallel. It's dubious whether this should be considered a 'bug', but in any case it's unlikely to be fixed for some time since it's not a sensible usage case.