##// END OF EJS Templates
fix scatter/gather with targets='all'...
MinRK -
Show More
@@ -693,6 +693,9 b' class DirectView(View):'
693 track = track if track is not None else self.track
693 track = track if track is not None else self.track
694 targets = targets if targets is not None else self.targets
694 targets = targets if targets is not None else self.targets
695
695
696 # construct integer ID list:
697 targets = self.client._build_targets(targets)[1]
698
696 mapObject = Map.dists[dist]()
699 mapObject = Map.dists[dist]()
697 nparts = len(targets)
700 nparts = len(targets)
698 msg_ids = []
701 msg_ids = []
@@ -730,6 +733,9 b' class DirectView(View):'
730 mapObject = Map.dists[dist]()
733 mapObject = Map.dists[dist]()
731 msg_ids = []
734 msg_ids = []
732
735
736 # construct integer ID list:
737 targets = self.client._build_targets(targets)[1]
738
733 for index, engineid in enumerate(targets):
739 for index, engineid in enumerate(targets):
734 msg_ids.extend(self.pull(key, block=False, targets=engineid).msg_ids)
740 msg_ids.extend(self.pull(key, block=False, targets=engineid).msg_ids)
735
741
@@ -234,6 +234,15 b' class TestView(ClusterTestCase):'
234 b = view.gather('a', block=True)
234 b = view.gather('a', block=True)
235 assert_array_equal(b, a)
235 assert_array_equal(b, a)
236
236
237 def test_scatter_gather_lazy(self):
238 """scatter/gather with targets='all'"""
239 view = self.client.direct_view(targets='all')
240 x = range(64)
241 view.scatter('x', x)
242 gathered = view.gather('x', block=True)
243 self.assertEquals(gathered, x)
244
245
237 @dec.known_failure_py3
246 @dec.known_failure_py3
238 @skip_without('numpy')
247 @skip_without('numpy')
239 def test_push_numpy_nocopy(self):
248 def test_push_numpy_nocopy(self):
General Comments 0
You need to be logged in to leave comments. Login now