Skip to content
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

handle and document corner cases of lwork in lapack #942

Merged
merged 7 commits into from
Dec 4, 2023

Conversation

dklyuchinskiy
Copy link
Contributor

@dklyuchinskiy dklyuchinskiy commented Nov 21, 2023

Handle and document corner cases of lwork in lapack

This PR contains fixes related to the following issues:

  1. GEQRF: document corner case of LWORK #257 - parameter LWORK can't be zero on any case, info checker should know about this
  2. GEQRF: document corner case of LWORK #257, x{OR,UN}M{QR,RQ,LQ,QL} optimal workspace size is always > 4096 #546 - parameter LWORK should be small as possible for corner cases M = 0 or N = 0. Final LWORK value should be aligned with quick exit and info checker.
  3. Some typos and code style fixes, changes in documentation.

Actually, for many functions in LAPACK these issues are already solved or did not exist at all. This PR handles remaining ones for general, symmetric and generalized problems (double precision only at the moment). Please review. If there are some questions, let's discuss!

  • The documentation has been updated.
  • If the PR solves a specific issue, it is set to be closed on merge.

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 1205 lines in your changes are missing coverage. Please review.

Comparison is base (3200980) 0.00% compared to head (280e161) 0.00%.
Report is 2 commits behind head on master.

Files Patch % Lines
SRC/clatsqr.f 0.00% 25 Missing ⚠️
SRC/dlatsqr.f 0.00% 25 Missing ⚠️
SRC/slatsqr.f 0.00% 25 Missing ⚠️
SRC/zlatsqr.f 0.00% 25 Missing ⚠️
SRC/dlaswlq.f 0.00% 24 Missing ⚠️
SRC/slaswlq.f 0.00% 24 Missing ⚠️
SRC/zlaswlq.f 0.00% 24 Missing ⚠️
SRC/claswlq.f 0.00% 21 Missing ⚠️
SRC/clamswlq.f 0.00% 20 Missing ⚠️
SRC/clamtsqr.f 0.00% 20 Missing ⚠️
... and 150 more
Additional details and impacted files
@@           Coverage Diff            @@
##           master     #942    +/-   ##
========================================
  Coverage    0.00%    0.00%            
========================================
  Files        1930     1930            
  Lines      190055   190413   +358     
========================================
- Misses     190055   190413   +358     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

langou
langou previously approved these changes Nov 21, 2023
@dklyuchinskiy
Copy link
Contributor Author

Extension to all precisions for this scope of functions is in progress.

@dklyuchinskiy dklyuchinskiy force-pushed the lapack-257-zero-lwork branch 5 times, most recently from 69ef653 to 0f5cc87 Compare November 27, 2023 12:02
@dklyuchinskiy dklyuchinskiy force-pushed the lapack-257-zero-lwork branch 5 times, most recently from 2c6e5c7 to f15520d Compare December 1, 2023 08:58
@dklyuchinskiy dklyuchinskiy marked this pull request as ready for review December 4, 2023 10:21
@dklyuchinskiy
Copy link
Contributor Author

PR is ready! @langou please review one more time.

I think, several changes should be pointed out in addition to already mentioned issues.

  • 1. sytrd_2stage/sytrd_sb2st

  • deleted debug code

  • removed return of parameter LHOUS into the first element of array HOUS. This array is used for storage of Householder vectors, and cant be overwritten at the end. This issue will be critical, when case VECT=V is implemented.

  • 2. sgesvj/dgesvj

  • added missed LQUERY mode of the function, as it is already done in cgesvj/zgesvj.

  • 3. chesv_aa_2stage, chesv_aa, cggev3 and etc.

  • minimal value of parameter LWKOPT should be equal to LWKMIN (if such exist) to guarantee pass of error checker for corresponding parameter LWORK in normal run

  • 4. fix of tests for eigensolver evr/evr_2stage and linear solver trf_aa_2stage in order to follow change of corner case of LWORK inside related functions

  • 5. added missed usage of functions sroundup_lwork into single and single complex precisions

  • 6. fixed output format of function chkher, since it printed only 6 characters of function's name

One can see, that important functions of generation/application of orthogonal matrices are not taken into account in this PR. I believe, this work should be implemented during fix of #546.

Also, thanks to @kleineLi for the help with complex precisions and intermediate review.

@langou langou merged commit c2255a8 into Reference-LAPACK:master Dec 4, 2023
14 checks passed
ilayn added a commit to ilayn/scipy that referenced this pull request Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants