[R-sig-Debian] make check reg-tests-1b.R fails with Ubuntu R

Dirk Eddelbuettel edd at debian.org
Wed Sep 14 16:45:44 CEST 2011


Andrew,

Crossprod etc all dispatch to BLAS / LAPACK.  The error appears to be that
z[1,3] is 0 whereas a NA gets expected.

I just verified this on another 32bit box where I had stock R and little
else:

> x <- matrix(c(1, 0, NA, 1), 2, 2) ; y <- matrix(c(1, 0, 0, 2, 1, 0), 3, 2)
> (z <- tcrossprod(x, y))
     [,1] [,2] [,3]
[1,]   NA   NA    0
[2,]    2    1    0
>  identical(z, x %*% t(y))
[1] FALSE
>

but all it takes is 

wajig install libatlas3gf-base

after which we get 

dd at chibud:~$ R

R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>  x <- matrix(c(1, 0, NA, 1), 2, 2) ; y <- matrix(c(1, 0, 0, 2, 1, 0), 3, 2)
> (z <- tcrossprod(x, y))
     [,1] [,2] [,3]
[1,]   NA   NA   NA
[2,]    2    1    0
>  identical(z, x %*% t(y))
[1] TRUE
> 


So try installing 'a better BLAS'.  Maybe we can distill this into a pure C
program exhibiting the same issue and bring it to the BLAS maintainer?

Dirk


-- 
New Rcpp master class for R and C++ integration is scheduled for 
San Francisco (Oct 8), more details / reg.info available at
http://www.revolutionanalytics.com/products/training/public/rcpp-master-class.php



More information about the R-SIG-Debian mailing list