From 6dd3ba55dc87cef20e59f7ef1337c37f4aade3a7 Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Fri, 11 Jan 2019 14:48:31 +0100
Subject: [PATCH] Datahandling synchronization function: consistent interface

---
 datahandling/datahandling_interface.py | 2 +-
 datahandling/parallel_datahandling.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/datahandling/datahandling_interface.py b/datahandling/datahandling_interface.py
index 2ffe06a07..b8eec4971 100644
--- a/datahandling/datahandling_interface.py
+++ b/datahandling/datahandling_interface.py
@@ -211,7 +211,7 @@ class DataHandling(ABC):
     # ------------------------------- Communication --------------------------------------------------------------------
 
     @abstractmethod
-    def synchronization_function(self, names, stencil, target, **kwargs) -> Callable[[], None]:
+    def synchronization_function(self, names, stencil=None, target=None, **kwargs) -> Callable[[], None]:
         """Synchronizes ghost layers for distributed arrays.
 
         For serial scenario this has to be called for correct periodicity handling
diff --git a/datahandling/parallel_datahandling.py b/datahandling/parallel_datahandling.py
index 5d3f2a2fa..03b7c2e81 100644
--- a/datahandling/parallel_datahandling.py
+++ b/datahandling/parallel_datahandling.py
@@ -281,7 +281,7 @@ class ParallelDataHandling(DataHandling):
     def synchronization_function_gpu(self, names, stencil=None, buffered=True, stencil_restricted=False, **_):
         return self.synchronization_function(names, stencil, 'gpu', buffered, stencil_restricted)
 
-    def synchronization_function(self, names, stencil=None, target='cpu', buffered=True, stencil_restricted=False):
+    def synchronization_function(self, names, stencil=None, target=None, buffered=True, stencil_restricted=False):
         if target is None:
             target = self.default_target
 
-- 
GitLab