<div dir="ltr">Hi Matt,<div><br></div><div>Ah, that solution seems obvious in hindsight - I didn't even think about the env vars.</div><div><br></div><div>I'll try what you suggest and see if I can track it down.</div>
<div><br></div><div>Chris</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 15, 2013 at 6:36 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 Chris,<br>
<div class="im"><br>
On Wed, Oct 16, 2013 at 10:32 AM, Chris Malone <<a href="mailto:chris.m.malone@gmail.com">chris.m.malone@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I'm trying to extract some data for a surface, but am getting a segfault in<br>
> the `YTSurfaceBase.get_data` method - probably the same thing as this [1] yt<br>
> issue.  I've tracked it down to the `FillTriangleValues` call in<br>
> `march_cubes_grid` with a combination of pdb and gdb.  I can't figure out<br>
> what is wrong, however, because all the variable values are optimized out.<br>
><br>
> So my question:  anyone know how to re-run setup.py and turn on debugging<br>
> flags for cython code?<br>
<br>
</div>Yup!  I have debugged this exact routine before, but thought I got all<br>
of the errors.  Here's what I do:<br>
<br>
Comment out all the @cython optimizers over top of the routine in question.<br>
export CFLAGS=-O0<br>
rebuild<br>
<br>
GDB then will have the comments and variables, and it will also have<br>
comments pointing at the line in question.  My recollection is that<br>
there was some problem with getting the triangles if you sampled<br>
without getting the samples first, so that may be the issue -- if you<br>
extract, try grabbing the field first before exporting.  Something<br>
like:<br>
<br>
surf = ...<br>
surf["Whatever"]<br>
surf.export_obj(...)<br>
<br>
I couldn't figure out why this was resulting in bad values, but I can<br>
also try to take a look this week.<br>
<br>
-Matt<br>
<div class="im"><br>
><br>
> I've found information about cygdb, which would probably be easier than<br>
> pdb+gdb.  Their documentation says to rebuild with the --pyrex-gdb flag to<br>
> setup.py, but that doesn't seem to be recognized by setuptools.  Other<br>
> webpages say to set the "-g" or "--cython-gdb" flags, but those also do not<br>
> work.<br>
><br>
> Chris<br>
><br>
><br>
> [1]<br>
> <a href="https://bitbucket.org/yt_analysis/yt/issue/633/vertices-not-correctly-created-in-surface" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/633/vertices-not-correctly-created-in-surface</a><br>
><br>
</div>> _______________________________________________<br>
> yt-dev mailing list<br>
> <a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
</blockquote></div><br></div>