diff --git a/grudge/execution.py b/grudge/execution.py index b0f2dca6f26b73a4f91dc7734caa9b58444440a3..c84db90c5b29de27e159393cdcf4dd52aaea3fd1 100644 --- a/grudge/execution.py +++ b/grudge/execution.py @@ -294,8 +294,11 @@ class ExecutionMapper(mappers.Evaluator, group_factory) raise NotImplementedError("map_opposite_rank_face_swap") - # TODO: How do we use bdry_comm.remote_to_local_bdry_conns to communicate - # data? + + # FIXME: One rank face swap should swap data between the local rank + # and exactly one remote rank + return bdry_comm.remote_to_local_bdry_conns[0]( + self.queue, self.rec(field_expr)).with_queue(self.queue) def map_opposite_interior_face_swap(self, op, field_expr): dd = op.dd_in diff --git a/grudge/symbolic/mappers/__init__.py b/grudge/symbolic/mappers/__init__.py index a687482e2321a9bfe307e0557acc21e7fecedef6..c528c01d8dfbad29aba032a869a37ddeb039a983 100644 --- a/grudge/symbolic/mappers/__init__.py +++ b/grudge/symbolic/mappers/__init__.py @@ -335,12 +335,11 @@ class OperatorBinder(CSECachingMapperMixin, IdentityMapper): class DistributedMapper(CSECachingMapperMixin, IdentityMapper): - # FIXME: Not sure what this is map_common_subexpression_uncached = IdentityMapper.map_common_subexpression def map_operator_binding(self, expr): if isinstance(expr.op, op.OppositeInteriorFaceSwap): - # FIXME: I'm sure this is not right....but it's a start + # FIXME: Add the sum of the rank face swaps over each rank return (op.OppositeInteriorFaceSwap()(self.rec(expr.field)) + op.OppositeRankFaceSwap()(self.rec(expr.field))) else: diff --git a/grudge/symbolic/operators.py b/grudge/symbolic/operators.py index c1a006e84be74c8d05945f8522ec4cfd82284974..188b37c89fe56dd185435faa3a1c4ec3d9ca3c9a 100644 --- a/grudge/symbolic/operators.py +++ b/grudge/symbolic/operators.py @@ -384,7 +384,7 @@ class OppositeRankFaceSwap(Operator): sym = _sym() if dd_in is None: - # FIXME: Is this correct? + # FIXME: Use BTAG_PARTITION instead dd_in = sym.DOFDesc(sym.FRESTR_INTERIOR_FACES) if dd_out is None: dd_out = dd_in diff --git a/test/test_mpi_communication.py b/test/test_mpi_communication.py index f338423b4941bc14858bdc3aa3cc9df8c2e457b7..55c364b691180deec9f1a65626f3f903ad07fcfc 100644 --- a/test/test_mpi_communication.py +++ b/test/test_mpi_communication.py @@ -96,7 +96,7 @@ def mpi_communication_entrypoint(): [vol_discr.zeros(queue) for i in range(vol_discr.dim)]) # FIXME - #dt = op.estimate_rk4_timestep(vol_discr, fields=fields) + # dt = op.estimate_rk4_timestep(vol_discr, fields=fields) # FIXME: Should meshmode consider BTAG_PARTITION to be a boundary? # Fails because: "found faces without boundary conditions" @@ -147,7 +147,7 @@ def mpi_communication_entrypoint(): # {{{ MPI test pytest entrypoint @pytest.mark.mpi -@pytest.mark.parametrize("num_partitions", [3]) +@pytest.mark.parametrize("num_partitions", [2]) def test_mpi_communication(num_partitions): pytest.importorskip("mpi4py")