From ripley at stats.ox.ac.uk  Tue Mar 28 08:11:23 2006
From: ripley at stats.ox.ac.uk (ripley at stats.ox.ac.uk)
Date: Tue, 28 Mar 2006 08:11:23 +0200 (CEST)
Subject: [Rd] Matrix inner product crashes on x86_64 (PR#8715)
Message-ID: <20060328061123.4D6BDE93A@slim.kubism.ku.dk>

On Mon, 27 Mar 2006, Jussi T Lindgren wrote:

> On Mon, 27 Mar 2006, Prof Brian Ripley wrote:
>
>> Not reproducible for me (and do you really think that something as simple as
>> this would not have been found on x86_64 long before now?)
>> This is almost certainly caused by your use of an inappropriate external BLAS.
>> Something has probably been compiled for a different processor than the one
>> you are using, since illegal instructions are a compiler (not R) issue that I
>> have seen quite often on ix86 systems when this happened.
>> Use --without-blas when recompiling R and see if it then works.
>
> Thank you for the prompt reply. Disabling the external BLAS fixed
> the problem as you suspected.
>
> (As a minor curiosity, the problem was not caught by any tests
> ran by make check or make check-all -- but I do not presume here
> to speculate or guess whether the tests try out any such matrix
> calculations or not.). :)

They do.  What the BLAS does will depend on the exact dimensions, so there 
will be very many paths through its code.

>
>
> Thanks again,
> J.
>
>
>>
>> On Mon, 27 Mar 2006, jtlindgr at cs.helsinki.fi wrote:
>>
>>>
>>> Matrix inner product seems to crash R2.2.1 on a 64bit arch.
>>> More precisely, the crash happens atleast if the matrix is
>>> non-square. The bug can be reproduced (atleast here) with
>>>
>>> bash$ bin/R
>>>> X<-matrix(data=0,nrow=100,ncol=10);
>>>> mat<-X%*%t(X);
>>> Illegal instruction
>>> bash$
>>>
>>> The crash doesnt happen if the matrix is specified square,
>>> e.g. 10x10. The underlying OS was
>>>
>>> Linux version 2.6.12-xeon-csl3 (root at chuck) (gcc version 3.4.5 20050809
>>> (prerelease) (Ubuntu 3.4.4-6ubuntu8)) #1 SMP Wed Feb 22 18:34:17 EET 2006
>>>
>>> and its running on Intel(R) Xeon(TM) MP CPU 3.66GHz.
>>>
>>> I configured R from the source tar.gz myself; each phase of
>>> "./configure --with-x=no ; make ; make install"
>>> passed without aborting on any errors.
>>>
>>>
>>> Cheers,
>>> J.
>>>
>>> --please do not edit the information below--
>>>
>>> Version:
>>> platform = x86_64-unknown-linux-gnu
>>> arch = x86_64
>>> os = linux-gnu
>>> system = x86_64, linux-gnu
>>> status =
>>> major = 2
>>> minor = 2.1
>>> year = 2005
>>> month = 12
>>> day = 20
>>> svn rev = 36812
>>> language = R
>>>
>>> Locale:
>>> LC_CTYPE=fi_FI at euro;LC_NUMERIC=C;LC_TIME=en_US.ISO-8859-15;LC_COLLATE=en_US.IS
>>> O-8859-15;LC_MONETARY=fi_FI at euro;LC_MESSAGES=en_US.ISO-8859-15;LC_PAPER=C;LC_N
>>> AME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C
>>>
>>> Search Path:
>>> .GlobalEnv, package:methods, package:stats, package:graphics,
>>> package:grDevices, package:utils, package:datasets, Autoloads, package:base
>>>
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>
>>>
>>
>>
>
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] Matrix inner product crashes on x86_64 (PR#8715)
ripley at stats.ox.ac.uk