From Roger.Bivand at nhh.no  Wed Jun 19 14:28:12 2013
From: Roger.Bivand at nhh.no (Roger Bivand)
Date: Wed, 19 Jun 2013 12:28:12 +0000
Subject: [Rd] eigen(symmetric=TRUE) for complex matrices
References: <CAHHjBM4z8d58QNb1HuqT4-k7BKaTo_=zAeuFeDr4pZdjTP2-Tg@mail.gmail.com>
	<5CEBFA58-9D40-42F0-87B8-F006EC3A848B@gmail.com>
	<267A30A5-1865-4D23-8B9A-F04F9BBED1EE@gmail.com>
	<35EFC1D4-CA6B-42B6-A15B-4A1FCD0FD687@xs4all.nl>
	<84517510-5BD0-4842-B361-4F336E24E37A@gmail.com>
	<5A6C81B8-EB15-4A09-B5E0-ABE8CBC8EC5E@gmail.com>
Message-ID: <loom.20130619T141758-22@post.gmane.org>

peter dalgaard <pdalgd <at> gmail.com> writes:

> 
> 
...
> 
> There could be compiler issues. It could also be that the internal LAPACK
uses a newer version than the
> external libs and a bug was introduced in between them.

Running:

N <- 100
jj <- matrix(0,N,N)
A <- exp(-0.1*(row(jj)-col(jj))^2)
min(eigen(A,only.values=TRUE,symmetric=TRUE)$values)
min(eigen(A+0i,only.values=TRUE,symmetric=TRUE)$values)

with R's BLAS in 3.0.1 on Fedora 18 with gcc 4.7.2-8 gives the same error.
Both 3.0.1 and R-devel (R's BLAS) on RHEL 5 gcc 4.1.2 give a segfault at
zher2k(), in the 3.0.1 case at line 1566 in cmplxblas.f, at line 1570 for
R-devel. So yes, there is a compiler issue too. 

The backtrace is La_rs_cmplx at Lapack.c:829 -> zheev at cmplx.f:10356 ->
zhetrd at cmplx.f:11080 -> zher2k at cmplxblas.f:1570 for R-devel, and
La_rs_cmplx at Lapack.c:829 -> zheev at cmplx.f:10356 -> zhetrd at
cmplx.f:11080 -> zher2k at cmplxblas.f:1566 for 3.0.1.

Roger



[Rd] eigen(symmetric=TRUE) for complex matrices
Roger Bivand