Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- QR factorization without pivoting

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

asd__asdqwe

Beginner

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

04-03-2015
07:33 AM

41 Views

QR factorization without pivoting

Hello,

I'm trying to compute the solution of a singular square system using a QR factorization. When I'm using a QR factorization with pivoting (i.e. *?geqp3*), everything works OK. However, I'm concerned about the cost of pivoting, and I'd rather use *?geqrf*. The problem is that the computed vector is in this case not a solution of the original system, as shown in the code attached. Do you see what I'm doing wrong ?

Also, could you comment on the performance of *?geqp3 *vs.* **?geqrf* ?

Thank you.

Link Copied

2 Replies

Alexander_K_Intel3

Employee

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

04-08-2015
11:07 AM

41 Views

Hello,

The code in the example operates with the matrix like it is stored in row-major storage, however LAPACK interfaces assume matrices are in column-major storage. (Some details could found at https://software.intel.com/en-us/node/520868, Matrix Layout paragraph )

Replacing row-major "A[2] = A[5] = 0;" with column-major "A[6] = A[7] = 0;" (and adding "x[2] = 1.0;") results correct solution.

You may want to try LAPACKE interface if you would like to operate with input matrices stored row-major.

As of QRF and QP3: QRF is faster. Difference could be up to 2x in some cornercases (too small matrix, or medium matrix and many threads). Introducing fixed (JPVT(J).ne.0) columns in QP3 factorization improves it performance: the more fixed columns, the closer QP3 performance to QR.

Best regards,

Alexander

asd__asdqwe

Beginner

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

04-09-2015
04:40 AM

41 Views

Hello,

Thank you very much for your very insightful comment !

Topic Options

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

For more complete information about compiler optimizations, see our Optimization Notice.