[Yt-svn] yt: 2 new changesets

hg at spacepope.org hg at spacepope.org
Mon Feb 14 13:52:28 PST 2011


hg Repository: yt
details:   yt/rev/259c6242f6dd
changeset: 3740:259c6242f6dd
user:      Sam Skillman <sam.skillman at gmail.com>
date:
Mon Feb 14 14:51:32 2011 -0700
description:
Slightly better logic.

hg Repository: yt
details:   yt/rev/d8f67aaa2e0d
changeset: 3741:d8f67aaa2e0d
user:      Sam Skillman <sam.skillman at gmail.com>
date:
Mon Feb 14 14:52:00 2011 -0700
description:
Merge.

diffstat:

 yt/frontends/enzo/io.py                                    |   4 +++-
 yt/utilities/amr_kdtree/amr_kdtree.py                      |  12 ++++++------
 yt/utilities/parallel_tools/parallel_analysis_interface.py |   6 ++++--
 3 files changed, 13 insertions(+), 9 deletions(-)

diffs (66 lines):

diff -r ae93f5315ae1 -r d8f67aaa2e0d yt/frontends/enzo/io.py
--- a/yt/frontends/enzo/io.py	Mon Feb 14 13:13:48 2011 -0700
+++ b/yt/frontends/enzo/io.py	Mon Feb 14 14:52:00 2011 -0700
@@ -209,7 +209,9 @@
         BaseIOHandler.__init__(self)
 
     def _read_data_set(self, grid, field):
-        if grid.id not in self.grids_in_memory: raise KeyError
+        if grid.id not in self.grids_in_memory:
+            mylog.error("Was asked for %s but I have %s", grid.id, self.grids_in_memory.keys())
+            raise KeyError
         tr = self.grids_in_memory[grid.id][field]
         # If it's particles, we copy.
         if len(tr.shape) == 1: return tr.copy()
diff -r ae93f5315ae1 -r d8f67aaa2e0d yt/utilities/amr_kdtree/amr_kdtree.py
--- a/yt/utilities/amr_kdtree/amr_kdtree.py	Mon Feb 14 13:13:48 2011 -0700
+++ b/yt/utilities/amr_kdtree/amr_kdtree.py	Mon Feb 14 14:52:00 2011 -0700
@@ -338,9 +338,9 @@
         boolean: True if overlap is found, False otherwise.
         
         """
-        if ((le[0] < brick['r_corner'][0]) and (re[0] > brick['l_corner'][0]) and 
-            (le[1] < brick['r_corner'][1]) and (re[1] > brick['l_corner'][1]) and 
-            (le[2] < brick['r_corner'][2]) and (re[2] > brick['l_corner'][2])):
+        if (le[0] < brick['r_corner'][0]) and (re[0] > brick['l_corner'][0]) and \
+               (le[1] < brick['r_corner'][1]) and (re[1] > brick['l_corner'][1]) and \
+               (le[2] < brick['r_corner'][2]) and (re[2] > brick['l_corner'][2]):
             return True
 
         if periodic:
@@ -355,9 +355,9 @@
                     myle[i] -= w[i]
                     myre[i] -= w[i]
                     
-            if ((myle[0] < brick['r_corner'][0]) and (myre[0] > brick['l_corner'][0]) and 
-                (myle[1] < brick['r_corner'][1]) and (myre[1] > brick['l_corner'][1]) and 
-                (myle[2] < brick['r_corner'][2]) and (myre[2] > brick['l_corner'][2])):
+            if (myle[0] < brick['r_corner'][0]) and (myre[0] > brick['l_corner'][0]) and \
+                   (myle[1] < brick['r_corner'][1]) and (myre[1] > brick['l_corner'][1]) and \
+                   (myle[2] < brick['r_corner'][2]) and (myre[2] > brick['l_corner'][2]):
                 return True
                 
         return False
diff -r ae93f5315ae1 -r d8f67aaa2e0d yt/utilities/parallel_tools/parallel_analysis_interface.py
--- a/yt/utilities/parallel_tools/parallel_analysis_interface.py	Mon Feb 14 13:13:48 2011 -0700
+++ b/yt/utilities/parallel_tools/parallel_analysis_interface.py	Mon Feb 14 14:52:00 2011 -0700
@@ -52,7 +52,9 @@
         ytcfg["yt","__parallel_rank"] = str(MPI.COMM_WORLD.rank)
         ytcfg["yt","__parallel_size"] = str(MPI.COMM_WORLD.size)
         ytcfg["yt","__parallel"] = "True"
-        if exe_name == "embed_enzo": ytcfg["yt","inline"] = "True"
+        if exe_name == "embed_enzo" or \
+            ("_parallel" in dir(sys) and sys._parallel == True):
+            ytcfg["yt","inline"] = "True"
         # I believe we do not need to turn this off manually
         #ytcfg["yt","StoreParameterFiles"] = "False"
         # Now let's make sure we have the right options set.
@@ -333,7 +335,7 @@
         else:
             subvol = True
         if not self._distributed and not subvol:
-           return False, LE, RE, ds
+            return False, LE, RE, ds
         if not self._distributed and subvol:
             return True, LE, RE, \
             self.hierarchy.periodic_region_strict(self.center,



More information about the yt-svn mailing list