[yt-svn] commit/yt: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Mon May 7 19:45:31 PDT 2012


2 new commits in yt:


https://bitbucket.org/yt_analysis/yt/changeset/e1989df51e1d/
changeset:   e1989df51e1d
branch:      yt
user:        MatthewTurk
date:        2012-05-04 23:50:59
summary:     This allows communicator-having objects to be pickled.  Communicators are not
really stored, and instead NULL communicators are unpickled.
affected #:  1 file

diff -r fa081737e0b281003d8ebe3007233229fa49254f -r e1989df51e1d95b75f125d81e16b116d09446ac8 yt/utilities/parallel_tools/parallel_analysis_interface.py
--- a/yt/utilities/parallel_tools/parallel_analysis_interface.py
+++ b/yt/utilities/parallel_tools/parallel_analysis_interface.py
@@ -395,6 +395,9 @@
         self.communicators.pop()
         self._update_parallel_state(self.communicators[-1])
 
+def _reconstruct_communicator():
+    return Communicator()
+
 class Communicator(object):
     comm = None
     _grids = None
@@ -409,6 +412,11 @@
     functions for analyzing something in parallel.
     """
 
+    def __reduce__(self):
+        # We don't try to reconstruct any of the properties of the communicator
+        # or the processors.  In general, we don't want to.
+        return (_reconstruct_communicator, ())
+
     def barrier(self):
         if not self._distributed: return
         mylog.debug("Opening MPI Barrier on %s", self.comm.rank)



https://bitbucket.org/yt_analysis/yt/changeset/a6000bfd6695/
changeset:   a6000bfd6695
branch:      yt
user:        MatthewTurk
date:        2012-05-08 04:14:02
summary:     Change to returning the top communicator.  So, if you reconstruct an item from
a pickle inside a parallel_objects loop, this should correctly get it.  It's
not clear to me if this is the right thing to do when passing pickled objects
between MPI tasks, but that should not happen often/ever.
affected #:  1 file

diff -r e1989df51e1d95b75f125d81e16b116d09446ac8 -r a6000bfd669555d6dd23481083d4b763ee030c33 yt/utilities/parallel_tools/parallel_analysis_interface.py
--- a/yt/utilities/parallel_tools/parallel_analysis_interface.py
+++ b/yt/utilities/parallel_tools/parallel_analysis_interface.py
@@ -396,7 +396,7 @@
         self._update_parallel_state(self.communicators[-1])
 
 def _reconstruct_communicator():
-    return Communicator()
+    return communication_system.communicators[-1]
 
 class Communicator(object):
     comm = 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