Skip to content

Commit 1bbd9df

Browse files
authored
Fix a deadlock with VertexOnlyMesh'es created not on COMM_WORLD (#3461)
* Fix a deadlock with VertexOnlyMesh'es created not on COMM_WORLD * Add a test that checks we can make VertexOnlyMeshes on things other than COMM_WORLD --------- Co-authored-by: Patrick Farrell <[email protected]>
1 parent 6cdf035 commit 1bbd9df

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

firedrake/mesh.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,8 @@ def _c_locator(self, tolerance=None):
23252325
str(libspatialindex_so),
23262326
f"-Wl,-rpath,{sys.prefix}/lib",
23272327
lsi_runpath
2328-
]
2328+
],
2329+
comm=self.comm
23292330
)
23302331

23312332
locator.argtypes = [ctypes.POINTER(function._CFunction),
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from firedrake import *
2+
import pytest
3+
4+
5+
@pytest.mark.parallel(nprocs=2)
6+
def test_different_comms():
7+
8+
rank = COMM_WORLD.rank
9+
10+
if rank == 0:
11+
mesh = UnitIntervalMesh(1, comm=COMM_SELF)
12+
vom = VertexOnlyMesh(mesh, [[0.5]])
13+
assert vom is not None

0 commit comments

Comments
 (0)