Richard,<div><br></div><div>Do you mind telling me the right way to compile stackless Python with STACKLESS_OFF defined? I tried but I was out of luck.</div><div><br></div><div>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 </div>
<div><br></div><div>#define STACKLESS</div><div>to</div><div>#define STACKLESS_OFF</div><div><br></div><div>When I compiled the code, I had error like:</div><div><br></div><div><div><i>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</i></div>
<div><i>Objects/descrobject.c: In function 'methoddescr_call':</i></div><div><i>Objects/descrobject.c:213:5: warning: variable 'stackless' set but not used [-Wunused-but-set-variable]</i></div><div><i>Objects/descrobject.c: In function 'classmethoddescr_call':</i></div>
<div><i>Objects/descrobject.c:261:5: warning: variable 'stackless' set but not used [-Wunused-but-set-variable]</i></div><div><i>Objects/descrobject.c: In function 'wrapperdescr_call':</i></div><div><i>Objects/descrobject.c:278:5: warning: variable 'stackless' set but not used [-Wunused-but-set-variable]</i></div>
<div><i>Objects/descrobject.c: At top level:</i></div><div><i>Objects/descrobject.c:486:14: error: static declaration of 'PyMemberDescr_Type' follows non-static declaration</i></div><div><i>Include/descrobject.h:79:26: note: previous declaration of 'PyMemberDescr_Type' was here</i></div>
<div><i>Objects/descrobject.c:526:14: error: static declaration of 'PyGetSetDescr_Type' follows non-static declaration</i></div><div><i>Include/descrobject.h:78:26: note: previous declaration of 'PyGetSetDescr_Type' was here</i></div>
<div><i>Objects/descrobject.c: In function 'wrapper_call':</i></div><div><i>Objects/descrobject.c:1012:5: warning: variable 'stackless' set but not used [-Wunused-but-set-variable]</i></div><div><i>make: *** [Objects/descrobject.o] Error 1</i></div>
<div><br></div><div>I have searched the error message in google and someone said that the problem could be solved by simply <span style="white-space:pre-wrap">getting rid of the "static" declaration in the source code. Does this make sense?</span></div>
<div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">Bin</span></div><br><div class="gmail_quote">On Sun, May 5, 2013 at 4:16 PM, Richard Tew <span dir="ltr"><<a href="mailto:richard.m.tew@gmail.com" target="_blank">richard.m.tew@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sun, May 5, 2013 at 2:57 PM, Bin Huang <<a href="mailto:bin.arthur@gmail.com">bin.arthur@gmail.com</a>> wrote:<br>

> I have observed slowdown when running Numpy with Stackless compared to<br>
> running it with CPython. The slowdown can be significant when problem size<br>
> is large. I wish someone in this mailing list can give me some hints on this<br>
> issue. I also post performance results and my source code here.<br>
><br>
> My platform is a 12-core dual-socket SMP machine running Ubuntu (Linux<br>
> kernel 3.2.0). On this platform, I have CPython 2.7.3, Numpy 1.6.1, and<br>
> Stackless Python 2.7.2 installed.<br>
</div>> ...<br>
<div class="im">> Any ideas? Thanks in advance.<br>
<br>
</div>As it stands, you have tested with different versions of Python and<br>
Stackless, and both should be using different lib directories.  There<br>
are too many variables, where the problem may lie with your<br>
installations.  Or perhaps whatever packages you sourced them from.<br>
<br>
This can be easily tested.  If you compile Stackless Python with<br>
STACKLESS_OFF defined, it should compile as normal Python of the same<br>
version (e.g. 2.7.2 or 2.7.3).<br>
<br>
So do the following:<br>
1) Obtain the source code for Stackless Python 2.7.2 tarball release,<br>
compile it, install numpy local to it and execute your test.<br>
2) Then take the same source code in a different directory, compile it<br>
with STACKLESS_OFF defined (which should compile to just normal Python<br>
of the same version), install numpy local to it and execute your test.<br>
<br>
And if you really want to be certain that things line up:<br>
3) Obtain the source code for official Python 2.7.2 tarball release.<br>
Repeat the test process.<br>
<br>
All should be the same.  If Stackless differs as shown in your tests,<br>
then the problem undeniably lies with Stackless.<br>
<br>
Hope this helps,<br>
Richard.<br>
<br>
_______________________________________________<br>
Stackless mailing list<br>
<a href="mailto:Stackless@stackless.com">Stackless@stackless.com</a><br>
<a href="http://www.stackless.com/mailman/listinfo/stackless" target="_blank">http://www.stackless.com/mailman/listinfo/stackless</a><br>
</blockquote></div><br></div>