Commit 23df6732 authored by theos's avatar theos

Bugfix in _slicing_distributor: contraction_helper was caught in a deadlock.

parent 4db365d1
Pipeline #3849 skipped
......@@ -619,7 +619,9 @@ class _slicing_distributor(distributor):
# Contracting (4, 4) to (4,).
# (4, 4) was distributed (1, 4)...(1, 4)
# (4, ) is not distributed like (1,)...(1,) but like (2,)(2,)()()!
if result.local_shape != contracted_global_data.shape:
equalQ = (result.local_shape == contracted_global_data.shape)
all_equalQ = np.all(self._allgather(equalQ))
if not all_equalQ:
result = parent.copy_empty(
local_shape=contracted_global_data.shape,
dtype=new_dtype,
......
......@@ -1783,8 +1783,6 @@ class Test_axis(unittest.TestCase):
def test_axis_with_operations(self, function, dtype, global_shape,
distribution_strategy, axis):
import d2o
print d2o.config.dependency_injector.registry
(a, obj) = generate_data(global_shape, dtype,
distribution_strategy,
strictly_positive=True)
......@@ -1807,7 +1805,7 @@ class Test_axis(unittest.TestCase):
'min', 'amin', 'nanmin', 'argmin', 'max', 'amax',
'nanmax', 'argmax'],
all_datatypes[1:],
[(3, 2, 3)],
[(3, 2, 2)],
all_distribution_strategies,
[(0, 1), (1, 2), (0, 1, 2)]),
testcase_func_name=custom_name_func)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment