-
Notifications
You must be signed in to change notification settings - Fork 216
Pivoting QR decomposition #1045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
98f1708
Function interface for pivoting QR.
loiseaujc 4b05928
Added interfaces for xGEQP3.
loiseaujc 0c99ca1
Fix typos in geqp3 interface definition.
loiseaujc 19cc0f0
Added handle info function for geqp3.
loiseaujc 55bc413
Full implementation of pivoting QR.
loiseaujc dd9b022
Added test for pivoting QR.
loiseaujc bd80504
Added test for a tall matrix with rank deficiency.
loiseaujc dd785a1
Added example for pivoting QR.
loiseaujc e72d2f4
Added pivoting_qr_space example.
loiseaujc bf328f6
Update test/linalg/test_linalg_pivoting_qr.fypp
loiseaujc 7454ecd
Update test/linalg/test_linalg_pivoting_qr.fypp
loiseaujc 07efc4a
Update test/linalg/test_linalg_pivoting_qr.fypp
loiseaujc 2bb062a
Clarify that GEQP3 works both for real and complex matrices.
loiseaujc e2eac02
Added specs.
loiseaujc b1f1ad0
Update src/lapack/stdlib_linalg_lapack_aux.fypp
loiseaujc 5535e3f
Update src/lapack/stdlib_linalg_lapack_aux.fypp
loiseaujc b20a054
Update example/linalg/example_pivoting_qr_space.f90
loiseaujc dffc657
Update doc/specs/stdlib_linalg.md
loiseaujc 05ae3f6
Update doc/specs/stdlib_linalg.md
loiseaujc 43d6552
Update src/stdlib_linalg.fypp
loiseaujc 81f2a4f
Apply suggestions from code review
loiseaujc 99abc23
Split tests based on matrix types.
loiseaujc 61d9101
Fypp-template for the *geqp3 interfaces.
loiseaujc b7a4475
Further simplification of the interface fyyp-template.
loiseaujc c2fbf36
Debug ubuntu-22.04/cmake/intel-classic
loiseaujc a2da4ce
Debugging intel classic
loiseaujc 804db82
Debug intel classic
loiseaujc 79cba85
Debugging intel
loiseaujc 8df20ab
Debug intel-classic. Change error metric.
loiseaujc 189b81e
Revert "Further simplification of the interface fyyp-template."
loiseaujc 2797b65
Revert "Debug ubuntu-22.04/cmake/intel-classic"
loiseaujc 0cfaf2f
Trying to pinpoint which test fails with intel.
loiseaujc 844c01e
Pinpoint which exact check is failing.
loiseaujc e941389
Pinpoint which check is failing.
loiseaujc d080b6d
Fix typo
loiseaujc 03acc1b
Force Q and R to zero instead of ieee_value.
loiseaujc 2ef272f
Print maximum reconstruction error.
loiseaujc 30c7d39
Debug prints.
loiseaujc 3a59887
Debug prints
loiseaujc 5087986
Debug prints
loiseaujc 0ec1bba
Additional debug prints
loiseaujc f5cb5a3
Deterministic matrix to verify output.
loiseaujc 9fae235
Check tau vector.
loiseaujc 8f105da
Deterministic vandermonde matrix.
loiseaujc 6a41fdf
Force pivot to zero.
loiseaujc d22ea2e
Print pivots
loiseaujc 2141943
Fix query workspace ?
loiseaujc e555ef1
Fix workspace query ?
loiseaujc 4259948
Restoring checks.
loiseaujc b006a5c
Restoring checks.
loiseaujc e72e16f
Restoring tests.
loiseaujc 4a4cc1f
Clean-up tests.
loiseaujc f4f8f1f
Reactivating tests.
loiseaujc 35cca6e
Cleaned-up code.
loiseaujc 9c8473c
Replaced forall with original do concurrent.
loiseaujc 909df14
Restore random matrix for the pivoting qr tests.
loiseaujc aa294c6
Revert "Replaced forall with original do concurrent."
loiseaujc 0541193
Replaced forall with do concurrent.
loiseaujc 93f149a
Pinpointing which test fails.
loiseaujc 8253d7b
Fix typo in print
loiseaujc 85e58a0
Debug prints
loiseaujc 8e37391
Deterministic matrix to have reproducible error.
loiseaujc f62fa20
Debug prints.
loiseaujc 9b6bd2a
Debug print
loiseaujc 1cedcaf
Trying different loop structure
loiseaujc 39abce0
Fixing issue with do concurrent and intel.
loiseaujc 55a4b3e
Try José idea to fix intel do concurrent.
loiseaujc 429eaa2
Revert "Try José idea to fix intel do concurrent."
loiseaujc 31e073d
Turn on back the other tests.
loiseaujc c9cbb8a
Debug ubuntu-22.04/cmake/intel-classic
loiseaujc acd21d4
Merge remote-tracking branch 'origin/rank_revealing_qr' into rank_rev…
loiseaujc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| program example_pivoting_qr | ||
| use stdlib_linalg, only: qr | ||
| implicit none | ||
| real :: A(104, 32), Q(104, 32), R(32, 32) | ||
| integer :: pivots(32) | ||
|
|
||
| ! Create a random matrix | ||
| call random_number(A) | ||
|
|
||
| ! Compute its QR factorization (reduced) | ||
| call qr(A, Q, R, pivots) | ||
|
|
||
| ! Test factorization: Q*R = A | ||
| print *, maxval(abs(matmul(Q, R) - A(:, pivots))) | ||
|
|
||
| end program example_pivoting_qr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| ! Pivoting QR example with pre-allocated storage | ||
| program example_pivoting_qr_space | ||
| use stdlib_linalg_constants, only: ilp | ||
| use stdlib_linalg, only: qr, qr_space, linalg_state_type | ||
| implicit none | ||
| real :: A(104, 32), Q(104, 32), R(32, 32) | ||
| real, allocatable :: work(:) | ||
| integer(ilp) :: lwork, pivots(32) | ||
| type(linalg_state_type) :: err | ||
|
|
||
| ! Create a random matrix | ||
| call random_number(A) | ||
|
|
||
| ! Prepare QR workspace | ||
| call qr_space(A, lwork, pivoting=.true.) | ||
| allocate (work(lwork)) | ||
|
|
||
| ! Compute its QR factorization (reduced) | ||
| call qr(A, Q, R, pivots, storage=work, err=err) | ||
|
|
||
| ! Test factorization: Q*R = A | ||
| print *, maxval(abs(matmul(Q, R) - A(:, pivots))) | ||
| print *, err%print() | ||
|
|
||
| end program example_pivoting_qr_space |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.