[yt-dev] cython debugging?

Chris Malone chris.m.malone at gmail.com
Tue Oct 15 18:56:20 PDT 2013


Hi Matt,

Yep, after it wasn't working on my large dataset, I tried it out on
DD0010/moving7_0010 and it fails: http://paste.yt-project.org/show/3948/

Chris


On Tue, Oct 15, 2013 at 6:42 PM, Matthew Turk <matthewturk at gmail.com> wrote:

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


More information about the yt-dev mailing list