Why does a mesh without initializing make the process hang? #2423
-
The code below will hang when run in parallel. Just create a mesh, del it, and then plot one figure, then the process will hang. Can someone explain this?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This looks like an incarnation of the known issue with parallel object destruction. Basically, the cyclic garbage collector in Firedrake destroys objects in a non-deterministic way, while PETSc requires that all objects are collectively destroyed by all ranks at once. The combination of these means that Firedrake object destruction can cause deadlocks, especially if different ranks execute different code paths. This is the case here, and it doesn't help that the different code path contains no Firedrake code. @JDBetteridge is close to a fix for this one, which involves a quite non-trivial change to the garbage collection in PETSc4py. |
Beta Was this translation helpful? Give feedback.
This looks like an incarnation of the known issue with parallel object destruction. Basically, the cyclic garbage collector in Firedrake destroys objects in a non-deterministic way, while PETSc requires that all objects are collectively destroyed by all ranks at once. The combination of these means that Firedrake object destruction can cause deadlocks, especially if different ranks execute different code paths. This is the case here, and it doesn't help that the different code path contains no Firedrake code.
@JDBetteridge is close to a fix for this one, which involves a quite non-trivial change to the garbage collection in PETSc4py.