[Rd] eigen(symmetric=TRUE) for complex matrices
Berend Hasselman
bhh at xs4all.nl
Wed Jun 19 15:58:35 CEST 2013
On 19-06-2013, at 14:17, peter dalgaard <pdalgd at gmail.com> wrote:
>
>
>
> Thanks. I think I have it nailed down now. The culprit was indeed in our reference BLAS (I had only checked the LAPACK code), cmplxblas.f to be specific. Revision 53001 had a number of IF statements being commented out, but two of the changes looked like this:
>
> @@ -1561,7 +1561,7 @@
> C( J, J ) = DBLE( C( J, J ) )
> END IF
> DO 170 L = 1, K
> - IF( ( A( J, L ).NE.ZERO ) .OR. ( B( J, L ).NE.ZERO ) )
> +c IF( ( A( J, L ).NE.ZERO ) .OR. ( B( J, L ).NE.ZERO ) )
> $ THEN
> TEMP1 = ALPHA*DCONJG( B( J, L ) )
> TEMP2 = DCONJG( ALPHA*A( J, L ) )
>
> Notice that the continuation line was NOT commented out. So FORTRAN, being what it is, continues the line before the comment and parses it as
> DO 170 L = 1, KTHEN
> with KTHEN uninitialized! and things go downhill from there.
>
> (The uninitialized variable was actually hinted at in PR14964 and the fact that I could get one of my builds to segfault also helped.)
>
And it seems that line 1536 and 1537 ( R-3.0.1 source) have a similar change, so that will also have be put right.
Berend
More information about the R-devel
mailing list