SRC: detect all-zero Y columns in GEDMD scaling#1243
Open
nakatamaho wants to merge 1 commit intoReference-LAPACK:masterfrom
Open
SRC: detect all-zero Y columns in GEDMD scaling#1243nakatamaho wants to merge 1 commit intoReference-LAPACK:masterfrom
nakatamaho wants to merge 1 commit intoReference-LAPACK:masterfrom
Conversation
Add the missing all-zero column check to the JOBS='Y' scaling path in the GEDMD routines. The existing JOBS='S'/'C' path detects when all columns of X are zero and returns INFO=-8, but the corresponding JOBS='Y' path did not count zero columns of Y or return early when all Y columns are zero. Return INFO=-10 for the all-zero Y case, matching Y as the 10th argument and the existing SCCOLY error handling. Update the routine documentation to describe this condition.
langou
approved these changes
Apr 14, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds the missing all-zero column check to the
JOBS='Y'scaling path in the GEDMD routines.
In the existing implementation, the
JOBS='S'/JOBS='C'pathnormalizes the columns of
Xand counts zero columns while doing so.If all columns of
Xare zero, the routine returns early withINFO = -8, sinceXis the 8th argument.The corresponding
JOBS='Y'path normalizes the columns ofY, but itdid not count zero columns of
Yand therefore did not return earlywhen all columns of
Ywere zero. This made the handling of theSCCOLYpath asymmetric with the existingSCCOLXpath.This PR updates the
JOBS='Y'path to:YYYare zeroINFO = -10, matchingYas the 10th argumentUpdated routines:
SRC/sgedmd.f90SRC/dgedmd.f90SRC/cgedmd.f90SRC/zgedmd.f90This is intended to make the input validation and scaling behavior of
the
JOBS='Y'path consistent with the existingJOBS='S'/JOBS='C'path. It also avoids continuing the computation after detecting that
the requested
Y-based column scaling cannot be performed because allcolumns of
Yare zero.