We did not remove lines from CLAPACK but rather added lines to LAPACK.
Till LAPACK 3.2.1, DGELSD was not returning the size of iwork after a query
neither in LAPACK nor in CLAPACK. Julie added this functionality to LAPACK
(Oct 2009, svn rev 699, bug 0038) and this was released in June 2010 with
The current CLAPACK version is 3.2.1 (while LAPACK is 3.4.1) so the feature
is unfortunately not in CLAPACK. I do not think we are planning on having any
new release of CLAPACK any time soon. You might want to edit your local
dgelsd_.c to enable the feature.
On Aug 17, 2012, at 3:01 AM, Joris Van Deun
I use clapack for my work and just noticed something strange in the function
dgelsd_ (solving a linear least squares problem using the singular value
decomposition). One of the parameters is the array iwork, which is passed on to
the function dlalsd_ inside dgelsd_. In the original Fortran code, if the
parameter LWORK equals -1 then a workspace query is assumed and the minimum
size of the arrays WORK and IWORK is returned as the first element of these
arrays. We can then call DGELSD again, providing arrays of the correct size, I
However, in the c-code the minimum size of the array work is still returned as
its first element, but for some strange reason this is not done for the array
iwork. The corresponding code was deleted apparently. Is there a reason for
this? Because now I cannot resize the array iwork to make sure that it is big
enough (well of course, I can, but I would have to compute the size liwork
myself, which is exactly what I wanted to avoid). Am I missing something here?
Thank you for your time!
Joris Van Deun
Lapack mailing list
-------------- next part --------------
An HTML attachment was scrubbed...