[SciPy-user] blitz error

Gideon Simpson simpson@math.toronto....
Wed Apr 1 18:32:07 CDT 2009


I tried this little bit of code:

def linear_p(qp_hat, qm_hat, vg, kappa, n1, il, ik):

	linp = np.zeros(qp_hat.shape) + 0.j
	expr = "linp = -vg * qp_hat * il + kappa * ik * n1 * qm_hat"
	weave.blitz(expr, check_size=1)
	return linp

and got the following error:

Traceback (most recent call last):
   File "./soliton1_blitz.py", line 185, in <module>
     k1p = filter(k1p) + linop_p(Ep_hat, Em_hat)
   File "./soliton1_blitz.py", line 79, in <lambda>
     vg, kappa, n1, il, ik)
   File "/Users/gideon/Code/CME/CMEops_blitz.py", line 10, in linear_p
     weave.blitz(expr, check_size=1)
   File "/opt/lib/python2.5/site-packages/scipy/weave/blitz_tools.py",  
line 62, in blitz
     **kw)
   File "/opt/lib/python2.5/site-packages/scipy/weave/ 
inline_tools.py", line 462, in compile_function
     verbose=verbose, **kw)
   File "/opt/lib/python2.5/site-packages/scipy/weave/ext_tools.py",  
line 367, in compile
     verbose = verbose, **kw)
   File "/opt/lib/python2.5/site-packages/scipy/weave/build_tools.py",  
line 272, in build_extension
     setup(name = module_name, ext_modules = [ext],verbose=verb)
   File "/opt/lib/python2.5/site-packages/numpy/distutils/core.py",  
line 184, in setup
     return old_setup(**new_attr)
   File "/sw/lib/python2.5/distutils/core.py", line 168, in setup
     raise SystemExit, "error: " + str(msg)
scipy.weave.build_tools.CompileError: error: Command "g++ -fno-strict- 
aliasing -mno-fused-madd -DNDEBUG -g -fwrapv -O3 -Wall -I/opt/lib/ 
python2.5/site-packages/scipy/weave -I/opt/lib/python2.5/site-packages/ 
scipy/weave/scxx -I/opt/lib/python2.5/site-packages/scipy/weave/blitz - 
I/opt/lib/python2.5/site-packages/numpy/core/include -I/sw/include/ 
python2.5 -c /Users/gideon/.python25_compiled/ 
sc_24bab5a447df6354e489345507f46f0d2.cpp -o /var/folders/yL/ 
yLD5tRJiGWa7oyM6mWJUN++++TI/-Tmp-/gideon/python25_intermediate/ 
compiler_eded75b75a17d5bc9afe97cc30cf08c0/Users/ 
gideon/.python25_compiled/sc_24bab5a447df6354e489345507f46f0d2.o"  
failed with exit status 1

Could it be because I'm using complex numbers?

-gideon



More information about the SciPy-user mailing list