Max Mayzel wrote:
> Dag Sverre Seljebotn <da...@...> writes:
>
>   
>>     
>>>>> Hi,
>>>>> I'm trying to run testlapack example from cython-notur09 on OS X 10.6.
>>>>> First, while compiling I faced with following error
>>>>> gcc -L/sw64/lib -bundle -L/sw64/lib/python2.6/config -lpython2.6
>>>>> build/temp.macosx-10.4-i386-2.6/lapack.o
>>>>> -L/Applications/development/sage//local/lib -llapack -lf77blas -lcblas
>>>>> -latlas -o lapack.so -g
>>>>> Undefined symbols:
>>>>>  "_clapack_dgesv", referenced from:
>>>>>      _dgesv in lapack.o
>>>>>      _dsolve in lapack.o
>>>>> ld: symbol(s) not found
>>>>> So I changed clapack_dgesw in lapack.pxd to dgesw and successfully
>>>>> build it against SAGE (sage-4.2.1-OSX10.6-Intel-64bit-i386-Darwin.dmg)
>>>>> but when I run testlapack.test() python froze, using 100% of CPU,
>>>>> below is debuging info.
>>>>>
>>>>>       
>>>>>           
>>>>>>>> tl.test()
>>>>>>>>             
>>>>>>>>                 
>>>>> test start
>>>>> ^C
>>>>> Program received signal SIGINT, Interrupt.
>>>>> 0x00000001005280a4 in dgesv (__pyx_v_Order=CblasRowMajor, __pyx_v_N=3,
>>>>> __pyx_v_NRHS=1, __pyx_v_A=0x7fff5fbfdda0, __pyx_v_lda=3,
>>>>> __pyx_v_ipiv=0x7fff5fbfde10, __pyx_v_B=0x7fff5fbfddf0, __pyx_v_ldb=3)
>>>>> at lapack.c:775
>>>>> 775     static  int dgesv(enum CBLAS_ORDER __pyx_v_Order, int __pyx_v_N,
>>>>> int __pyx_v_NRHS, double *__pyx_v_A, int __pyx_v_lda, int
>>>>> *__pyx_v_ipiv, double *__pyx_v_B, int __pyx_v_ldb) {
>>>>> (gdb) exit
>>>>>
>>>>>           
>>> In [3]: numpy.show_config()
>>> lapack_opt_info:
>>>     extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
>>>     extra_compile_args = ['-msse3']
>>>     define_macros = [('NO_ATLAS_INFO', 3)]
>>>
>>> blas_opt_info:
>>>     extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
>>>     extra_compile_args = ['-msse3',
>>> '-I/System/Library/Frameworks/vecLib.framework/Headers']
>>>     define_macros = [('NO_ATLAS_INFO', 3)]
>>>
>>>   
>>>       
>> Hmm. I expected a line libraries=[...] in there. Try 
>> scipy.show_config()? I'm afraid I don't have a good answer, one just has 
>> to find the right set of libraries to link with.
>>
>> Dag Sverre
>>
>>     
> Here it is
> In [2]: scipy.show_config()
> amd_info:
>     libraries = ['amd']
>     library_dirs = ['/sw64/lib']
>
> umfpack_info:
>     libraries = ['umfpack', 'amd']
>     library_dirs = ['/sw64/lib']
>
> lapack_opt_info:
>     extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
>     extra_compile_args = ['-msse3']
>     define_macros = [('NO_ATLAS_INFO', 3)]
>
> blas_opt_info:
>     extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
>     extra_compile_args = ['-msse3',
> '-I/System/Library/Frameworks/vecLib.framework/Headers']
>     define_macros = [('NO_ATLAS_INFO', 3)]
>
> As far, as I understand, numpy and scipy are build against Mac OS X 
> Accelerated
> framework, which includes lapack and blas libs, but as I've wrote recently, 
> when
> I'm building case a crash
>   
Have you tried dropping libraries=.... from setup.py? You should really 
build your extension the way SciPy has been built, meaning modifying 
setup.py so that gcc is invoked in the way described by blas_opt_info above.

Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to