diff --git a/grudge/execution.py b/grudge/execution.py index e0dd2e931f1742b64c5bac523069a5d4f1cede20..b0f2dca6f26b73a4f91dc7734caa9b58444440a3 100644 --- a/grudge/execution.py +++ b/grudge/execution.py @@ -280,17 +280,22 @@ class ExecutionMapper(mappers.Evaluator, return conn(self.queue, self.rec(field_expr)).with_queue(self.queue) def map_opposite_rank_face_swap(self, op, field_expr): - # raise NotImplementedError("map_opposite_rank_face_swap") from mpi4py import MPI mpi_comm = MPI.COMM_WORLD + + # TODO: Where can I find the group factory? from meshmode.discretization.poly_element\ import PolynomialWarpAndBlendGroupFactory - group_factory = PolynomialWarpAndBlendGroupFactory(4) - vol_discr = self.discr.boundary_discr(sym.BTAG_PARTITION, sym.QTAG_NONE) + group_factory = PolynomialWarpAndBlendGroupFactory(self.discr.order) from meshmode.distributed import MPIBoundaryCommunicator - bdry_comm = MPIBoundaryCommunicator(mpi_comm, self.queue, vol_discr, group_factory) - return bdry_comm(self.queue, self.rec(field_expr)).with_queue(self.queue) + bdry_comm = MPIBoundaryCommunicator(mpi_comm, self.queue, + self.discr.volume_discr, + group_factory) + + raise NotImplementedError("map_opposite_rank_face_swap") + # TODO: How do we use bdry_comm.remote_to_local_bdry_conns to communicate + # data? 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 323cc4ae6d8409805b1ef40fc93eabe2b6bdf5bb..a687482e2321a9bfe307e0557acc21e7fecedef6 100644 --- a/grudge/symbolic/mappers/__init__.py +++ b/grudge/symbolic/mappers/__init__.py @@ -340,6 +340,7 @@ class DistributedMapper(CSECachingMapperMixin, IdentityMapper): 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 return (op.OppositeInteriorFaceSwap()(self.rec(expr.field)) + op.OppositeRankFaceSwap()(self.rec(expr.field))) else: diff --git a/grudge/symbolic/primitives.py b/grudge/symbolic/primitives.py index 4fe9b132f524f160ec6e7180d44134a5a2773272..44eb7893dcb0e657b3dbae4c8dbaeeeecb1d7430 100644 --- a/grudge/symbolic/primitives.py +++ b/grudge/symbolic/primitives.py @@ -183,8 +183,9 @@ class DOFDesc(object): pass elif domain_tag in [BTAG_ALL, BTAG_REALLY_ALL, BTAG_NONE]: pass - elif domain_tag is BTAG_PARTITION: - pass + # FIXME: I think I need to pass BTAG_PARTITION from OppositeRankFaceSwap + # elif domain_tag is BTAG_PARTITION: + # pass elif isinstance(domain_tag, DTAG_BOUNDARY): pass else: diff --git a/test/test_mpi_communication.py b/test/test_mpi_communication.py index b9e0fe0485e6558d32393c970a00d0cf4d83c77e..f338423b4941bc14858bdc3aa3cc9df8c2e457b7 100644 --- a/test/test_mpi_communication.py +++ b/test/test_mpi_communication.py @@ -163,6 +163,7 @@ def test_mpi_communication(num_partitions): # }}} + if __name__ == "__main__": if "RUN_WITHIN_MPI" in os.environ: mpi_communication_entrypoint()