TESTING: scale the xGEDMDQ residual check by SINGVQX(KQ)

SINGVQX is only filled to KQ, so SINGVQX(K) read uninitialized memory
whenever DGEDMD's rank K exceeded DGEDMDQ's KQ -- harmless in the
default API by luck, an abort in the _64 build. cchkdmd/zchkdmd
already use KQ.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Simon Maertens
2026-07-30 15:13:24 +02:00
co-authored by Claude Opus 5
parent c08a083be7
commit e5757e68ee
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -650,7 +650,7 @@
TMP = ZERO
DO i = 1, KQ
TMP = MAX( TMP, ABS(RES(i) - RES1(i)) * &
SINGVQX(K)/(ANORM*SINGVQX(1)) )
SINGVQX(KQ)/(ANORM*SINGVQX(1)) )
END DO
TMP_REZQ = MAX( TMP_REZQ, TMP )
IF ( TMP > TOL2 ) THEN
+1 -1
View File
@@ -631,7 +631,7 @@
TMP = ZERO
DO i = 1, KQ
TMP = MAX( TMP, ABS(RES(i) - RES1(i)) * &
SINGVQX(K)/(ANORM*SINGVQX(1)) )
SINGVQX(KQ)/(ANORM*SINGVQX(1)) )
END DO
TMP_REZQ = MAX( TMP_REZQ, TMP )
IF ( TMP > TOL2 ) THEN