Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Neel Shah
NIFTy
Commits
03a8b938
Commit
03a8b938
authored
May 02, 2016
by
theos
Browse files
Fixed two bugs related to the contraction_helper and the mpi_operator translator.
parent
d4b62092
Changes
2
Hide whitespace changes
Inline
Side-by-side
d2o/distributor_factory.py
View file @
03a8b938
...
...
@@ -602,11 +602,10 @@ class _slicing_distributor(distributor):
contracted_global_data
=
contracted_local_data
new_dist_strategy
=
parent
.
distribution_strategy
new_dtype
=
contracted_global_data
.
dtype
if
new_shape
==
():
result
=
contracted_global_data
else
:
new_dtype
=
contracted_global_data
.
dtype
# try to store the result in a distributed_data_object with the
# distribution_strategy as parent
result
=
parent
.
copy_empty
(
global_shape
=
new_shape
,
...
...
d2o/translate_to_mpi_operator.py
View file @
03a8b938
...
...
@@ -10,12 +10,12 @@ MPI = gdi[gc['mpi_module']]
custom_MIN
=
MPI
.
Op
.
Create
(
lambda
x
,
y
,
datatype
:
np
.
amin
(
np
.
vstack
((
x
,
y
)),
axis
=
0
)
if
isinstance
(
x
,
np
.
ndarray
)
else
lambda
x
,
y
,
d
:
MPI
.
MIN
(
x
,
y
))
min
(
x
,
y
))
custom_MAX
=
MPI
.
Op
.
Create
(
lambda
x
,
y
,
datatype
:
np
.
amax
(
np
.
vstack
((
x
,
y
)),
axis
=
0
)
if
isinstance
(
x
,
np
.
ndarray
)
else
lambda
x
,
y
,
d
:
MPI
.
MAX
(
x
,
y
))
max
(
x
,
y
))
custom_NANMIN
=
MPI
.
Op
.
Create
(
lambda
x
,
y
,
datatype
:
np
.
nanmin
(
np
.
vstack
((
x
,
y
)),
axis
=
0
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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