[R] Segfaults of eigen

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Feb 21 12:40:55 CET 2011


So there is very likely a bug in your system software or compiler.
There is no such problem on other x86_64 systems (including 
Fedora 14 and 12, FreeBSD, Solaris and Windows).

You can debug segfaults for yourself (see 'Writing R Extensions') or 
ask your vendor for support.

On Mon, 21 Feb 2011, Juergen Rose wrote:

> Am Montag, den 21.02.2011, 11:11 +0100 schrieb Juergen Rose:
>> Hi,
>>
>> with small matrices eigen works as expected:
>>
>>> eigen(cbind(c(1,4),c(4,7)), only.values = TRUE)
>> $values
>> [1]  9 -1
>>
>> $vectors
>> NULL
>>
>>> eigen(cbind(c(1,4),c(4,7)))
>> $values
>> [1]  9 -1
>>
>> $vectors
>>           [,1]       [,2]
>> [1,] 0.4472136 -0.8944272
>> [2,] 0.8944272  0.4472136
>>
>>> eigen(cbind(c(1,-1),c(1,-1)))
>> $values
>> [1] -3.25177e-17+1.570092e-16i -3.25177e-17-1.570092e-16i
>>
>> $vectors
>>               [,1]          [,2]
>> [1,]  0.7071068+0i  0.7071068+0i
>> [2,] -0.7071068+0i -0.7071068-0i
>>
>> With large(?) matrices eigen produces on several of my systems
>> segfaults:
>>
>>> data(iris)
>>> D <- dist(iris[,-5])
>>> str(D)
>> Class 'dist'  atomic [1:11175] 0.539 0.51 0.648 0.141 0.616 ...
>>   ..- attr(*, "Size")= int 150
>>   ..- attr(*, "Diag")= logi FALSE
>>   ..- attr(*, "Upper")= logi FALSE
>>   ..- attr(*, "method")= chr "euclidean"
>>   ..- attr(*, "call")= language dist(x = iris[, -5])
>>> eigen(D)
>>
>>  *** caught segfault ***
>> address (nil), cause 'unknown'
>>
>> Traceback:
>>  1: .Call("La_rs", x, only.values, PACKAGE = "base")
>>  2: eigen(D)
>>
>> All systems are Gentoo systems, i.e. R-2.12.1 and blas-atlas-3.9.23-r4
>> is installed by compiling the sources. Recompiling R and blas-atlas did
>> not solve the issue. This issue seems the reason that example(svm)
>> creates segfaults, too.
>>
>> Any hint is appreciated.
>
> Still some additional information:
>
> root at moose:/root(5)# R
>
> R version 2.12.1 (2010-12-16)
> Copyright (C) 2010 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
> Platform: x86_64-pc-linux-gnu (64-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.
>
> 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.
>
>> sessionInfo()
> R version 2.12.1 (2010-12-16)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods
> base
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
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



More information about the R-help mailing list