[SciPy-dev] missing Lib/__init__.py in newscipy?

Travis Oliphant oliphant at ee.byu.edu
Wed Oct 19 15:27:28 CDT 2005


Arnd Baecker wrote:

>Hi Travis,
>
>On Wed, 19 Oct 2005, Travis Oliphant wrote:
>
>  
>
>>Arnd Baecker wrote:
>>    
>>
>
>  
>
>Build
>=====
>
>gcc: build/src/fortranobject.c
>gcc: build/src/build/src/scipy/linalg/fblasmodule.c
>build/src/build/src/scipy/linalg/fblasmodule.c: In function
>`f2py_rout_fblas_sger':
>build/src/build/src/scipy/linalg/fblasmodule.c:8045: warning: passing arg
>1 of `initforcomb' from incompatible pointer type
>build/src/build/src/scipy/linalg/fblasmodule.c: In function
>`f2py_rout_fblas_dger':
>build/src/build/src/scipy/linalg/fblasmodule.c:8237: warning: passing arg
>1 of `initforcomb' from incompatible pointer type
>build/src/build/src/scipy/linalg/fblasmodule.c: In function
>`f2py_rout_fblas_cgeru':
>build/src/build/src/scipy/linalg/fblasmodule.c:8429: warning: passing arg
>1 of `initforcomb' from incompatible pointer type
>build/src/build/src/scipy/linalg/fblasmodule.c: In function
>`f2py_rout_fblas_zgeru':
>build/src/build/src/scipy/linalg/fblasmodule.c:8621: warning: passing arg
>1 of `initforcomb' from incompatible pointer type
>build/src/build/src/scipy/linalg/fblasmodule.c: In function
>`f2py_rout_fblas_cgerc':
>build/src/build/src/scipy/linalg/fblasmodule.c:8813: warning: passing arg
>1 of `initforcomb' from incompatible pointer type
>build/src/build/src/scipy/linalg/fblasmodule.c: In function
>`f2py_rout_fblas_zgerc':
>build/src/build/src/scipy/linalg/fblasmodule.c:9005: warning: passing arg
>1 of `initforcomb' from incompatible pointer type
>compiling Fortran sources
>g77(f77) options: '-Wall -fno-second-underscore -fPIC -O3 -funroll-loops
>-march=opteron -mmmx -msse2 -msse -m3dnow'
>creating build/temp.linux-x86_64-2.4/Lib/linalg
>
>Test
>====
>
>scipy.test(10,10)
>
>check_ger (scipy.linalg.blas.test_blas.test_fblas2_simple)
>Segmentation fault
>
>
>gdb
>file /scr/python/bin/python
>run
>from scipy.linalg import fblas
>fblas.sger(1,[1,2],[3,4])
>
>Program received signal SIGSEGV, Segmentation fault.
>[Switching to Thread 46912507335168 (LWP 1278)]
>0x00002aaab298ce1b in f2py_rout_fblas_sger (capi_self=0x8a9ae0,
>    capi_args=0x8a9ae0, capi_keywds=0x0, f2py_func=0x2aaab2997e10 <sger_>)
>    at fblasmodule.c:8047
>8047            a[capi_i++] = 0; /* fortran way */
>
>(gdb) bt
>#0  0x00002aaab298ce1b in f2py_rout_fblas_sger (capi_self=0x8a9ae0,
>    capi_args=0x8a9ae0, capi_keywds=0x0, f2py_func=0x2aaab2997e10 <sger_>)
>    at fblasmodule.c:8047
>#1  0x0000000000417700 in PyObject_Call (func=0x8a9ae0, arg=0x0, kw=0x1)
>    at abstract.c:1756
>#2  0x00000000004777d9 in PyEval_EvalFrame (f=0x685990) at ceval.c:3766
>#3  0x000000000047ad2f in PyEval_EvalCodeEx (co=0x2aaaaab20030,
>globals=0x0,
>    locals=0x1, args=0x685990, argcount=0, kws=0x0, kwcount=0, defs=0x0,
>    defcount=0, closure=0x0) at ceval.c:2736
>#4  0x000000000047af72 in PyEval_EvalCode (co=0x8a9ae0, globals=0x0,
>    locals=0x1) at ceval.c:484
>#5  0x00000000004a1c72 in PyRun_InteractiveOneFlags (fp=0x2aaaaab136b0,
>    filename=0x4cbf24 "<stdin>", flags=0x7fffffa574dc) at pythonrun.c:1265
>#6  0x00000000004a1e04 in PyRun_InteractiveLoopFlags (fp=0x2aaaab556b00,
>    filename=0x4cbf24 "<stdin>", flags=0x7fffffa574dc) at pythonrun.c:695
>#7  0x00000000004a2350 in PyRun_AnyFileExFlags (fp=0x2aaaab556b00,
>    filename=0x0, closeit=0, flags=0x7fffffa574dc) at pythonrun.c:658
>#8  0x0000000000410788 in Py_Main (argc=0, argv=0x7fffffa58a6c) at
>main.c:484
>#9  0x00002aaaab34d5aa in __libc_start_main () from /lib64/tls/libc.so.6
>#10 0x000000000040fdfa in _start () at start.S:113
>#11 0x00007fffffa575d8 in ?? ()
>#12 0x00002aaaaabc19c0 in rtld_errno () from /lib64/ld-linux-x86-64.so.2
>#13 0x0000000000000001 in ?? ()
>
>
>fblasmodule.c is generated via f2py, so applying changes to
>that file is presumably not the way to go, right?
>  
>
Well, you can make changes to it.  It's just that these changes need to 
be placed in the appropriate code-generation area of f2py.   If you can 
make changes to fblasmodule.c that work, then we can back those changes 
into f2py.

Or if you are adventurous you can scout around in the f2py code to see 
where the code gets generated, and make the changes there.

I'm looking at the f2py-generated code now.  There are several changes 
that need to be made to better support new scipy.

-Travis




More information about the Scipy-dev mailing list