From 57b267c90204cf6f84fb28a538c894369cde375e Mon Sep 17 00:00:00 2001 From: Johnathan Rhyne Date: Wed, 19 Jun 2024 22:09:04 -0400 Subject: [PATCH] fixing compilation errors due to not checking for lastc=0 --- SRC/dlarf1f.f | 9 +++++---- SRC/dlarf1l.f | 7 +++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SRC/dlarf1f.f b/SRC/dlarf1f.f index f16cdcf9c..104122999 100644 --- a/SRC/dlarf1f.f +++ b/SRC/dlarf1f.f @@ -175,15 +175,13 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK ) * .. Parameters .. DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) - INTEGER IONE - PARAMETER ( IONE = 1 ) * .. * .. Local Scalars .. LOGICAL APPLYLEFT INTEGER I, LASTV, LASTC * .. * .. External Subroutines .. - EXTERNAL DGEMV, DGER + EXTERNAL DGEMV, DGER, DAXPY, DSCAL * .. * .. External Functions .. LOGICAL LSAME @@ -211,7 +209,7 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK ) ! Look for the last non-zero row in V. ! Since we are assuming that V(1) = 1, and it is not stored, so we ! shouldn't access it. - DO WHILE( LASTV.GE.2 .AND. V( I ).EQ.ZERO ) + DO WHILE( LASTV.GT.1 .AND. V( I ).EQ.ZERO ) LASTV = LASTV - 1 I = I - INCV END DO @@ -223,6 +221,9 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK ) LASTC = ILADLR(M, LASTV, C, LDC) END IF END IF + IF( LASTC.EQ.0 ) THEN + RETURN + END IF IF( APPLYLEFT ) THEN * * Form H * C diff --git a/SRC/dlarf1l.f b/SRC/dlarf1l.f index 95a8b319b..80a486f79 100644 --- a/SRC/dlarf1l.f +++ b/SRC/dlarf1l.f @@ -142,8 +142,6 @@ SUBROUTINE DLARF1L( SIDE, M, N, V, INCV, TAU, C, LDC, WORK ) * .. Parameters .. DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) - INTEGER IONE - PARAMETER ( IONE = 1 ) * .. * .. Local Scalars .. LOGICAL APPLYLEFT @@ -184,8 +182,9 @@ SUBROUTINE DLARF1L( SIDE, M, N, V, INCV, TAU, C, LDC, WORK ) LASTC = ILADLR(M, LASTV, C, LDC) END IF END IF -! Note that lastc.eq.0 renders the BLAS operations null; no special -! case is needed at this level. + IF( LASTC.EQ.0 ) THEN + RETURN + END IF IF( APPLYLEFT ) THEN * * Form H * C