[R] Segfaults of eigen

Juergen Rose rose at rz.uni-potsdam.de
Mon Feb 21 11:11:40 CET 2011


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.



More information about the R-help mailing list