[Rd] cygwin R-2.14.0 build fail

peter dalgaard pdalgd at gmail.com
Wed Nov 16 23:04:45 CET 2011


On Nov 16, 2011, at 22:08 , marco atzeri wrote:

> On 11/16/2011 9:32 PM, Prof Brian Ripley wrote:
>> The failures are *not* minor. Please don't distribute an R linked to a
>> broken BLAS library. Those tests are not for fun: they came from real
>> errors on real problems.
>> 
> 
> Dear Brian,
> I am reasonable sure that the cygwin blas library are fine, have
> you any evidence that they are broken ?
> 
> The R test log just reports an issue handling NA that could be
> related to cygwin difference to others platform.
> I already noted similar difference on cygwin octave package.
> 


Well, on other platforms we have

> tcrossprod(x,y)
     [,1] [,2] [,3]
[1,]   NA   NA   NA
[2,]    2    1    0
> x %*% t(y)
     [,1] [,2] [,3]
[1,]   NA   NA   NA
[2,]    2    1    0

so the Cygwin tcrossprod is implicitly letting 0*NA==0 (in the DGEMM BLAS routine). 

This is not what should happen according to the standards, and there are people whose code relies on standards compliance (and that's why the test is there).

It's also plain wrong, because in extended arithmetic, the missing value could be Inf, and 0*Inf == NaN, so assuming that 0*anything==0 doesn't work.

-pd

> Here is the log:
> --------------------------------------------------
> > ## PR#4582 %*% with NAs
> > stopifnot(is.na(NA %*% 0), is.na(0 %*% NA))
> > ## depended on the BLAS in use.
> >
> >
> > ## found from fallback test in slam 0.1-15
> > ## most likely indicates an inaedquate BLAS.
> > 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
> > stopifnot(identical(z, x %*% t(y)))
> Error: identical(z, x %*% t(y)) is not TRUE
> Execution halted
> tests/reg-BLAS.Rout.fail (END)
> --------------------------------------------------
> 
> Regards
> Marco
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-devel mailing list