[yt-users] Issue with hierarchy stats

Matthew Turk matthewturk at gmail.com
Mon Aug 29 13:37:26 PDT 2011


Hi JC,

This is a silly question, but have you tried with removing the .yt
file?  They can collide if you re-run and get a different grid
structure between outputs but you don't wipe your directory.  Often
this can occur if you are running on multiple processors.

(If that's it, adding a system to invalidate based on the ._hash() of
the parameter file would prevent problems like this...  would be a
good introductory project...)

Let me know if that fixes it,

-Matt

On Mon, Aug 29, 2011 at 4:39 PM, Jean-Claude Passy <jcpassy at gmail.com> wrote:
> Hi all,
>
> I am running a modified TestOrbit problem. If I try to look at the hierarchy
> of the first dump, everything is working just fine:
>
> ---------------------------------------------------------------------------------------------------------------------
> In [32]: filen1 = 'DD0000/data0000'
> In [33]: pf1 = load(filen1) yt : [INFO     ] 2011-08-29 13:26:58,698
> Parameters: current_time              = 0 yt : [INFO     ] 2011-08-29
> 13:26:58,698 Parameters: domain_dimensions         = [32 32 32] yt :
> [INFO     ] 2011-08-29 13:26:58,698 Parameters: domain_left_edge          =
> [0 0 0] yt : [INFO     ] 2011-08-29 13:26:58,698 Parameters:
> domain_right_edge         = [1 1 1] yt : [INFO     ] 2011-08-29 13:26:58,698
> Parameters: cosmological_simulation   = 0.0
> In [34]: pf1.h.print_stats() level   # grids     # cells
> ---------------------------   0          1        32768
> ----------------------------              1        32768
> t = 0.00000000e+00 = 0.00000000e+00 s = 0.00000000e+00 years
> Smallest Cell:         Width: 1.013e-26 mpc blablabla....
> ---------------------------------------------------------------------------------------------------------------------
>
>
>
> However, if I try to do the same for a later dump:
>
> ---------------------------------------------------------------------------------------------------------------------
> In [40]: filen1 = 'DD0001/data0001'
> In [41]: pf1 = load(filen1) yt : [INFO     ] 2011-08-29 13:29:56,004
> Parameters: current_time              = 0.0001000089999 yt : [INFO     ]
> 2011-08-29 13:29:56,004 Parameters: domain_dimensions         = [32 32 32]
> yt : [INFO     ] 2011-08-29 13:29:56,004 Parameters:
> domain_left_edge          = [0 0 0] yt : [INFO     ] 2011-08-29 13:29:56,004
> Parameters: domain_right_edge         = [1 1 1] yt : [INFO     ] 2011-08-29
> 13:29:56,004 Parameters: cosmological_simulation   = 0.0
> In [42]: pf1.h.print_stats()
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call last)
> /rpod2/jcpassy/yt-x86_64/src/yt-hg/scripts/iyt in <module>() ----> 1       2
>       3       4       5
> /rpod2/jcpassy/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py in
> hierarchy(self)     167                 raise RuntimeError("You should not
> instantiate StaticOutput.")     168             self._instantiated_hierarchy
> = self._hierarchy_class( --> 169                 self,
> data_style=self.data_style)     170         return
> self._instantiated_hierarchy     171     h = hierarchy  # alias
> /rpod2/jcpassy/yt-x86_64/src/yt-hg/yt/frontends/enzo/data_structures.py in
> __init__(self, pf, data_style)     160             self.float_type =
> 'float64'     161 --> 162         AMRHierarchy.__init__(self, pf,
> data_style)     163         # sync it back
>     164         self.parameter_file.data_style = self.data_style
> /rpod2/jcpassy/yt-x86_64/src/yt-hg/yt/data_objects/hierarchy.py in
> __init__(self, pf, data_style)      58      59         mylog.debug("Counting
> grids.") ---> 60         self._count_grids()      61      62         # Must
> be defined in subclass
> /rpod2/jcpassy/yt-x86_64/src/yt-hg/yt/frontends/enzo/data_structures.py in
> _count_grids(self)     182                 self.num_grids = test_grid_id =
> int(line.split("=")[-1])     183                 break --> 184
> self._guess_data_style(self.pf.dimensionality, test_grid, test_grid_id)
> 185     186     def _guess_data_style(self, rank, test_grid, test_grid_id):
> /rpod2/jcpassy/yt-x86_64/src/yt-hg/yt/frontends/enzo/data_structures.py in
> _guess_data_style(self, rank, test_grid, test_grid_id)     185     186
> def _guess_data_style(self, rank, test_grid, test_grid_id): --> 187
> if test_grid[0] != os.path.sep:     188             test_grid =
> os.path.join(self.directory, test_grid)     189         if not
> os.path.exists(test_grid):
> TypeError: 'NoneType' object is not subscriptable
> ---------------------------------------------------------------------------------------------------------------------
>
> Could someone help me to fix this ?
>
> Thanks a lot,
>
>
> JC
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>



More information about the yt-users mailing list