Repository navigation
Misc fixes - #1284
Misc fixes#1284
Conversation
|
Isn't #1047 already handled by PR #1264 , whose author pinged it just days ago ? Similarly, I have #1251 already open to fix #1183 |
|
my bad, lets drop those |
1a695c2 to
a2f5c00
Compare
|
I am reviewing this pull request. Side comment: @martin-frbg wrote "I think a mixed bag of unrelated fixes is a bad idea for other reasons as well - makes it harder to revert a single change, should that ever become necessary, and obscures the link between individual issue and fix in the git history." I agree with @martin-frbg. For future, it would be better to have PR that are more focused. I understand that there are a collection of different commits in this PR, I would prefer a collection of separated PRs. This is a comment for the future, not for this specific PR. Thanks for the PR! |
|
[ Note that I approved the whole PR by mistake, I intended to only approve a commit. ] |
|
With respect to
WRT In real arithmetic, there are 2-by-2 blocks, and so Lines 299 to 301 in 54b6620 There are only 1-by-1 blocks in complex arithmetic. So Line 131 in 54b6620 Right now, with this PR, we have the LAPACKE interface with in/out for WRT
In the complex case, we only have 1-by-1 blocks but the reordering can fail and then In the real case, we can have an error in the reordering and we also have the issue of 1-by-1 and 2-by-2 blocks which means that, even w/o errors, I repeat the request: please leave |
|
With respect to |
|
With respect to: Can you please propagate the same changes from [c] to [s,c,z]? |
|
Well, reviewing the PR, and going commit by commit was actually not too bad. It kind of worked on my end and I was worried about the mix-and-match of commits. At the end, this worked OK on my end. There are two requests for change.
Otherwise, I am done reviewing the PR. I am ready to merge. This is a terrific amount of work, it fixes a lots of issues, thanks a lot. |
When JOBU='N' or JOBVT='N', the U and VT matrices are not referenced, so the leading dimension checks should be skipped. Previously the code rejected ldvt=0 (and ldu=0) even when those matrices were not used, causing a spurious INFO=12 error on row-major calls with JOBVT='N' (or INFO=10 for JOBU='N'). Fixes Reference-LAPACK#1090
|
ok, done |
|
yes, fixed the work functions |
Two comments in the DGEHRD/DHSEQR test incorrectly say "Compute Schur form": - The DGEHRD call reduces to upper Hessenberg form, not Schur. - The DHSEQR call computes eigenvalues and the Schur form, so use a more descriptive label. Fixes Reference-LAPACK#587
When DFLAG=0 and both DD1 and DD2 need rescaling, the first scaling loop transitions DFLAG from 0 to -1 and correctly scales DH11 and DH12. But the second scaling loop then hits the ELSE branch (matching DFLAG=-1) which unconditionally resets DH21=-1 and DH12=1, overwriting the scaled DH12. Change ELSE to ELSE IF (DFLAG.EQ.ONE) so the implied-element initialization (DH21=-1, DH12=1) only fires when DFLAG=1, not when DFLAG=-1 (where all elements are already explicit). Fixes Reference-LAPACK#244
When ?HSEQR encounters non-finite input, it can return a negative INFO. The undo-scaling block at label 50 then computes N-INFO (which exceeds N) and indexes WR( INFO+1 ) (out of bounds), causing memory corruption through ?LASCL. Add INFO.GE.0 to the outer IF( SCALEA ) guard so the undo-scaling block is skipped entirely when INFO is negative. The inner IF( INFO.GT.0 ) guard only covered the second pair of ?LASCL calls. Fixes Reference-LAPACK#1128
Per LAPACK docs, in [cz]tgexc, ilst is [in,out]. The LAPACKE C interface was passing both ifst and ilst by value as input-only scalars, so callers could never observe the updated ilst value. Change both ifst and ilst to lapack_int* pointers in the complex tgexc variants to match the real-precision stgexc/dtgexc interface and the underlying Fortran semantics. Fixes Reference-LAPACK#771
|
Umm, can you please update the PR text before this gets merged ? I get the impression you added another bunch of valuable fixes in the latest round of changes ? |
|
no, I did not add commits, I just rebased to master, I had 12 then removed the 2 commits duplicating other PRs |
Oh, ok - thought the gemmtr test fixes and lapacke_zgedmdq rename were new (guess it illustrates how I have comprehension issues with mixed |
…PR #1284) When ?HSEQR returns a negative INFO on non-finite input, the undo-scaling block computed N-INFO and indexed WR/WI out of bounds. Skip it unless INFO>=0. Port of Reference-LAPACK 91c0f61b (Reference-LAPACK/lapack#1284).
…PR #1284) When ?HSEQR returns a negative INFO on non-finite input, the undo-scaling block computed N-INFO and indexed WR/WI out of bounds. Skip it unless INFO>=0. Port of Reference-LAPACK 91c0f61b (Reference-LAPACK/lapack#1284).
|
Indeed multiple commits are difficult to spot check things for such reasons. |
Thanks @martin-frbg. Do you remember which failures were caused? Do you think they are happening now? I do not see them. I am tempted to not revert (91c0f61). However if this was an issue in the past, we can revert. @martin-frbg, @jschueller, someone has an opinion here? Revert? Not revert? I am looking into it now and I am fine with "not revert". But if there are arguments to revert, it is easy to do. |
|
I will need to retest - but it was around 150 errors in the xeigtst? for each precision, and seen not only by me - OpenMathLib/OpenBLAS#5392 . Of course it is possible that some of the intervening code changes have closed the former failure paths. |
|
OK, I don't see any errors resulting from this change with Reference-LAPACK - OpenBLAS however still reacts quite strongly - the difference almost certainly lies in the implementation of XERBLA (the OpenBLAS one returns to the caller after reporting an error). |
It is good to have a few valid XERBLA implementations. The default LAPACK XERBLA The point is that as soon as there is a XERBLA call, if you returns to the caller after reporting an error, then LAPACK has a RETURN statement. All GEEV and GEEVX have the correct "RETURN" after the call to XERBLA. So I feel good about all this. |
|
I agree that there has to be something funky going on, maybe it's another case where the linker happened to pick the wrong flavor of xerbla - returning from OpenBLAS' implementation should send it back into unadulterated LAPACK code... anyway this does not appear to have any bearing on the validity of this PR for Reference-LAPACK |
random bugfixes: