The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

Question on AB input for DGBTRF

Open discussion regarding features, bugs, issues, vendors, etc.

Question on AB input for DGBTRF

Postby purdue_eng » Wed Apr 28, 2010 11:55 am

Hello,
I have a large banded matrix that I need to solve Ax=b and am having problems with the factorization in DGBTRF. This results in a zero on the diagonal of U (at 2), but when I put the same matrix into matlab and force it to use the same lapack subroutines (by specifying bandden params) there is no zero error.

I feel that my problem is with the matrix that I am passing DGBTRF. Using the example in the subroutine itself, if M = N = 6, KL = 2, KU = 1:

AB =
* * * + + +
* * + + + +
* a12 a23 a34 a45 a56
a11 a22 a33 a44 a55 a66
a21 a32 a43 a54 a65 *
a31 a42 a53 a64 * *

If this is my band storage matrix, do I need to pass all 6 rows to DGBTRF or only the bottom 4? Also, what is the leading dimension of the matrix N, KL + KU + 1 or 2*KL + KU + 1?
In this case 2*KL+KU+1 = N, but if I had a 35*35 matrix A with KL = 8, KU = 9; then in band storage should the leading dimension of AB be 35 or 26 (=2*KL + KU + 1)

Thanks for any help that anyone can offer,
William
purdue_eng
 
Posts: 1
Joined: Wed Apr 28, 2010 10:53 am

Re: Question on AB input for DGBTRF

Postby sven » Thu Apr 29, 2010 10:19 am

Dear William,

The declared leading dimension of AB (LDAB) needs to be at least 2*KL + KU + 1 and the number of columns needs to be at least N. You can then pass AB as an argument to the routine, so you are passing LDAB rows to the routine. The matrix should be stored in rows KL + 1 to 2*KL + KU + 1 of AB in the form you showed. You do not need to initialise the first KL rows of the array.

Hope that helps,

Sven Hammarling.
sven
 
Posts: 146
Joined: Wed Dec 22, 2004 4:28 am


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 7 guests