From 6aefe27727ad516dcb9dd9ffc1f3019c6141ebcf Mon Sep 17 00:00:00 2001
From: Ellis <eshoag@illinois.edu>
Date: Sun, 5 Nov 2017 18:42:12 -0600
Subject: [PATCH] Notes for myself

---
 grudge/execution.py                 | 7 +++++--
 grudge/symbolic/mappers/__init__.py | 3 +--
 grudge/symbolic/operators.py        | 2 +-
 test/test_mpi_communication.py      | 4 ++--
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/grudge/execution.py b/grudge/execution.py
index b0f2dca..c84db90 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 a687482..c528c01 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 c1a006e..188b37c 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 f338423..55c364b 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")
 
-- 
GitLab