[yt-svn] commit/yt-3.0: MatthewTurk: Fixing mistake in parallel_objects that was using the wrong iterator for yielding

Bitbucket commits-noreply at bitbucket.org
Tue Nov 27 02:50:37 PST 2012


1 new commit in yt-3.0:


https://bitbucket.org/yt_analysis/yt-3.0/changeset/a8d6d5c5866a/
changeset:   a8d6d5c5866a
branch:      yt-3.0
user:        MatthewTurk
date:        2012-11-27 11:50:28
summary:     Fixing mistake in parallel_objects that was using the wrong iterator for yielding
affected #:  1 file

diff -r 3246bedb07deba008f77a7f1f247097950fab215 -r a8d6d5c5866a575d0b86b8f15df0fade3bcd3fe2 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
@@ -432,11 +432,14 @@
             break
     if parallel_capable:
         communication_system.push_with_ids(all_new_comms[my_new_id].tolist())
+    obj_ids = np.arange(len(objects))
+
     to_share = {}
     # If our objects object is slice-aware, like time series data objects are,
     # this will prevent intermediate objects from being created.
-    for obj_id, obj in enumerate(objects):
-        result_id = obj_id * njobs + my_new_id
+    oiter = itertools.izip(obj_ids[my_new_id::njobs],
+                           objects[my_new_id::njobs])
+    for result_id, obj in oiter:
         if storage is not None:
             rstore = ResultsStorage()
             rstore.result_id = result_id

Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/

--

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