[Yt-svn] yt-commit r725 - in branches/parallel_profiles/yt: . lagos

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Aug 7 22:08:58 PDT 2008


Author: mturk
Date: Thu Aug  7 22:08:57 2008
New Revision: 725
URL: http://yt.spacepope.org/changeset/725

Log:
Moved around parallel_tools, modifying projections as setup for automated
parallelization...



Added:
   branches/parallel_profiles/yt/lagos/ParallelTools.py
      - copied unchanged from r724, /branches/parallel_profiles/yt/parallel_tools.py
Removed:
   branches/parallel_profiles/yt/parallel_tools.py
Modified:
   branches/parallel_profiles/yt/lagos/BaseDataTypes.py
   branches/parallel_profiles/yt/lagos/EnzoDefs.py
   branches/parallel_profiles/yt/lagos/HierarchyType.py
   branches/parallel_profiles/yt/lagos/Profiles.py
   branches/parallel_profiles/yt/lagos/__init__.py

Modified: branches/parallel_profiles/yt/lagos/BaseDataTypes.py
==============================================================================
--- branches/parallel_profiles/yt/lagos/BaseDataTypes.py	(original)
+++ branches/parallel_profiles/yt/lagos/BaseDataTypes.py	Thu Aug  7 22:08:57 2008
@@ -706,7 +706,7 @@
         if use_child_mask: k = (k & grid.child_mask)
         return na.where(k)
 
-class EnzoProjBase(Enzo2DData):
+class EnzoProjBase(Enzo2DData, ParallelAnalysisInterface):
     _key_fields = ['px','py','pdx','pdy']
     def __init__(self, axis, field, weight_field = None,
                  max_level = None, center = None, pf = None,
@@ -819,6 +819,8 @@
 
     def __project_level(self, level, fields):
         grids_to_project = self.source.select_grids(level)
+        self.hierarchy.queue.preload(grids_to_project,
+                                     self._get_dependencies(fields))
         dls, convs = self.__get_dls(grids_to_project[0], fields)
         zero_out = (level != self._max_level)
         pbar = get_pbar('Projecting  level % 2i / % 2i ' \
@@ -830,6 +832,7 @@
             for fi in range(len(fields)): g_fields[fi] *= dls[fi]
             if self._weight is not None: g_coords[3] *= dls[-1]
             pbar.update(pi)
+            grid.clear_data()
         pbar.finish()
         self.__combine_grids_on_level(level) # In-place
         if level > 0 and level <= self._max_level:

Modified: branches/parallel_profiles/yt/lagos/EnzoDefs.py
==============================================================================
--- branches/parallel_profiles/yt/lagos/EnzoDefs.py	(original)
+++ branches/parallel_profiles/yt/lagos/EnzoDefs.py	Thu Aug  7 22:08:57 2008
@@ -69,6 +69,7 @@
                  "CurrentTimeIdentifier": int,
                  "BoundaryConditionName": str,
                  "TopGridRank": int,
+                 "TopGridDimensions": int,
                 }
 
 mpc_conversion = {'mpc'   : 1e0,

Modified: branches/parallel_profiles/yt/lagos/HierarchyType.py
==============================================================================
--- branches/parallel_profiles/yt/lagos/HierarchyType.py	(original)
+++ branches/parallel_profiles/yt/lagos/HierarchyType.py	Thu Aug  7 22:08:57 2008
@@ -492,6 +492,7 @@
                 gf = grid.getFields()
                 mylog.debug("Grid %s has: %s", grid.id, gf)
                 field_list = field_list.union(sets.Set(gf))
+            self.save_data(list(field_list),"/","DataFields")
         self.field_list = list(field_list)
         for field in self.field_list:
             if field in fieldInfo: continue

Modified: branches/parallel_profiles/yt/lagos/Profiles.py
==============================================================================
--- branches/parallel_profiles/yt/lagos/Profiles.py	(original)
+++ branches/parallel_profiles/yt/lagos/Profiles.py	Thu Aug  7 22:08:57 2008
@@ -56,10 +56,8 @@
         self._lazy_reader = lazy_reader
 
     def _get_dependencies(self, fields):
-        deps = []
-        for field in fields + self._get_bin_fields(): 
-            deps += fieldInfo[field].get_dependencies().requested
-        return list(set(deps))
+        return ParallelAnalysisInterface._get_dependencies(
+                    fields + self._get_bin_fields())
 
     def _initialize_parallel(self, fields):
         if hasattr(self._data_source.hierarchy, 'queue'):

Modified: branches/parallel_profiles/yt/lagos/__init__.py
==============================================================================
--- branches/parallel_profiles/yt/lagos/__init__.py	(original)
+++ branches/parallel_profiles/yt/lagos/__init__.py	Thu Aug  7 22:08:57 2008
@@ -28,7 +28,6 @@
 
 from yt.config import ytcfg
 from yt.logger import lagosLogger as mylog
-from yt.parallel_tools import *
 
 try:
     from pyhdf_np import SD # NumPy
@@ -77,6 +76,7 @@
 from EnzoDefs import *
 from DerivedFields import *
 from DerivedQuantities import DerivedQuantityCollection, GridChildMaskWrapper
+from ParallelTools import *
 from DataReadingFuncs import *
 from ClusterFiles import *
 from ContourFinder import *



More information about the yt-svn mailing list