[yt-svn] commit/yt: brittonsmith: Adding parallel support to ProfileND objects, which are used by ProfilePlot and PhasePlot.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Mar 31 11:58:01 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/8b1d9dca449b/
Changeset: 8b1d9dca449b
Branch: yt-3.0
User: brittonsmith
Date: 2014-03-31 16:55:35
Summary: Adding parallel support to ProfileND objects, which are used by ProfilePlot and PhasePlot.
Affected #: 1 file
diff -r 7e34a8c9d6fff7a482d9ee97eaa20ab8f26654f8 -r 8b1d9dca449b4c6fd1d4d56a87ca712926dce7fd yt/data_objects/profiles.py
--- a/yt/data_objects/profiles.py
+++ b/yt/data_objects/profiles.py
@@ -759,6 +759,7 @@
self.field_data = YTFieldData()
self.weight_field = weight_field
self.field_units = {}
+ ParallelAnalysisInterface.__init__(self, comm=data_source.comm)
def add_fields(self, fields):
fields = ensure_list(fields)
@@ -792,7 +793,9 @@
def _finalize_storage(self, fields, temp_storage):
# We use our main comm here
# This also will fill _field_data
- # FIXME: Add parallelism and combining std stuff
+ temp_storage.values = self.comm.mpi_allreduce(temp_storage.values, op="sum", dtype="float64")
+ temp_storage.weight_values = self.comm.mpi_allreduce(temp_storage.weight_values, op="sum", dtype="float64")
+ temp_storage.used = self.comm.mpi_allreduce(temp_storage.used, op="sum", dtype="bool")
blank = ~temp_storage.used
self.used = temp_storage.used
if self.weight_field is not None:
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list