[yt-svn] commit/yt: ngoldbaum: Modifying parallel_objects so that a barrier() happens at the end
Bitbucket
commits-noreply at bitbucket.org
Mon May 7 17:30:17 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/8d6d7639e079/
changeset: 8d6d7639e079
branch: yt
user: ngoldbaum
date: 2012-05-08 01:01:00
summary: Modifying parallel_objects so that a barrier() happens at the end
of every parallel_objects loop. Also making njobs a keyword argugment.
affected #: 1 file
diff -r 2fae87c99fd4c8c550e3185485ebc4271b9807f7 -r 8d6d7639e079ff6eeb25e11b96b81a1b819b0cf6 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
@@ -320,7 +320,7 @@
result = None
result_id = None
-def parallel_objects(objects, njobs, storage = None):
+def parallel_objects(objects, njobs = 0, storage = None, barrier = True):
if not parallel_capable:
njobs = 1
mylog.warn("parallel_objects() is being used when parallel_capable is false. The loop is not being run in parallel. This may not be what was expected.")
@@ -362,6 +362,8 @@
new_storage = my_communicator.par_combine_object(
to_share, datatype = 'dict', op = 'join')
storage.update(new_storage)
+ if barrier:
+ my_communicator.barrier()
class CommunicationSystem(object):
communicators = []
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