[R-sig-Debian] make check fails with default libblas
Ramon Diaz-Uriarte
rdiaz02 at gmail.com
Sat Dec 28 22:41:32 CET 2013
On Sat, 28-12-2013, at 19:16, edd at debian.org wrote:
> On 28 December 2013 at 12:32, Ramon Diaz-Uriarte wrote:
> | Dear All,
> |
> | Summary:
> | ========
> |
> | To test some packages, I want to build R-3.1.0 (current R devel). However,
> | when I use the default libblas, make check fails with
> |
> | running code in 'reg-BLAS.R' ...make[3]: *** [reg-BLAS.Rout] Error 1
> |
> |
> | It does not fail, however, if I use libatlas3 or libopenblas.
> |
> |
> | The same thing happens with the current R patched.
> |
> |
> | I've google around and cannot find anything, and I find it very surprising
> | that make check fails here.
> |
> |
> | Details:
> | ========
> |
> | - I have checked this with R-devel from 19 December and 26 December, as
> | well as with the current R patched (2013-12-27, r64562)
> |
> | - Check fails when
> | ls -l /usr/lib/libblas.so.3 /etc/alternatives/libblas.so.3
> | lrwxrwxrwx 1 root root 29 Dec 28 10:31 /etc/alternatives/libblas.so.3 -> /usr/lib/libblas/libblas.so.3
> | lrwxrwxrwx 1 root root 30 Oct 3 2012 /usr/lib/libblas.so.3 ->
> | /etc/alternatives/libblas.so.3
> |
> | - Version of libblas:
> | libblas-dev 1.2.20110419 amd64
> | libblas3 1.2.20110419 amd64
> |
> |
> | - Check is OK when
> | ls -l /usr/lib/libblas.so.3 /etc/alternatives/libblas.so.3
> | lrwxrwxrwx 1 root root 38 Dec 28 11:04 /etc/alternatives/libblas.so.3 -> /usr/lib/atlas-base/atlas/libblas.so.3
> | lrwxrwxrwx 1 root root 30 Jul 26 2012 /usr/lib/libblas.so.3 -> /etc/alternatives/libblas.so.3
> |
> | - Version of libatlas
> | libatlas3-base 3.10.1-2
> |
> |
> | (I also tried with openblas, and it worked just fine)
> |
> |
> | - This happens in three different systems, one using gcc-4.7.2 (Debian
> | 4.7.2-5) and two with 4.8.2 (Debian 4.8.2-1)
> |
> | - I have configured and compiled R trying to follow debian/rules in the
> | r-base-core package. This is what I do:
> |
> | ## with gcc-4.8 using -O3 or -O2 both lead to the check failure
> | optimflags="-O2 -pipe -g"
> | export CC="gcc -std=gnu99"
> | export CXX=g++
> | export F77=gfortran
> | export FC=gfortran
> | export CFLAGS=$optimflags
> | export CXXFLAGS=$optimflags
> | export FFLAGS=$optimflags
> | export FCFLAGS=$optimflags
> | export LDFLAGS=-Wl,-O1
> |
> | ./configure --with-cairo \
> | --with-jpeglib \
> | --with-readline \
> | --with-tcltk \
> | --with-system-bzlib \
> | --with-system-pcre \
> | --with-system-zlib \
> | --with-blas \
> | --with-lapack \
> | --enable-R-profiling \
> | --enable-R-shlib \
> | --build=x86_64-linux-gnu \
> | --with-tcl-config=/usr/lib/tcl8.5/tclConfig.sh \
> | --with-tk-config=/usr/lib/tk8.5/tkConfig.sh
> |
> | make -j8
> |
> |
> |
> | Is this a know problem? Am I doing something wrong?
>
> I don't think it is a known issue. Can you isolate the actual test that
> fails? How big is the actual discrepancy? We should probably bring it to the
> attention of the refblas maintainer.
Let's start by the end: it turns out that the file in question
(tests/reg-BLAS.R) says
## depended on the BLAS in use: some (including the reference BLAS)
## had z[1,3] == 0 and log(0) %*% 0 as as.matrix(0).
which are precisely the tests that fail (see below). So I guess this is a
known/suspected possible issue, and thus not really a problem. Sorry for
the noise.
The next is just for the sake of completeness: this is what fails:
##########################################
x <- matrix(c(1, 0, NA, 1), 2, 2)
y <- matrix(c(1, 0, 0, 2, 1, 0), 3, 2)
(z <- tcrossprod(x, y))
## This fails
stopifnot(identical(z, x %*% t(y)))
##
## > z
## [,1] [,2] [,3]
## [1,] NA NA 0
## [2,] 2 1 0
##
## > x %*% t(y)
## [,1] [,2] [,3]
## [1,] NA NA NA
## [2,] 2 1 0
##
## This fails too
## stopifnot(is.nan(log(0) %*% 0))
## > log(0) %*% 0
## [,1]
## [1,] 0
##
>
> You did what I do -- telling R to use external blas. In an ideal world the
> resulting behaviour should be identical for all available BLAS implementations.
I guess I just saw a glimpse of a non-ideal world, but it wasn't that bad
this time :-)
Best,
R.
>
> Dirk
>
>
> | Best,
> |
> |
> | R.
> |
> |
> | --
> | Ramon Diaz-Uriarte
> | Department of Biochemistry, Lab B-25
> | Facultad de Medicina
> | Universidad Autónoma de Madrid
> | Arzobispo Morcillo, 4
> | 28029 Madrid
> | Spain
> |
> | Phone: +34-91-497-2412
> |
> | Email: rdiaz02 at gmail.com
> | ramon.diaz at iib.uam.es
> |
> | http://ligarto.org/rdiaz
> |
> | _______________________________________________
> | R-SIG-Debian mailing list
> | R-SIG-Debian at r-project.org
> | https://stat.ethz.ch/mailman/listinfo/r-sig-debian
--
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madrid
Arzobispo Morcillo, 4
28029 Madrid
Spain
Phone: +34-91-497-2412
Email: rdiaz02 at gmail.com
ramon.diaz at iib.uam.es
http://ligarto.org/rdiaz
More information about the R-SIG-Debian
mailing list