Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
b4b74105
Commit
b4b74105
authored
May 08, 2017
by
Theo Steininger
Browse files
Fixed the MPI inference in PowerIndices.
parent
e5f51246
Pipeline
#12136
passed with stages
in 10 minutes and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/spaces/power_space/power_indices.py
View file @
b4b74105
...
@@ -16,12 +16,13 @@
...
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
sys
import
numpy
as
np
import
numpy
as
np
from
d2o
import
distributed_data_object
,
\
from
d2o
import
distributed_data_object
,
\
STRATEGIES
as
DISTRIBUTION_STRATEGIES
STRATEGIES
as
DISTRIBUTION_STRATEGIES
from
d2o.config
import
dependency_injector
as
d2o_di
from
d2o.config
import
configuration
as
d2o_config
class
PowerIndices
(
object
):
class
PowerIndices
(
object
):
def
__init__
(
self
,
domain
,
distribution_strategy
,
def
__init__
(
self
,
domain
,
distribution_strategy
,
...
@@ -312,8 +313,7 @@ class PowerIndices(object):
...
@@ -312,8 +313,7 @@ class PowerIndices(object):
# Store the individual pundices in the local_pundex array
# Store the individual pundices in the local_pundex array
local_pundex
[
temp_uniqued_pindex
]
=
local_temp_pundex
local_pundex
[
temp_uniqued_pindex
]
=
local_temp_pundex
# Extract the MPI module from the global_pindex d2o
# Extract the MPI module from the global_pindex d2o
MPI_name
=
global_pindex
.
comm
.
__class__
.
__module__
MPI
=
d2o_di
[
d2o_config
[
'mpi_module'
]]
MPI
=
sys
.
modules
[
MPI_name
]
# Use Allreduce to find the first occurences/smallest pundices
# Use Allreduce to find the first occurences/smallest pundices
global_pindex
.
comm
.
Allreduce
(
local_pundex
,
global_pindex
.
comm
.
Allreduce
(
local_pundex
,
global_pundex
,
global_pundex
,
...
...
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