Skip to content

Commit

Permalink
init variable SSUM before call of LASSQ in DMD
Browse files Browse the repository at this point in the history
  • Loading branch information
dklyuchinskiy committed Dec 12, 2023
1 parent 1018000 commit 4787915
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions SRC/cgedmd.f90
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@ SUBROUTINE CGEDMD( JOBS, JOBZ, JOBR, JOBF, WHTSVD, &
K = 0
DO i = 1, N
!WORK(i) = SCNRM2( M, X(1,i), 1 )
SCALE = ZERO
SSUM = ONE
SCALE = ZERO
CALL CLASSQ( M, X(1,i), 1, SCALE, SSUM )
IF ( SISNAN(SCALE) .OR. SISNAN(SSUM) ) THEN
K = 0
Expand Down Expand Up @@ -834,7 +835,8 @@ SUBROUTINE CGEDMD( JOBS, JOBZ, JOBR, JOBF, WHTSVD, &
! carefully computed using CLASSQ.
DO i = 1, N
!RWORK(i) = SCNRM2( M, Y(1,i), 1 )
SCALE = ZERO
SSUM = ONE
SCALE = ZERO
CALL CLASSQ( M, Y(1,i), 1, SCALE, SSUM )
IF ( SISNAN(SCALE) .OR. SISNAN(SSUM) ) THEN
K = 0
Expand Down
6 changes: 4 additions & 2 deletions SRC/dgedmd.f90
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,8 @@ SUBROUTINE DGEDMD( JOBS, JOBZ, JOBR, JOBF, WHTSVD, &
K = 0
DO i = 1, N
!WORK(i) = DNRM2( M, X(1,i), 1 )
SCALE = ZERO
SSUM = ONE
SCALE = ZERO
CALL DLASSQ( M, X(1,i), 1, SCALE, SSUM )
IF ( DISNAN(SCALE) .OR. DISNAN(SSUM) ) THEN
K = 0
Expand Down Expand Up @@ -856,7 +857,8 @@ SUBROUTINE DGEDMD( JOBS, JOBZ, JOBR, JOBF, WHTSVD, &
! carefully computed using DLASSQ.
DO i = 1, N
!WORK(i) = DNRM2( M, Y(1,i), 1 )
SCALE = ZERO
SSUM = ONE
SCALE = ZERO
CALL DLASSQ( M, Y(1,i), 1, SCALE, SSUM )
IF ( DISNAN(SCALE) .OR. DISNAN(SSUM) ) THEN
K = 0
Expand Down
6 changes: 4 additions & 2 deletions SRC/sgedmd.f90
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,8 @@ SUBROUTINE SGEDMD( JOBS, JOBZ, JOBR, JOBF, WHTSVD, &
K = 0
DO i = 1, N
!WORK(i) = DNRM2( M, X(1,i), 1 )
SCALE = ZERO
SSUM = ONE
SCALE = ZERO
CALL SLASSQ( M, X(1,i), 1, SCALE, SSUM )
IF ( SISNAN(SCALE) .OR. SISNAN(SSUM) ) THEN
K = 0
Expand Down Expand Up @@ -855,7 +856,8 @@ SUBROUTINE SGEDMD( JOBS, JOBZ, JOBR, JOBF, WHTSVD, &
! carefully computed using SLASSQ.
DO i = 1, N
!WORK(i) = DNRM2( M, Y(1,i), 1 )
SCALE = ZERO
SSUM = ONE
SCALE = ZERO
CALL SLASSQ( M, Y(1,i), 1, SCALE, SSUM )
IF ( SISNAN(SCALE) .OR. SISNAN(SSUM) ) THEN
K = 0
Expand Down
6 changes: 4 additions & 2 deletions SRC/zgedmd.f90
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,8 @@ SUBROUTINE ZGEDMD( JOBS, JOBZ, JOBR, JOBF, WHTSVD, &
K = 0
DO i = 1, N
!WORK(i) = DZNRM2( M, X(1,i), 1 )
SCALE = ZERO
SSUM = ONE
SCALE = ZERO
CALL ZLASSQ( M, X(1,i), 1, SCALE, SSUM )
IF ( DISNAN(SCALE) .OR. DISNAN(SSUM) ) THEN
K = 0
Expand Down Expand Up @@ -831,7 +832,8 @@ SUBROUTINE ZGEDMD( JOBS, JOBZ, JOBR, JOBF, WHTSVD, &
! carefully computed using ZLASSQ.
DO i = 1, N
!RWORK(i) = DZNRM2( M, Y(1,i), 1 )
SCALE = ZERO
SSUM = ONE
SCALE = ZERO
CALL ZLASSQ( M, Y(1,i), 1, SCALE, SSUM )
IF ( DISNAN(SCALE) .OR. DISNAN(SSUM) ) THEN
K = 0
Expand Down

0 comments on commit 4787915

Please sign in to comment.