[Numpy-discussion] Bug in built in SVD?

Nadav Horesh nadavh at visionsense.com
Thu Aug 12 10:30:01 EDT 2004


It can be a bit more complicate, the story is this:
One my gentoo system I use ATLAS, and gentoo instaltion generates the ATLAS version of blas and lapack which omit some of the original blas/lapack routines. Till now I used the numarray/Numeric internal lapack_lite package, since every time I tried to compile against the external lapck, I could not load the linear-algebra package because I got an error complaining about a missing "dgesdd_".

 In order to solve it I downloaded the original lapack library from netlib and compiled it with gcc3.4.1 and full optimization (by tweaking the makefile). I copied the generated lapack.a to /usr/local/lob/lapack_original.a and updated the link list in addon.py/setup.py (numarray/Numeric). That worked fine --- I have numarray/Numeric linked against highly optimized lapack without this infinite loop problem.

That leads me to the other issue: Assuming ATLAS routines runs faster then their equivalent lapack's. Why not replace dgesdd with the one which has an ATLAS equivalent?

Nadav

-----Original Message-----
From:	Michiel Jan Laurens de Hoon [mailto:mdehoon at ims.u-tokyo.ac.jp]
Sent:	Thu 12-Aug-04 10:29
To:	Nadav Horesh
Cc:	
Subject:	Re: [Numpy-discussion] Bug in built in SVD?
This may also be related to patch 732520 for Numerical Python. Some parts of 
lapack need to be compiled without optimization. Numerical Python (and I assume 
numarray) use optimization anyway, and usually gets away with it. So gcc 3.4.1 
may be doing the right thing after all. The external Lapack that you mentioned 
may have been compiled correctly, i.e. without optimization for the specific 
Lapack files.

--Michiel, U Tokyo.

Nadav Horesh wrote:
> Sorry it is a gcc3.4.1 optimization bug. Either lowering to optimization to -O1 or stepping back to gcc3.3.4 (with all optimization guns on) fix it.
> 
>    Nadav.
> 
> -----Original Message-----
> From:	Nadav Horesh
> Sent:	Wed 11-Aug-04 15:48
> To:	numpy-discussion
> Cc:	
> Subject:	[Numpy-discussion] Bug in built in SVD?
> When numarray is compiled with the buit-in linear-algebra routine the svd routine runs into an infinite loop.
> 
> Platform2: python 2.3.4 and 2.4a2; numarray 1.1; gcc 3.4.1; RH9 and gentoo 1.4
> 
> example:
> 
> 
>>>from numarray.linear_algebra.mlab import *
>>>
>>>>svd(arange(20.0, shape = (5,4)))
> 
> 
> ... infine loop ...
> 
> 
> --------------------------------------------------------------------------
> 
> svd runs OK when compiled againts external LAPACK.
> 
> BTW: Why numarray used dgesdd routine for SVD, and not the svd routine that has the ATLAS equivalent?
> 
>   Nadav.
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> 
> 
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> 
> 

-- 
Michiel de Hoon, Assistant Professor
University of Tokyo, Institute of Medical Science
Human Genome Center
4-6-1 Shirokane-dai, Minato-ku
Tokyo 108-8639
Japan
http://bonsai.ims.u-tokyo.ac.jp/~mdehoon








More information about the NumPy-Discussion mailing list