[SciPy-dev] Weave checkins

eric jones eric at enthought.com
Fri Oct 11 22:39:31 CDT 2002


Hey Pearu,

All of weave passes on our RedHat 8.0 box with gcc 3.2 except for the
blitz stuff, and it looks like the blitz problem is only with complex
numbers.  

I've attached the traceback below in case anyone can make sense of the
compiler error message.  It basically boils down to this: 

  /blitz/ops.h: In static member function `static   
     blitz::promote_trait<T1_orig, T2_orig>::T_promote  
        blitz::Divide<T_numtype1, T_numtype2>::apply(T_numtype1,....
        <snip>

  sc_f951e2d4a9b0e08d923fe6c17a9778ae2.cpp:699:   instantiated from here
  /blitz/ops.h:220: no match for `std::complex<float>& / double&'
operator

It looks like there is some issue with the binary op templates in op.h
or type promotion templates in promote.h when it comes to complex
numbers.  I'll post to the blitz support list and see if they have a
fix.

Travis 0., do you still get all the failures on Mandrake?

Thanks,
eric

----------------------------------------------------------------------
[eric at ip192-168-1-136 weave]$ python -c "import weave;weave.test()"
No test suite found for  weave.accelerate_tools
 creating test suite for: weave.ast_tools
No test suite found for  weave.base_info
No test suite found for  weave.base_spec
No test suite found for  weave.blitz_spec
 creating test suite for: weave.blitz_tools
 creating test suite for: weave.build_tools
No test suite found for  weave.bytecodecompiler
 creating test suite for: weave.c_spec
 creating test suite for: weave.catalog
No test suite found for  weave.common_info
No test suite found for  weave.converters
No test suite found for  weave.dumb_shelve
No test suite found for  weave.dumbdbm_patched
 creating test suite for: weave.ext_tools
building extensions here: /home/eric/.python22_compiled/69320
building extensions here: /home/eric/.python22_compiled/69321
 creating test suite for: weave.inline_tools
 creating test suite for: weave.size_check
 creating test suite for: weave.slice_handler
 creating test suite for: weave.standard_array_spec
No test suite found for  weave.vtk_spec
No test suite found for  weave.wx_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
1st run(Numeric,compiled,speed up):  0.0014, 19.9448, 0.0001
2nd run(Numeric,compiled,speed up):  0.0012, 0.0054, 0.2287
Run: (50, 50) f
1st run(Numeric,compiled,speed up):  0.0015, 0.0055, 0.2783
2nd run(Numeric,compiled,speed up):  0.0016, 0.0055, 0.2875
Run: (100, 100) f
1st run(Numeric,compiled,speed up):  0.0029, 0.0060, 0.4819
2nd run(Numeric,compiled,speed up):  0.0029, 0.0060, 0.4832
Run: (500, 500) f
1st run(Numeric,compiled,speed up):  0.0822, 0.0284, 2.8985
2nd run(Numeric,compiled,speed up):  0.0779, 0.0290, 2.6866
Run: (1000, 1000) f
1st run(Numeric,compiled,speed up):  0.3111, 0.0943, 3.2996
2nd run(Numeric,compiled,speed up):  0.3110, 0.0959, 3.2419
Run: (10, 10) d
1st run(Numeric,compiled,speed up):  0.0014, 17.1779, 0.0001
2nd run(Numeric,compiled,speed up):  0.0013, 0.0054, 0.2374
Run: (50, 50) d
1st run(Numeric,compiled,speed up):  0.0020, 0.0059, 0.3380
2nd run(Numeric,compiled,speed up):  0.0020, 0.0057, 0.3481
Run: (100, 100) d
1st run(Numeric,compiled,speed up):  0.0072, 0.0062, 1.1604
2nd run(Numeric,compiled,speed up):  0.0070, 0.0062, 1.1389
Run: (500, 500) d
1st run(Numeric,compiled,speed up):  0.1939, 0.0336, 5.7638
2nd run(Numeric,compiled,speed up):  0.1948, 0.0355, 5.4826
Run: (1000, 1000) d
1st run(Numeric,compiled,speed up):  0.9406, 0.1066, 8.8223
2nd run(Numeric,compiled,speed up):  0.7744, 0.1066, 7.2665
Run: (10, 10) F
/home/eric/lib/python2.2/site-packages/weave/blitz-20001213/blitz/ops.h:
In
   static member function `static blitz::promote_trait<T1_orig,
   T2_orig>::T_promote blitz::Divide<T_numtype1,
T_numtype2>::apply(T_numtype1,

   T_numtype2) [with T_numtype1 = std::complex<float>, T_numtype2 =
double]':
/home/eric/lib/python2.2/site-packages/weave/blitz-20001213/blitz/array/
expr.h:4
45:   instantiated from `P_op::T_numtype blitz::_bz_ArrayExprOp<P_expr1,
P_expr2
, P_op>::operator()(const blitz::TinyVector<int, N_rank>&) [with int
N_rank = 2,
 P_expr1 =
blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprOp<blitz::_bz_ArrayExpr<blit
z::_bz_ArrayExprOp<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprOp<blitz::_b
z_ArrayE
xpr<blitz::_bz_ArrayExprOp<blitz::FastArrayIterator<std::complex<float>,
2>, bli
tz::FastArrayIterator<std::complex<float>, 2>,
blitz::Add<std::complex<float>, s
td::complex<float> > > >, blitz::FastArrayIterator<std::complex<float>,
2>, blit
z::Add<std::complex<float>, std::complex<float> > > >,
blitz::FastArrayIterator<
std::complex<float>, 2>, blitz::Add<std::complex<float>,
std::complex<float> > >
 >, blitz::FastArrayIterator<std::complex<float>, 2>,
blitz::Add<std::complex<fl
oat>, std::complex<float> > > >, P_expr2 =
blitz::_bz_ArrayExprConstant<double>,
 P_op = blitz::Divide<std::complex<float>, double>]'
/home/eric/lib/python2.2/site-packages/weave/blitz-20001213/blitz/array/
expr.h:2
35:   instantiated from `P_expr::T_numtype
blitz::_bz_ArrayExpr<P_expr>::operato
r()(const blitz::TinyVector<int, N_rank>&) [with int N_rank = 2, P_expr
= blitz:
:_bz_ArrayExprOp<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprOp<blitz::_bz_
ArrayExp
r<blitz::_bz_ArrayExprOp<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprOp<bli
tz::_bz_
ArrayExpr<blitz::_bz_ArrayExprOp<blitz::FastArrayIterator<std::complex<f
loat>, 2
>, blitz::FastArrayIterator<std::complex<float>, 2>,
blitz::Add<std::complex<flo
at>, std::complex<float> > > >,
blitz::FastArrayIterator<std::complex<float>, 2>
, blitz::Add<std::complex<float>, std::complex<float> > > >,
blitz::FastArrayIte
rator<std::complex<float>, 2>, blitz::Add<std::complex<float>,
std::complex<floa
t> > > >, blitz::FastArrayIterator<std::complex<float>, 2>,
blitz::Add<std::comp
lex<float>, std::complex<float> > > >,
blitz::_bz_ArrayExprConstant<double>, bli
tz::Divide<std::complex<float>, double> >]'
/home/eric/lib/python2.2/site-packages/weave/blitz-20001213/blitz/array/
eval.cc:
758:   instantiated from `blitz::Array<T, N>& blitz::Array<T,
N>::evaluateWithIn
dexTraversal1(T_expr, T_update) [with T_expr =
blitz::_bz_ArrayExpr<blitz::_bz_A
rrayExprOp<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprOp<blitz::_bz_ArrayE
xpr<blit
z::_bz_ArrayExprOp<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprOp<blitz::_b
z_ArrayE
xpr<blitz::_bz_ArrayExprOp<blitz::FastArrayIterator<std::complex<float>,
2>, bli
tz::FastArrayIterator<std::complex<float>, 2>,
blitz::Add<std::complex<float>, s
td::complex<float> > > >, blitz::FastArrayIterator<std::complex<float>,
2>, blit
z::Add<std::complex<float>, std::complex<float> > > >,
blitz::FastArrayIterator<
std::complex<float>, 2>, blitz::Add<std::complex<float>,
std::complex<float> > >
 >, blitz::FastArrayIterator<std::complex<float>, 2>,
blitz::Add<std::complex<fl
oat>, std::complex<float> > > >, blitz::_bz_ArrayExprConstant<double>,
blitz::Di
vide<std::complex<float>, double> > >, T_update =
blitz::_bz_update<std::complex
<float>, std::complex<float> >, P_numtype = std::complex<float>, int
N_rank = 2]
'
/home/eric/lib/python2.2/site-packages/weave/blitz-20001213/blitz/array/
eval.cc:
259:   instantiated from `blitz::Array<T, N>& blitz::Array<T,
N>::evaluate(T_exp
r, T_update) [with T_expr =
blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprOp<blitz::_
bz_ArrayExpr<blitz::_bz_ArrayExprOp<blitz::_bz_ArrayExpr<blitz::_bz_Arra
yExprOp<
blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprOp<blitz::_bz_ArrayExpr<blitz::
_bz_Arra
yExprOp<blitz::FastArrayIterator<std::complex<float>, 2>,
blitz::FastArrayIterat
or<std::complex<float>, 2>, blitz::Add<std::complex<float>,
std::complex<float>
> > >, blitz::FastArrayIterator<std::complex<float>, 2>,
blitz::Add<std::complex
<float>, std::complex<float> > > >,
blitz::FastArrayIterator<std::complex<float>
, 2>, blitz::Add<std::complex<float>, std::complex<float> > > >,
blitz::FastArra
yIterator<std::complex<float>, 2>, blitz::Add<std::complex<float>,
std::complex<
float> > > >, blitz::_bz_ArrayExprConstant<double>,
blitz::Divide<std::complex<f
loat>, double> > >, T_update = blitz::_bz_update<std::complex<float>,
std::compl
ex<float> >, P_numtype = std::complex<float>, int N_rank = 2]'
/home/eric/lib/python2.2/site-packages/weave/blitz-20001213/blitz/array/
ops.cc:1
18:   instantiated from `blitz::Array<T, N>& blitz::Array<T,
N>::operator=(const
 blitz::ETBase<T_expr>&) [with T_expr =
blitz::_bz_ArrayExpr<blitz::_bz_ArrayExp
rOp<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprOp<blitz::_bz_ArrayExpr<bli
tz::_bz_
ArrayExprOp<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprOp<blitz::_bz_Array
Expr<bli
tz::_bz_ArrayExprOp<blitz::FastArrayIterator<std::complex<float>, 2>,
blitz::Fas
tArrayIterator<std::complex<float>, 2>, blitz::Add<std::complex<float>,
std::com
plex<float> > > >, blitz::FastArrayIterator<std::complex<float>, 2>,
blitz::Add<
std::complex<float>, std::complex<float> > > >,
blitz::FastArrayIterator<std::co
mplex<float>, 2>, blitz::Add<std::complex<float>, std::complex<float> >
> >, bli
tz::FastArrayIterator<std::complex<float>, 2>,
blitz::Add<std::complex<float>, s
td::complex<float> > > >, blitz::_bz_ArrayExprConstant<double>,
blitz::Divide<st
d::complex<float>, double> > >, P_numtype = std::complex<float>, int
N_rank = 2]
'
/home/eric/.python22_compiled/69322/sc_f951e2d4a9b0e08d923fe6c17a9778ae2
.cpp:699
:   instantiated from here
/home/eric/lib/python2.2/site-packages/weave/blitz-20001213/blitz/ops.h:
220: no

   match for `std::complex<float>& / double&' operator
Ewarning: specified build_dir '_bad_path_' does not exist or is not
writable. Tr
ying default locations
....warning: specified build_dir '_bad_path_' does not exist or is not
writable.
 Trying default locations
...................speed test for list access
compiler:
scxx: 0.276726961136
C, no checking: 0.215849041939
python: 1.99733901024
.............................................................
test printing a value:2
../home/eric/.python22_compiled/69322/sc_a6df888dc732b38ae7a4c5fa1063b42
51.cpp:
In
   function `PyObject* compiled_func(PyObject*, PyObject*)':
/home/eric/.python22_compiled/69322/sc_a6df888dc732b38ae7a4c5fa1063b4251
.cpp:645
: no
   match for `std::string& < int' operator
/home/eric/.python22_compiled/69322/sc_a6df888dc732b38ae7a4c5fa1063b4251
.cpp:649
: no
   match for `std::string& + int' operator
........................................................................
........
..............
======================================================================
ERROR: result[1:-1,1:-1] = (b[1:-1,1:-1] + b[2:,1:-1] + b[:-2,1:-1]
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/eric/lib/python2.2/site-packages/weave/tests/test_blitz_tools.py"
,
 line 150, in check_5point_avg_2d
    self.generic_2d(expr)
  File
"/home/eric/lib/python2.2/site-packages/weave/tests/test_blitz_tools.py"
,
 line 124, in generic_2d
    mod_location)
  File
"/home/eric/lib/python2.2/site-packages/weave/tests/test_blitz_tools.py"
,
 line 80, in generic_test
    blitz_tools.blitz(expr,arg_dict,{},verbose=0) #,
  File "/home/eric/lib/python2.2/site-packages/weave/blitz_tools.py",
line 72, i
n blitz
    type_converters = converters.blitz,
  File "/home/eric/lib/python2.2/site-packages/weave/inline_tools.py",
line 425,
 in compile_function
    verbose=verbose, **kw)
  File "/home/eric/lib/python2.2/site-packages/weave/ext_tools.py", line
327, in
 compile
    verbose = verbose, **kw)
  File "/home/eric/lib/python2.2/site-packages/weave/build_tools.py",
line 221,
in build_extension
    setup(name = module_name, ext_modules = [ext],verbose=verb)
  File
"/usr/src/build/143041-i386/install/usr/lib/python2.2/distutils/core.py"
,
 line 157, in setup
CompileError: error: command 'gcc' failed with exit status 1

----------------------------------------------------------------------
Ran 184 tests in 215.422s

FAILED (errors=1)

----------------------------------------------
eric jones                    515 Congress Ave
www.enthought.com             Suite 1614
512 536-1057                  Austin, Tx 78701 







More information about the Scipy-dev mailing list