[yt-svn] commit/yt: MatthewTurk: Removing calls to _grids, as we no longer need them.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Jan 27 11:32:03 PST 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/ff7f35e02f27/
Changeset:   ff7f35e02f27
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-01-27 17:52:18
Summary:     Removing calls to _grids, as we no longer need them.
Affected #:  1 file

diff -r 116d73abffcd948f4e167857420881c2c877200b -r ff7f35e02f27ad52f27a2fe0a9b912df9c4003d3 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
@@ -617,17 +617,6 @@
             mylog.info("Re-writing halo %d" % halo['id'])
             self._write_profile(profile, filename, format='%0.6e')
 
-        if newProfile:
-            # Temporary solution to memory leak.
-            for g in self.pf.h.grids:
-                g.clear_data()
-            sphere.clear_data()
-            del sphere
-            # Currently, this seems to be the only way to prevent large 
-            # halo profiling runs from running out of ram.
-            # It would be good to track down the real cause at some point.
-            gc.collect()
-
         return profile
 
     def _get_halo_sphere(self, halo):
@@ -637,7 +626,6 @@
         """
 
         sphere = self.pf.h.sphere(halo['center'], halo['r_max']/self.pf.units['mpc'])
-        #if len(sphere._grids) == 0: return None
         new_sphere = False
 
         if self.recenter:
@@ -663,11 +651,6 @@
             new_sphere = True
 
         if new_sphere:
-            # Temporary solution to memory leak.
-            for g in self.pf.h.grids:
-                g.clear_data()
-            sphere.clear_data()
-            del sphere
             sphere = self.pf.h.sphere(halo['center'], halo['r_max']/self.pf.units['mpc'])
 
         if self._need_bulk_velocity:

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