-
Notifications
You must be signed in to change notification settings - Fork 465
2-by-1 CS decomposition fixes #405
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
2-by-1 CS decomposition fixes #405
Conversation
Codecov Report
@@ Coverage Diff @@
## master #405 +/- ##
==========================================
- Coverage 83.33% 83.33% -0.01%
==========================================
Files 1820 1820
Lines 170849 170857 +8
==========================================
+ Hits 142378 142384 +6
- Misses 28471 28473 +2
Continue to review full report at Codecov.
|
Hi, do you want me to rebase? |
Hi Christoph, yes, if you can rebase, this would be great. Cheers, Julien. |
9f5b5a8
to
552baf1
Compare
done |
552baf1
to
1318ba1
Compare
* check LRWORK * pass actual LRWORK value to xBBCSD
The xORCSD2BY1/xUNCSD2BY1 output matrix U2 was clearly not orthogonal/unitary for certain input matrix dimensions m, p, and q (e.g., m = 260, p=130, q=131). The reason was an accidental overwrite of data by xORGQR()/xUNGQR() when the WORK array was apparently large enough to use blocking.
Previously, xUNCSD2BY1 only allowed workspace queries by passing LWORK=-1 (note the missing "R"). The new commit makes xUNCSD2BY1 behave, e.g., like xHEEVD.
1318ba1
to
0c32d4b
Compare
Thanks @christoph-conrads, that's great. Julien |
…1-fixes-20200422 2-by-1 CS decomposition fixes
This pull request improves
xUNCSD2BY1
andxORCSD2BY1
.LRWORK
argument toxUNCSD2BY()
is checked.LRWORK
value is passed toxBBCSD()
insidexUNCSD2BY()
instead of passing the minimum allowedLRWORK
value.U2
may be obviously not orthogonal or unitary, respectively, for certain input matrix dimension becausexORGQR()
andxUNGQR()
may overwrite the scalar factors of the elementary reflectors when assemblingU1
. On the author's computer, this happens, e.g., withm=260
,q=131
, andp=130
(these values may be dependent on the blocking size).xUNCSD2BY1
assume workspace queries whenLRWORK = -1
. This is also the behavior exhibited by, e.g.,xHEEVD
.The
U2
orthogonality issue is caused byxORGQR()
/xUNGQR()
using more than the minimum workspace available. The issue can be either fixed byP
) orThe patch choses the latter approach.