Page 1 of 1

Possible bug in xLASCL in checking parameters?

PostPosted: Sun Aug 08, 2010 1:17 am
by jgpallero
Hello,
The leading dimension for a band matrix with KL subdiagonals an KU super diagonals must be ldab=max(1,KL+KU+1) as it is explained in http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/index.jsp?topic=/com.ibm.cluster.essl43.guideref.doc/am501_upbsm.html and checked in, for example, http://www.netlib.org/lapack/double/dgbbrd.f.
But in soubrutines xLASCL (http://www.netlib.org/lapack/double/dlascl.f, for example) we can see a test of band matrix as LDA.LT.2*KL+KU+1. What's the meaning of the '2*KL'? I think that the correct way must be LDA.LT.KL+KU+1. Am I wrong or is a real bug?

Thanks.

Re: Possible bug in xLASCL in checking parameters?

PostPosted: Mon Aug 09, 2010 12:12 pm
by Julien Langou
There are two different data storages for banded matrix in LAPACK. Storage 1 uses (KL+KU+1)*N storage space and requires a leading dimension of size (KL+KU+1), storage 2 uses (2*KL+KU+1)*N storage space and requires a leading dimension of size (2*KL+KU+1). Storage 1 is used in DGBBRD for example. Storage 2 is used in DGBTRF. (We do need an extra KL*N storage in the case of partial pivoting.) xLASCL is used in the context of linear solves, so with a 'Z' flag, we expect LDA=2*KL+KU+1. Cheers, Julien.

Re: Possible bug in xLASCL in checking parameters?

PostPosted: Mon Aug 09, 2010 12:14 pm
by Julien Langou
I have just added: "See DGBTRF for storage details." in DLASCL (see svn revision 783).
Code: Select all
*          = 'Z':  A is a band matrix with lower bandwidth KL and upper
*                  bandwidth KU. See DGBTRF for storage details.

If suggestions, let me know.