[yt-users] Issue with hierarchy stats

Jean-Claude Passy jcpassy at gmail.com
Mon Aug 29 14:11:01 PDT 2011


Hi Matt,

unfortunately, it did not work. I am enclosing my very basic parameter 
file in case you want to give it a try,

Thanks,

JC

On 29/08/11 16:37, Matthew Turk wrote:
> 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
>>
>>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-------------- next part --------------
#
# AMR PROBLEM DEFINITION FILE: Orbit Test Problem
#
#  define problem
#
ProblemType            = 29      // orbit test
TopGridRank            = 3
TopGridDimensions      = 32 32 32
SelfGravity            = 1       // gravity on
TopGridGravityBoundary = 1       // Isolated BCs
#GravitySolverType      = 1
#
#  set problem parameters
#
TestOrbitRadius      = 0.3    //0.27212
TestOrbitCentralMass = 1.0    //1.6666
TestOrbitTestMass    = 1.0e-6 //0.08333
#
#  Set Units
#
GravitationalConstant  = 1.241765e8 // 6.67e-8 * (4*pi) * DensityUnits * TimeUnits**2
#MassUnits    = 1.1940e33  
#DensityUnits = 1.4925e-1   // MassUnits/LengthUnits**3
#LengthUnits  = 2.0e11      // Changed from 1.0e14 to 1.0e11 for polytrop
#TimeUnits    = 3.15e7      // 1 year
#
#  set I/O and stop/start parameters
#
StopTime                = 1e-3 //2.0e30
CycleSkipDataDump      = 5
#dtDataDump             = 1e-4
ParticleCourantSafetyNumber = 0.4
#Initialdt = 4e-7
#
#  set grid refinement parameters
#
StaticHierarchy           = 0    // dynamic hierarchy
StaticRefineRegionLevel[0] = 0
StaticRefineRegionLeftEdge[0] = 0.4 0.4 0.4
StaticRefineRegionRightEdge[0] = 0.6 0.6 0.6
MaximumRefinementLevel    = 2    // use up to this many extra levels
RefineBy                  = 2    // refinement factor
CellFlaggingMethod        = 4
#MinimumMassForRefinement = 0.1
#RefineRegionLeftEdge      = 0.4375 0.4375 0.4375
#RefineRegionRightEdge     = 0.5625 0.5625 0.5625
#RefineRegionLeftEdge      = 0.1 0.1 0.1
#RefineRegionRightEdge     = 0.9 0.9 0.9
MinimumEfficiency      = 0.8
#
#  set some global parametersß
#
tiny_number            = 1.0e-10 // fixes velocity slope problem
S2ParticleSize         = 3.2


More information about the yt-users mailing list