Show More
@@ -692,6 +692,9 b' class DirectView(View):' | |||||
692 | block = block if block is not None else self.block |
|
692 | block = block if block is not None else self.block | |
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 | ||||
|
696 | # construct integer ID list: | |||
|
697 | targets = self.client._build_targets(targets)[1] | |||
695 |
|
698 | |||
696 | mapObject = Map.dists[dist]() |
|
699 | mapObject = Map.dists[dist]() | |
697 | nparts = len(targets) |
|
700 | nparts = len(targets) | |
@@ -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 |
@@ -233,6 +233,15 b' class TestView(ClusterTestCase):' | |||||
233 | view.scatter('a', a) |
|
233 | view.scatter('a', a) | |
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 | ||||
|
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 | ||||
236 |
|
245 | |||
237 | @dec.known_failure_py3 |
|
246 | @dec.known_failure_py3 | |
238 | @skip_without('numpy') |
|
247 | @skip_without('numpy') |
General Comments 0
You need to be logged in to leave comments.
Login now