From edd at debian.org  Tue Apr 22 20:32:46 2003
From: edd at debian.org (Dirk Eddelbuettel)
Date: Wed Apr 23 02:33:00 2003
Subject: [Rd] "LAPACK routine DGESDD gave error code -12" with Debian
	(PR#2822)
In-Reply-To: <200304221807.h3MI7apD014611@pubhealth.ku.dk>
References: <200304221807.h3MI7apD014611@pubhealth.ku.dk>
Message-ID: <20030423003246.GA27400@sonny.eddelbuettel.com>

On Tue, Apr 22, 2003 at 08:07:36PM +0200, rdiaz@cnio.es wrote:
> Dear All,
> 
> Under Debian GNU/Linux La.svd (with method = "dgesdd") sometimes gives the 
> error
> 
> "Error in La.svd(data, nu = 0, nv = min(nrow, ncol), method = "dgesdd") : 
> 	LAPACK routine DGESDD gave error code -12"
> 
> It seems not to depend on the data per se, but on the relationship between 
> numbers of rows and columns. 
> 
> For example, if the number of columns is 100, La.svd will fail when the number 
> of rows is 56, but not if it is 55 or 57. It will not fail if we use 
> "dgesvd". If the number of columns is 51, La.svd fails when the number of 
> rows is between 29 and 50 if we use "dgesdd".
> 
> This happens if I use the latest deb packages (and thus ATLAS, etc). It does 
> not happen if I build R in this same machine with "--without-blas" (where 
> make check reports no errors). In case it matters, the bug does not show up 
> in a different machine with Windwos 2000 and the Rblas.dll linked against 
> ATLAS provided in http://cran.r-project.org/bin/windows/contrib/ATLAS/P4).
> 
> I understand this is probably related to the issues mentioned in R-admin about 
> LAPACK 3.0 and some of the issues recently discussed in this list by M. 
> Burger, D. Bates and D. Eddelbuettel. Are there any workarounds (besides not 
> using ATLAS at all?).

We should probably talk to Camm, the Atlas maintainer. Note how on recent
upgrades he inserted the note (cf /var/lib/dpkg/info/atlas2-3dnow.templates
on my Athlon system) via debconf:

   Template: atlas2-3dnow/3dnow_warning
   Type: note
   Description: 3dnow arithmetic is not IEEE compliant
    Please note that 3dnow arithmetic does not furnish several results
    required by the IEEE standard, and may therefore cause errors in code
    which needs to trap NaN and Inf results, for example.  The
    atlas2-3dnow binaries make heavy use of the 3dnow extensions.
    Please see the accompanying file /usr/share/doc/atlas2-3dnow/3DNow.txt
    for details.
      
I know Camm is on a sabbatical but will CC him nonetheless.

Dirk

> Ramn
> 
> ********************************
> An example of failure:
> > ## ncol = 100
> > nrow <- 56
> > ncol <- 100
> > data <- matrix(1:(nrow * ncol), ncol = ncol)
> > ## you get the errors if you use any other data
> > ## such as data <- matrix(rnorm(nrow * ncol), ncol = ncol)
> > svd(data) ## error
> > La.svd(data, nu = 0,
>              nv = min(nrow, ncol), method = "dgesdd") ## error
> > La.svd(data, nu = 0,
>              nv = min(nrow, ncol), method = "dgesvd") ## OK
> 
> > ##ncol = 51; it fails with nrow in [29, 50]
> *************************
> 
> > ## version that crashes
> > version 
>          _                
> platform i386-pc-linux-gnu
> arch     i386             
> os       linux-gnu        
> system   i386, linux-gnu  
> status                    
> major    1                
> minor    7.0              
> year     2003             
> month    04               
> day      16               
> language R        
> *****************************
> > ## version "--without-blas" that does not crash
> > version
>          _  
> platform i686-pc-linux-gnu
> arch     i686             
> os       linux-gnu        
> system   i686, linux-gnu  
> status                    
> major    1                
> minor    7.0              
> year     2003             
> month    04               
> day      16               
> language R   
> 
> 
> -----
> Ramn Daz-Uriarte
> Bioinformatics Unit
> Centro Nacional de Investigaciones Oncolgicas (CNIO)
> (Spanish National Cancer Center)
> Melchor Fernndez Almagro, 3
> 28029 Madrid (Spain)
> Fax: +-34-91-224-6972
> Phone: +-34-91-224-6900
> 
> http://bioinfo.cnio.es/~rdiaz
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> 

-- 
Don't drink and derive. Alcohol and algebra don't mix.


[Rd] "LAPACK routine DGESDD gave error code -12" with Debian (PR#2822)
Dirk Eddelbuettel