Boost logo

Ublas :

Subject: Re: [ublas] [bindings] New traits system
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2010-01-10 14:05:20


Rutger ter Borg wrote:
> I've made another update to gelsd which hopefully fixes this assertion (it's
> committed). The regression for gelsd didn't actually pass either, although
> running the regression showed "*passed*".

Should be fixed now.

> There's still an issue in the regression for the complex case, which
> supposedly has an incorrect minimum amount of workspace (LWORK). It matches
> the documentation, so I am suspecting that the lapack docs isn't correct for
> LWORK, too.

I read the fortran code for cgelsd.f to find out the correct minimum value for LWORK. I came to the conclusion that the documentation

* N and NRHS. As long as LWORK is at least
* 2 * N + N * NRHS
* if M is greater than or equal to N or
* 2 * M + M * NRHS
* if M is less than N, the code will execute correctly.

should be changed to

* N and NRHS. As long as LWORK is at least
* 2 * N + N * NRHS
* if M is greater than or equal to N or
* 2 * M + MAX( N, M * NRHS)
* if M is less than N, the code will execute correctly.

I changed the template for gelsd.hpp accordingly, and the regression tests passes now.

Should we create patches for the "bugs" in the lapack documentation?

Regards,
Thomas