- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I try to use https://software.intel.com/sites/products/documentation/doclib/iss/2013/mkl/mklman/GUID-03E2AA41-0886-485D-B0D7-1C2186119220.htm routine for band matrix factorization. I've wrote simple application that factorizes 4*4 matrix. However, I can't undertand relation between elements of matrix L and multipliers used during factorization m_{i,j. }Those mutipliers represent correct columns of matrix L, but order of elements m_{i,j} in the column is not correct. I assume, some permutation of rows should be performed based on *ipiv *vector.

Initial matrix:

-0.230 -6.980 0.000 0.000

2.540 2.460 2.560 0.000

-3.660 -2.730 2.460 -4.780

0.000 -2.130 4.070 -3.820

Result of dgbtrf:

0.000 0.000 0.000 -4.780

0.000 0.000 2.460 0.300

0.000 -2.730 -0.155 -3.292

-3.660 -6.808 4.254 -0.727

-0.694 -0.083 0.968 0.000

0.063 0.313 0.000 0.000

Permutation vector: 3 3 3 4

In this case

m_{21} = -0.694 m_{32} = -0.083 m_{43}= 0.968

m_{31} = 0.063 m_{42} = 0.313

Those values form matrix L_result:

1.000 0.000 0.000 0.000

**-0.694** 1.000 0.000 0.000

** 0.063 -0.083** 1.000 0.000

0.000 0.313 0.968 1.000

However, the correct answer is L_correct:

1.000 0.000 0.000 0.000

** 0.063** 1.000 0.000 0.000

**-0.694 -0.083** 1.000 0.000

0.000 0.313 0.968 1.000

Could you explain how L_result should be transformed into L_correct in general case?

Link Copied

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi Baskin,

Could you please attach your code and tell which platform you are working?

Best Regards,

Ying

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi Ying,

Thank you for reply. I have solved my problem. I didn't understand output of gbtrf - the meaning of coefficients m_{i,j}. The explanation is pretty simple. LU factorization with partial pivoting requires swap of rows. For dense matrices, full rows are swapped( i.e columns from 1 to n). In gbtrf routine swap is performed using only "right" part of the row. For example, if you already found 10 columns, at step 11 you are going to swap rows 11 and 16(row 16 contains maximum element), then you should swap elements in row 11 starting from column 11, in row 16 starting from column 11 too. For dense matrix, you would swap elements starting from column 1.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi Baskin,

Thanks for the updating and sharing the result.

Thanks

Ying

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page