[Stackless] Slowdown when running Numpy with Stackless?

Richard Tew richard.m.tew at gmail.com
Tue May 7 05:07:43 CEST 2013


On Tue, May 7, 2013 at 2:40 PM, Bin Huang <bin.arthur at gmail.com> wrote:
> Do you mind telling me the right way to compile stackless Python with
> STACKLESS_OFF defined? I tried but I was out of luck.

Find a variable you can overload in the Makefile and set it as you execute make:

make EXTRA_CFLAGS=-DSTACKLESS_OFF

Might work.

> Here is what I did. I downloaded Stackless Python 2.7.2 tar ball and made
> sure I had a fresh start. Then I modified Stackless/stackless.h and changed
> it from
>
> #define STACKLESS
> to
> #define STACKLESS_OFF

That's what I do when I compile in Visual Studio :-)  Easier in that
case for a temporary change.

> When I compiled the code, I had error like:
>
> gcc -pthread -c -fno-strict-aliasing -DSTACKLESS_FRHACK=0 -g -O2 -DNDEBUG -g
> -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include
> -I./Stackless   -DPy_BUILD_CORE -o Objects/descrobject.o
> Objects/descrobject.c
> Objects/descrobject.c: In function 'methoddescr_call':
> Objects/descrobject.c:213:5: warning: variable 'stackless' set but not used
> [-Wunused-but-set-variable]
> Objects/descrobject.c: In function 'classmethoddescr_call':
> Objects/descrobject.c:261:5: warning: variable 'stackless' set but not used
> [-Wunused-but-set-variable]
> Objects/descrobject.c: In function 'wrapperdescr_call':
> Objects/descrobject.c:278:5: warning: variable 'stackless' set but not used
> [-Wunused-but-set-variable]
> Objects/descrobject.c: At top level:
> Objects/descrobject.c:486:14: error: static declaration of
> 'PyMemberDescr_Type' follows non-static declaration
> Include/descrobject.h:79:26: note: previous declaration of
> 'PyMemberDescr_Type' was here
> Objects/descrobject.c:526:14: error: static declaration of
> 'PyGetSetDescr_Type' follows non-static declaration
> Include/descrobject.h:78:26: note: previous declaration of
> 'PyGetSetDescr_Type' was here
> Objects/descrobject.c: In function 'wrapper_call':
> Objects/descrobject.c:1012:5: warning: variable 'stackless' set but not used
> [-Wunused-but-set-variable]
> make: *** [Objects/descrobject.o] Error 1
>
> I have searched the error message in google and someone said that the
> problem could be solved by simply getting rid of the "static" declaration in
> the source code. Does this make sense?

This looks like fallout from merging.  It might even be my fault, as I
probably made that tarball.  I'll look into it later, unless someone
else jumps in and gets it before me.

Cheers,
Richard.



More information about the Stackless mailing list