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

peter dalgaard pdalgd at gmail.com
Wed Jun 19 16:16:34 CEST 2013


On Jun 19, 2013, at 15:58 , Berend Hasselman wrote:

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


Yes, that's the other one of the two changes.

-pd

-- 
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-devel mailing list