[SciPy-User] Calling LAPACK function dbdsqr()?

Philip Semanchuk philip@semanchuk....
Fri Dec 14 09:48:09 CST 2012


On Dec 14, 2012, at 10:42 AM, Sturla Molden wrote:

> If you are building SciPy from source, just add the interface to 
> scipy/linalg/flapack.pyf.src and scipy.linalg.lapack.get_lapack_funcs 
> will get it for you. I would be nice if SciPy exposed all of LAPACK, 
> even the parts it doesn't use, but currently it don't.
> 
> If you're not building SciPy from source, yopu can e.g. write a .pyf 
> file for dbdsqr and use f2py and and link with your LAPACK library. If 
> you prefer to avoid Fortran, but already have a LAPACK library, you can 
> also use LAPACKE with Cython (or ctypes).

Thanks, Sturla. Our code is distributed to others as part of an application suite. We don't ask our users to compile anything, nor can we necessarily predict what libraries will be available on the machine outside of our app's prerequisites. Our app requires numpy and scipy, so I was really hoping to get at it from one of those two libraries.

Cheers
Philip


> On 14.12.2012 15:34, Philip Semanchuk wrote:
>> Hi all,
>> I'm porting some Fortran code that makes use of a number of BLAS and LAPACK functions, including dbdsqr(). I've found all of the functions I need via scipy.linalg.lapack.get_lapack_funcs/get_blas_funcs() except for dbdsqr().
>> 
>> I see that the numpy source code (I looked at numpy-1.6.0b2) contains dbdsqr() in numpy/linalg/dlapack_lite.c, but grep can't find that string in the binary distribution on my Mac nor on Linux. If it's buried in a numpy binary somewhere, I'm comfortable with using ctypes to call it, but I suspect it isn't.
>> 
>> Can anyone point me to a cross-platform (OS X, Linux&  Windows) way I can call this function without compiling code myself?
>> 
>> I'm unfortunately quite naïve about the math in the code I'm porting, so I'm porting the code blindly -- if you ask me what problem I'm trying to solve with dbdsqr(), I won't be able to explain.
>> 
>> Thanks in advance for any suggestions,
>> Philip
>> 
>> PS - Please pardon if you already saw this question on the numpy list.
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
> 
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user



More information about the SciPy-User mailing list