Skip to content
Prev 46072 / 63424 Next

eigen(symmetric=TRUE) for complex matrices

On Jun 19, 2013, at 12:43 , Berend Hasselman 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.)