<div dir="ltr">HI all,<div><br></div><div>Nathan and Matt were both right about the cause of the issue, which was that the integer arrays containing the absolute indices were only 32 bit.  This was being exceeded for this rather deep hierarchy.  I have issued a pull request that fixes this, which you can see here: <a href="https://bitbucket.org/yt_analysis/yt/pull-request/713/changing-index-arrays-from-int32-to-int64/diff">https://bitbucket.org/yt_analysis/yt/pull-request/713/changing-index-arrays-from-int32-to-int64/diff</a></div>
<div><br></div><div>Matt and Nathan, thanks again for pointing me in the right direction.  Please enjoy a very preliminary piece of fruit of this labor: <a href="http://i.imgur.com/PeCBjRS.png">http://i.imgur.com/PeCBjRS.png</a></div>
<div><br></div><div>Britton</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 27, 2014 at 7:55 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Britton,<br>
<div class=""><br>
On Thu, Feb 27, 2014 at 12:24 PM, Britton Smith <<a href="mailto:brittonsmith@gmail.com">brittonsmith@gmail.com</a>> wrote:<br>
> Hi Nathan, Matt,<br>
><br>
> I'm working on getting some more debugging information with your<br>
> suggestions.  So far, I've been able to track it to the loop inside<br>
> QuadTree.initialize_chunk.  This appears to loop over all the points within<br>
> the chunk, calling add_to_position for each point.  The loop looks like<br>
> this:<br>
><br>
>         for p in range(num):<br>
>             pos[0] = pxs[p]<br>
>             pos[1] = pys[p]<br>
>             self.add_to_position(level[p], pos, NULL, 0.0, 1)<br>
><br>
> If I print the values of p, level[p], pos[0], pos[1] inside this loop, I see<br>
> the following (with a few extra lines leading up):<br>
><br>
> 1893689 22 1148578047 1106259970<br>
> 1893690 22 1148578047 1106259971<br>
> 1893691 22 1148578047 1106259972<br>
> 1893692 22 1148578047 1106259973<br>
> 1893693 22 1148578047 1106259979<br>
> 1893694 23 -1997811214 -2082447348<br>
><br>
> So, somehow, starting on level 23, the x and y positions are messed up in<br>
> some way.  Is this a precision issue?  How are these positions calculated?<br>
<br>
</div>Yeah, this looks like the problem.  These positions are computed by doing:<br>
<br>
cell_integer_index + grid.get_global_index()<br>
<br>
If you're on 3.0, this is all done implicitly inside icoords.  One way<br>
to avoid the segfault and determine the specific place it fails is to<br>
go into grid_object.py and inside icoords, assert that the values are<br>
all positive -- no matter the domain, this is always the case.  If<br>
you're using octrees, this would go into octree_subset.py.<br>
<br>
It may be that you're on a machine where the default int is 32 rather<br>
than 64, and there is a careless assumption of this somewhere.  If you<br>
try on a different machine it might work.  That would help track all<br>
of this down.<br>
<br>
-Matt<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Britton<br>
><br>
><br>
> On Thu, Feb 27, 2014 at 5:54 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi Britton,<br>
>><br>
>> On my machine it will tell me line numbers in the .C file if a crash<br>
>> happens inside a .so file, even if it's called from python.  I'm not sure<br>
>> how to get that information on your system without knowing more about your<br>
>> setup.<br>
>><br>
>> PDB doesn't know about C extensions so that won't be helpful<br>
>> unfortunately.<br>
>><br>
>> If you're running serially you should be able to run python under gdb and<br>
>> get a traceback that way.  I'm not sure how to do that for parallel runs.<br>
>><br>
>> This page might be helpful:<br>
>> <a href="http://docs.cython.org/src/userguide/debugging.html" target="_blank">http://docs.cython.org/src/userguide/debugging.html</a><br>
>><br>
>> Nathan<br>
>><br>
>> On Thursday, February 27, 2014, Britton Smith <<a href="mailto:brittonsmith@gmail.com">brittonsmith@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Hi Nathan,<br>
>>><br>
>>> I'm having a hard time getting a traceback that goes into the QuadTree<br>
>>> source.  The seg fault I get stops at QuadTree.so.  Is there a way to<br>
>>> recompile this in debug mode to get some more information?  It doesn't look<br>
>>> like pdb is able to step into QuadTree either.<br>
>>><br>
>>> Britton<br>
>>><br>
>>><br>
>>> On Thu, Feb 27, 2014 at 5:22 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> Hi Britton,<br>
>>>><br>
>>>> Can you get a traceback from the seg fault?  It would help to see the<br>
>>>> line number in the autogenerated QuadTree.c where the crash happens.<br>
>>>> Autogenerated C files produced by cython reproduce the original .pyx files<br>
>>>> line by line as comments so it's usually pretty easy to back out where the<br>
>>>> crash is happening in the original Pyrex file.<br>
>>>><br>
>>>> Nathan<br>
>>>><br>
>>>><br>
>>>> On Thursday, February 27, 2014, Britton Smith <<a href="mailto:brittonsmith@gmail.com">brittonsmith@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Hi all,<br>
>>>>><br>
>>>>> I'm trying to make projections of a rather large Enzo dataset and<br>
>>>>> getting a segfault somewhere in Quadtree.so.  This dataset is ~230 GB in<br>
>>>>> size with 27 levels of AMR.  As far as I can tell, the only hard coded limit<br>
>>>>> I could find in QuadTree.pyx is for 80 levels, which I am clearly below.<br>
>>>>> Does anyone familiar with this part of the code have any idea if there are<br>
>>>>> any other hard-coded limits in here that I might be exceeding?  If not, does<br>
>>>>> anyone have any advice for how I might debug this?  I'm seeing this behavior<br>
>>>>> in both yt-2.x and yt-3.0, so it does seem to be something intrinsic to the<br>
>>>>> quadtree code.<br>
>>>>><br>
>>>>> Thanks!<br>
>>>>> Britton<br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> yt-users mailing list<br>
>>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>>><br>
>>><br>
>><br>
>> _______________________________________________<br>
>> yt-users mailing list<br>
>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</div></div></blockquote></div><br></div>