Re: [eigen] Blocked QR algorithm - lapack compatible ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx, Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Blocked QR algorithm - lapack compatible ?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Mon, 7 Jun 2010 11:35:19 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=14bsaCGsLDGQfMTbwiUzMBL+bW6Gp4OA0+d/PgBnM+Y=; b=JtiVcjUEZzOiJkGrZqShOdAELdPCEcaKDvBSug3DDEiVSwqwfwanMbyKIjSptMmejy W9RLLdEzskQa/18r3uVIjV/z7FfeS+sWD/UvZiTtd7QUiIT+5rk2f8OgkruMXiyMk4en w1nyyE51GfW4jD2ZFo58EoQFg2ucLlBwe0tBI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=X42rgewz2kFC5kC0UfitiHm3GESMaz8/a2MaZPHiqurH4mm4h3JAbxAm9PiRa2NHaB +wOWVbfV5qtkgxYsgpLiOpg0+fK+C/4GZAv/vR7sDpZfEpupTGvogJoxF6UOPuTm8/dD lDAKCUH92MBtCC1XuyVfrEL750Rjfp8VdfwCw=
Actually, pinging Thomas, because I remember he faced the exact same
issue. The conversion is not hard to do at all, but there is something
to do.
Benoit
2010/6/7 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> I'm pretty sure that out householder stuff isn't LAPACK compatible:
> either our hCoeffs or our housholder vectors are different. Don't
> remember which. Since Gael says the hCoeffs are compatible, I guess
> it's the vectors then, that are different.
>
> Benoit
>
>
>
> 2010/6/7 <vincent.lejeune@xxxxxxxxxx>:
>> Hi,
>>
>>
>>
>> so there is some error in my code, but I don't see where...
>>
>>
>>
>> I wished to write a blocked-Householder applying function like DLARFB in
>>
>> Lapack.
>>
>> This routine compute C:=C-V*T*V'*C, where the i-th column of V store the
>>
>> vector that defines the i-th householder factor.
>>
>> Indeed H = H1 * H2 * H3... * Hn can be written H = I - V * T * V', where T
>>
>> is a triangular factor, whose elements depends on V and on taus factor.
>>
>> T is computed by DLARFT in Lapack.
>>
>>
>>
>> I've attached a header file that contain my implemantation of such
>>
>> functions. It seems that they return the same results than Lapack routines,
>>
>> but the result of a QR decomposition is not the same than Eigen's one.
>>
>> Maybe you could give it an eye and find where is the issue...Thanks
>>
>>
>>
>> Vincent
>>
>>
>>
>>
>>
>> On Wed, 2 Jun 2010 11:33:13 +0200, Gael Guennebaud
>>
>> <gael.guennebaud@xxxxxxxxx> wrote:
>>
>>> sorry but our householder factor should really be the same than Lapack.
>>
>> Our
>>
>>> makeHouseholder computes the same thing than the Lapack dlarfg routine.
>>
>>>
>>
>>> gael
>>
>>>
>>
>>> On Fri, May 21, 2010 at 6:30 PM, Benoit Jacob
>>
>>> <jacob.benoit.1@xxxxxxxxx>wrote:
>>
>>>
>>
>>>> True, our hCoeffs aren't quite the same as LAPACK's tau. I don't
>>
>>>> remember exactly but I'm sure Gael does, as he coded that, so, pinging
>>
>>>> him.
>>
>>>>
>>
>>>> Benoit
>>
>>>>
>>
>>>> 2010/5/21 <vincent.lejeune@xxxxxxxxxx>:
>>
>>>> >
>>
>>>> > Hi,
>>
>>>> >
>>
>>>> >
>>
>>>> >
>>
>>>> > I'm trying to implement a blocked QR algorithm, using the code from
>>
>>>> >
>>
>>>> > HouseholderQR.
>>
>>>> >
>>
>>>> > I'm using the algorithm used in lapack routine dgeqrf : first I make
>>
>>>> > the
>>
>>>> >
>>
>>>> > reduction of a panel of the input matrix, then I build the "T"
>>
>>>> > triangular
>>
>>>> >
>>
>>>> > factor in H=I-VT'V' that defines the blocked householder
>>
>>>> > transformation,
>>
>>>> >
>>
>>>> > then I apply this transformation to the trailing submatrix by a left
>>
>>>> >
>>
>>>> > multiplication. Then I iterate the process.
>>
>>>> >
>>
>>>> >
>>
>>>> >
>>
>>>> > I think that the current implemantation of householderQR does not
>>
>>>> > comply
>>
>>>> >
>>
>>>> > with lapack routine. The coefficients in hCoeffs() does actually not
>>
>>>> > have
>>
>>>> >
>>
>>>> > the same meaning than the one in the TAU vector found in dgeqrf. When
>>
>>>> >
>>
>>>> > applying dlarft and dlarfb with hCoeffs to a partially reduced
>>
>> matrix,
>>
>>>> > I
>>
>>>> >
>>
>>>> > end with mostly different results than the one furnished by a
>>
>> complete
>>
>>>> >
>>
>>>> > eigen householder decomposition (strangly the first row is correct).
>>
>>>> >
>>
>>>> >
>>
>>>> >
>>
>>>> > I suspect that the applyhousolderfrom the left use the coefficient in
>>
>> a
>>
>>>> >
>>
>>>> > different war than dlarf in lapack does.
>>
>>>> >
>>
>>>> >
>>
>>>> >
>>
>>>> > Is there some doc on how hcoeffs from eigen and tau from lapack are
>>
>>>> >
>>
>>>> > related ?
>>
>>>> >
>>
>>>> >
>>
>>>> >
>>
>>>> > Thanks, Vincent
>>
>>>> >
>>
>>>> >
>>
>>>> >
>>
>>>>
>