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

Bitbucket commits-noreply at bitbucket.org
Fri Jun 22 15:44:37 PDT 2012


3 new commits in yt:


https://bitbucket.org/yt_analysis/yt/changeset/906accaf6097/
changeset:   906accaf6097
branch:      yt
user:        brittonsmith
date:        2012-06-23 00:07:08
summary:     Adding dynamic keyword to TimeSeriesData.piter function.
affected #:  2 files

diff -r df2899c15f599537ca370351e9f6e6cafa89a17a -r 906accaf6097b2e2260ddd536e0e4d159ce8c328 yt/data_objects/time_series.py
--- a/yt/data_objects/time_series.py
+++ b/yt/data_objects/time_series.py
@@ -109,13 +109,14 @@
     def __len__(self):
         return len(self._pre_outputs)
 
-    def piter(self, storage = None):
+    def piter(self, storage = None, dynamic = False):
         if self.parallel == False:
             njobs = 1
         else:
             if self.parallel == True: njobs = -1
             else: njobs = self.parallel
-        return parallel_objects(self, njobs, storage)
+        return parallel_objects(self, njobs=njobs, storage=storage,
+                                dynamic=dynamic)
         
     def eval(self, tasks, obj=None):
         tasks = ensure_list(tasks)


diff -r df2899c15f599537ca370351e9f6e6cafa89a17a -r 906accaf6097b2e2260ddd536e0e4d159ce8c328 yt/utilities/parallel_tools/task_queue.py
--- a/yt/utilities/parallel_tools/task_queue.py
+++ b/yt/utilities/parallel_tools/task_queue.py
@@ -1,7 +1,7 @@
 """
 Task queue in yt
 
-Author: Britton Smith <matthewturk at gmail.com>
+Author: Britton Smith <brittonsmith at gmail.com>
 Affiliation: Michigan State University
 Author: Matthew Turk <matthewturk at gmail.com>
 Affiliation: Columbia University



https://bitbucket.org/yt_analysis/yt/changeset/4ad4df43733a/
changeset:   4ad4df43733a
branch:      yt
user:        brittonsmith
date:        2012-06-23 00:19:47
summary:     Adding dynamic keyword to halo profiler functions for using the task queue.
affected #:  1 file

diff -r 906accaf6097b2e2260ddd536e0e4d159ce8c328 -r 4ad4df43733a569e7a5bc33b5bcbbd25b4ea0d8f yt/analysis_modules/halo_profiler/multi_halo_profiler.py
--- a/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
+++ b/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
@@ -416,7 +416,7 @@
 
     @parallel_blocking_call
     def make_profiles(self, filename=None, prefilters=None, njobs=-1,
-                      profile_format='ascii'):
+                      dynamic=False, profile_format='ascii'):
         r"""Make radial profiles for all halos in the list.
         
         After all the calls to `add_profile`, this will trigger the actual
@@ -440,6 +440,10 @@
             The number of jobs over which to split the profiling.  Set
             to -1 so that each halo is done by a single processor.
             Default: -1.
+        dynamic : bool
+            If True, distribute halos using a task queue.  If False,
+            distribute halos evenly over all jobs.
+            Default: False.
         profile_format : str
             The file format for the radial profiles, 'ascii' or 'hdf5'.
             Default: 'ascii'.
@@ -502,7 +506,7 @@
 
         # Profile all halos.
         updated_halos = []
-        for halo in parallel_objects(self.all_halos, njobs=njobs):
+        for halo in parallel_objects(self.all_halos, njobs=njobs, dynamic=dynamic):
             # Apply prefilters to avoid profiling unwanted halos.
             filter_result = True
             haloQuantities = {}
@@ -692,7 +696,8 @@
 
     @parallel_blocking_call
     def make_projections(self, axes=[0, 1, 2], halo_list='filtered',
-                         save_images=False, save_cube=True, njobs=-1):
+                         save_images=False, save_cube=True, njobs=-1,
+                         dynamic=False):
         r"""Make projections of all halos using specified fields.
         
         After adding fields using `add_projection`, this starts the actual
@@ -716,6 +721,10 @@
             The number of jobs over which to split the projections.  Set
             to -1 so that each halo is done by a single processor.
             Default: -1.
+        dynamic : bool
+            If True, distribute halos using a task queue.  If False,
+            distribute halos evenly over all jobs.
+            Default: False.
         
         Examples
         --------
@@ -764,7 +773,7 @@
                          self.pf.parameters['DomainRightEdge'][w])
                   for w in range(self.pf.parameters['TopGridRank'])]
 
-        for halo in parallel_objects(halo_projection_list, njobs=njobs):
+        for halo in parallel_objects(halo_projection_list, njobs=njobs, dynamic=dynamic):
             if halo is None:
                 continue
             # Check if region will overlap domain edge.
@@ -853,7 +862,7 @@
 
     @parallel_blocking_call
     def analyze_halo_spheres(self, analysis_function, halo_list='filtered',
-                             analysis_output_dir=None, njobs=-1):
+                             analysis_output_dir=None, njobs=-1, dynamic=False):
         r"""Perform custom analysis on all halos.
         
         This will loop through all halo on the HaloProfiler's list, 
@@ -880,6 +889,10 @@
             The number of jobs over which to split the analysis.  Set
             to -1 so that each halo is done by a single processor.
             Default: -1.
+        dynamic : bool
+            If True, distribute halos using a task queue.  If False,
+            distribute halos evenly over all jobs.
+            Default: False.
 
         Examples
         --------
@@ -915,7 +928,7 @@
                 my_output_dir = "%s/%s" % (self.pf.fullpath, analysis_output_dir)
             self.__check_directory(my_output_dir)
 
-        for halo in parallel_objects(halo_analysis_list, njobs=njobs):
+        for halo in parallel_objects(halo_analysis_list, njobs=njobs, dynamic=dynamic):
             if halo is None: continue
 
             # Get a sphere object to analze.



https://bitbucket.org/yt_analysis/yt/changeset/efa0d8be8d65/
changeset:   efa0d8be8d65
branch:      yt
user:        jwise77
date:        2012-06-23 00:44:36
summary:     Merged in brittonsmith/post-office (pull request #177)
affected #:  3 files

diff -r 17225c236e6afc77beb9f5620dbc560e6ee26834 -r efa0d8be8d6503222c750018d8545005ff8f0db8 yt/analysis_modules/halo_profiler/multi_halo_profiler.py
--- a/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
+++ b/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
@@ -416,7 +416,7 @@
 
     @parallel_blocking_call
     def make_profiles(self, filename=None, prefilters=None, njobs=-1,
-                      profile_format='ascii'):
+                      dynamic=False, profile_format='ascii'):
         r"""Make radial profiles for all halos in the list.
         
         After all the calls to `add_profile`, this will trigger the actual
@@ -440,6 +440,10 @@
             The number of jobs over which to split the profiling.  Set
             to -1 so that each halo is done by a single processor.
             Default: -1.
+        dynamic : bool
+            If True, distribute halos using a task queue.  If False,
+            distribute halos evenly over all jobs.
+            Default: False.
         profile_format : str
             The file format for the radial profiles, 'ascii' or 'hdf5'.
             Default: 'ascii'.
@@ -502,7 +506,7 @@
 
         # Profile all halos.
         updated_halos = []
-        for halo in parallel_objects(self.all_halos, njobs=njobs):
+        for halo in parallel_objects(self.all_halos, njobs=njobs, dynamic=dynamic):
             # Apply prefilters to avoid profiling unwanted halos.
             filter_result = True
             haloQuantities = {}
@@ -692,7 +696,8 @@
 
     @parallel_blocking_call
     def make_projections(self, axes=[0, 1, 2], halo_list='filtered',
-                         save_images=False, save_cube=True, njobs=-1):
+                         save_images=False, save_cube=True, njobs=-1,
+                         dynamic=False):
         r"""Make projections of all halos using specified fields.
         
         After adding fields using `add_projection`, this starts the actual
@@ -716,6 +721,10 @@
             The number of jobs over which to split the projections.  Set
             to -1 so that each halo is done by a single processor.
             Default: -1.
+        dynamic : bool
+            If True, distribute halos using a task queue.  If False,
+            distribute halos evenly over all jobs.
+            Default: False.
         
         Examples
         --------
@@ -764,7 +773,7 @@
                          self.pf.parameters['DomainRightEdge'][w])
                   for w in range(self.pf.parameters['TopGridRank'])]
 
-        for halo in parallel_objects(halo_projection_list, njobs=njobs):
+        for halo in parallel_objects(halo_projection_list, njobs=njobs, dynamic=dynamic):
             if halo is None:
                 continue
             # Check if region will overlap domain edge.
@@ -853,7 +862,7 @@
 
     @parallel_blocking_call
     def analyze_halo_spheres(self, analysis_function, halo_list='filtered',
-                             analysis_output_dir=None, njobs=-1):
+                             analysis_output_dir=None, njobs=-1, dynamic=False):
         r"""Perform custom analysis on all halos.
         
         This will loop through all halo on the HaloProfiler's list, 
@@ -880,6 +889,10 @@
             The number of jobs over which to split the analysis.  Set
             to -1 so that each halo is done by a single processor.
             Default: -1.
+        dynamic : bool
+            If True, distribute halos using a task queue.  If False,
+            distribute halos evenly over all jobs.
+            Default: False.
 
         Examples
         --------
@@ -915,7 +928,7 @@
                 my_output_dir = "%s/%s" % (self.pf.fullpath, analysis_output_dir)
             self.__check_directory(my_output_dir)
 
-        for halo in parallel_objects(halo_analysis_list, njobs=njobs):
+        for halo in parallel_objects(halo_analysis_list, njobs=njobs, dynamic=dynamic):
             if halo is None: continue
 
             # Get a sphere object to analze.


diff -r 17225c236e6afc77beb9f5620dbc560e6ee26834 -r efa0d8be8d6503222c750018d8545005ff8f0db8 yt/data_objects/time_series.py
--- a/yt/data_objects/time_series.py
+++ b/yt/data_objects/time_series.py
@@ -109,13 +109,14 @@
     def __len__(self):
         return len(self._pre_outputs)
 
-    def piter(self, storage = None):
+    def piter(self, storage = None, dynamic = False):
         if self.parallel == False:
             njobs = 1
         else:
             if self.parallel == True: njobs = -1
             else: njobs = self.parallel
-        return parallel_objects(self, njobs, storage)
+        return parallel_objects(self, njobs=njobs, storage=storage,
+                                dynamic=dynamic)
         
     def eval(self, tasks, obj=None):
         tasks = ensure_list(tasks)


diff -r 17225c236e6afc77beb9f5620dbc560e6ee26834 -r efa0d8be8d6503222c750018d8545005ff8f0db8 yt/utilities/parallel_tools/task_queue.py
--- a/yt/utilities/parallel_tools/task_queue.py
+++ b/yt/utilities/parallel_tools/task_queue.py
@@ -1,7 +1,7 @@
 """
 Task queue in yt
 
-Author: Britton Smith <matthewturk at gmail.com>
+Author: Britton Smith <brittonsmith at gmail.com>
 Affiliation: Michigan State University
 Author: Matthew Turk <matthewturk at gmail.com>
 Affiliation: Columbia University

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