Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
D2O
Commits
23df6732
Commit
23df6732
authored
May 26, 2016
by
theos
Browse files
Bugfix in _slicing_distributor: contraction_helper was caught in a deadlock.
parent
4db365d1
Pipeline
#3849
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
d2o/distributor_factory.py
View file @
23df6732
...
...
@@ -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
,
...
...
test/test_distributed_data_object.py
View file @
23df6732
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment