[SciPy-dev] weave -- inline C/C++ in Python, an implementation

Fernando Pérez fperez at pizero.colorado.edu
Sat Jan 5 03:52:05 EST 2002


Hi Eric,

I'm pretty lost. Here's a summary:

- with the blitz stuff on, and the verbosity at 2, here's what I get:


No test suite found for  weave.sequence_spec
..
Expression: result[1:-1,1:-1] = (b[1:-1,1:-1] + b[2:,1:-1] + b[:-2,1:-1]+
b[1:-1,2:] + b[1:-1,:-2]) / 5.
Run: (10, 10) f
running build_ext
building 'sc_5599df30197fe981824ad8ec934a784e0' extension
gcc -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
-fno-strength-reduce -fPIC -I/usr/lib/python2.1/site-packages/weave
-I/usr/lib/python2.1/site-packages/weave/blitz-20001213
-I/usr/include/python2.1 -c
/usr/local/home/fperez/tmp/test_files/sc_5599df30197fe981824ad8ec934a784e0.cpp
-o
/usr/local/home/fperez/.python21_compiled/temp/sc_5599df30197fe981824ad8ec934a784e0.o
gcc -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
-fno-strength-reduce -fPIC -I/usr/lib/python2.1/site-packages/weave
-I/usr/lib/python2.1/site-packages/weave/blitz-20001213
-I/usr/include/python2.1 -c
/usr/lib/python2.1/site-packages/weave/CXX/IndirectPythonInterface.cxx -o
/usr/local/home/fperez/.python21_compiled/temp/IndirectPythonInterface.o
gcc -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
-fno-strength-reduce -fPIC -I/usr/lib/python2.1/site-packages/weave
-I/usr/lib/python2.1/site-packages/weave/blitz-20001213
-I/usr/include/python2.1 -c
/usr/lib/python2.1/site-packages/weave/CXX/cxxextensions.c -o
/usr/local/home/fperez/.python21_compiled/temp/cxxextensions.o
gcc -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
-fno-strength-reduce -fPIC -I/usr/lib/python2.1/site-packages/weave
-I/usr/lib/python2.1/site-packages/weave/blitz-20001213
-I/usr/include/python2.1 -c
/usr/lib/python2.1/site-packages/weave/CXX/cxxsupport.cxx -o
/usr/local/home/fperez/.python21_compiled/temp/cxxsupport.o
gcc -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
-fno-strength-reduce -fPIC -I/usr/lib/python2.1/site-packages/weave
-I/usr/lib/python2.1/site-packages/weave/blitz-20001213
-I/usr/include/python2.1 -c
/usr/lib/python2.1/site-packages/weave/CXX/cxx_extensions.cxx -o
/usr/local/home/fperez/.python21_compiled/temp/cxx_extensions.o
gcc -shared
/usr/local/home/fperez/.python21_compiled/temp/sc_5599df30197fe981824ad8ec934a784e0.o
/usr/local/home/fperez/.python21_compiled/temp/IndirectPythonInterface.o
/usr/local/home/fperez/.python21_compiled/temp/cxxextensions.o
/usr/local/home/fperez/.python21_compiled/temp/cxxsupport.o
/usr/local/home/fperez/.python21_compiled/temp/cxx_extensions.o -lstdc++ -o
/usr/local/home/fperez/tmp/test_files/sc_5599df30197fe981824ad8ec934a784e0.so
1st run(Numeric,compiled,speed up):  0.0011, 57.3475, 0.0000
2nd run(Numeric,compiled,speed up):  0.0011, 0.0048, 0.2251
Run: (50, 50) f
1st run(Numeric,compiled,speed up):  0.0014, 0.0050, 0.2753
2nd run(Numeric,compiled,speed up):  0.0014, 0.0050, 0.2870
Run: (100, 100) f
1st run(Numeric,compiled,speed up):  0.0026, 0.0058, 0.4457
2nd run(Numeric,compiled,speed up):  0.0026, 0.0059, 0.4471
Run: (500, 500) f
1st run(Numeric,compiled,speed up):  0.1011, 0.0268, 3.7749
2nd run(Numeric,compiled,speed up):  0.1007, 0.0265, 3.7987
Run: (1000, 1000) f
1st run(Numeric,compiled,speed up):  0.4165, 0.0969, 4.2990
2nd run(Numeric,compiled,speed up):  0.3538, 0.0899, 3.9337
Run: (10, 10) d
Abort

So the run craps out when first trying a double run (I think).

- Now, if I turn the blitz stuff off, things die almost at the same place:

No test suite found for  weave.sequence_spec
.......Abort

If you tell me where in the code this is happening, I can try to put some
informative statements to see what's going on. But I don't know the code and
could spend a week blind hunting there.

Let me know and I'll try to help.

Cheers,

f.




More information about the SciPy-Dev mailing list