Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
c286d744
Commit
c286d744
authored
8 years ago
by
Theo Steininger
Browse files
Options
Downloads
Patches
Plain Diff
Removed explicit knowledge about MPI from power_indices.py
parent
3275f4f3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nifty/spaces/power_space/power_indices.py
+5
-4
5 additions, 4 deletions
nifty/spaces/power_space/power_indices.py
with
5 additions
and
4 deletions
nifty/spaces/power_space/power_indices.py
+
5
−
4
View file @
c286d744
# -*- coding: utf-8 -*-
import
sys
import
numpy
as
np
from
d2o
import
distributed_data_object
,
\
STRATEGIES
as
DISTRIBUTION_STRATEGIES
from
nifty.config
import
dependency_injector
as
gdi
MPI
=
gdi
[
'
MPI
'
]
class
PowerIndices
(
object
):
def
__init__
(
self
,
domain
,
distribution_strategy
,
...
...
@@ -299,6 +297,9 @@ class PowerIndices(object):
global_pundex
=
np
.
empty_like
(
local_pundex
)
# Store the individual pundices in the local_pundex array
local_pundex
[
temp_uniqued_pindex
]
=
local_temp_pundex
# Extract the MPI module from the global_pindex d2o
MPI_name
=
global_pindex
.
comm
.
__class__
.
__module__
MPI
=
sys
.
modules
(
MPI_name
)
# Use Allreduce to find the first occurences/smallest pundices
global_pindex
.
comm
.
Allreduce
(
local_pundex
,
global_pundex
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment